Skip to content

[Bug Report] nanobind leak warnings on Blackhole #903

@markoradosavljevicTT

Description

@markoradosavljevicTT

Describe the bug
When importing tt-exalens together with pydantic, I get nanobind leak warnings on Blackhole.

nanobind: leaked 3 instances!
 - leaked instance 0x557306e77600 of type "tt_umd.tt_umd.ClusterDescriptor"
 - leaked instance 0x557306f2b6b8 of type "tt_umd.tt_umd.SocDescriptor"
 - leaked instance 0x557306c800f0 of type "tt_umd.tt_umd.TTDevice"
nanobind: leaked 13 types!
 - leaked type "tt_umd.tt_umd.TTDevice"
 - leaked type "tt_umd.tt_umd.tt_xy_pair"
 - leaked type "TelemetryTag"
 - leaked type "CoordSystem"
 - leaked type "tt_umd.tt_umd.CoreCoord"
 - leaked type "BoardType"
 - leaked type "IODeviceType"
 - leaked type "DramTrainingStatus"
 - leaked type "ARCH"
 - leaked type "tt_umd.tt_umd.SocDescriptor"
 - ... skipped remainder
nanobind: leaked 88 functions!
 - leaked function "__le__"
 - leaked function "__eq__"
 - leaked function "as_bh"
 - leaked function "create_from_yaml_content"
 - leaked function "bar_write32"
 - leaked function "__repr__"
 - leaked function "dma_write_to_device"
 - leaked function "__int__"
 - leaked function "get_board_type"
 - leaked function "get_board_id"
 - ... skipped remainder
nanobind: this is likely caused by a reference counting issue in the binding code.
See https://nanobind.readthedocs.io/en/latest/refleaks.htmlT

Similar issue was fixed for Wormhole in PR #898, but on BH the warning is still present.

If I comment out the function at:

risc_debug = loc.noc_block.get_risc_debug(risc_name, neo_id)

the warning disappears.

To Reproduce
Steps to reproduce the behavior:
Clone tt-llk repo, checkout markoradosavljevic/umd_leak branch and run:

cd tests
./setup_testing_env.sh
cd python_tests
pytest fused_test.py

Expected behavior
No nanobind leak warnings when importing tt-exalens and running tests on Blackhole.

Please complete the following environment information:

  • OS: tt-llk/tt-llk-ird-ubuntu-22-04
  • Version of software: 0.3.5
  • Architecture: blackhole
  • Card type: [e.g. n150,n300,t3000]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions