-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash if MeshDevice is deallocated before MeshBuffer (#18181)
### Ticket ### Problem description Currently there is a crash if MeshDevice is deallocated or closed before MeshBuffer There are two semi-independent issues: 1. Lifetime issue if MeshDevice is deallocated 2. Destruction order is inconsistent in MeshDevice destructor and close method, because `sub_device_manager_tracker_ ` may perform buffer deallocation and this would call back to MeshDevice, so member destruction order actually meters here. ### What's changed Added a test to reproduce the issue Stored MeshDevice as weak_ptr inside of MeshBuffer to be able to detect this case Added special handling for this case, skipping buffer deallocation call Change reset order in MeshDevice close ### Checklist - [x] [All post commit CI passes](https://github.com/tenstorrent/tt-metal/actions/runs/13496304356) - [x] New/Existing tests provide coverage for changes
- Loading branch information
1 parent
aa09c9f
commit 4a0562c
Showing
6 changed files
with
80 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters