Repository navigation
Fix TSan data race in WorkloadResourceManager deleteNode - #96270
Merged
Merged
Conversation
Move the `node` shared_ptr into the `executeInSchedulerThread` lambda so that the `UnifiedSchedulerNode` is destroyed in the scheduler thread rather than the control thread. Previously, the local shared_ptr copy could become the last reference, and when it went out of scope on the control thread after the lambda erased the node from the map, the destructor would race with the scheduler thread that may still process activations (e.g. `removeChild` writing `child_active` vs `activateChild` reading it). Co-Authored-By: Claude Opus 4.6 <[email protected]>
Contributor
|
Workflow [PR], commit [0de92a3] Summary: ❌
|
alexey-milovidov
commented
Feb 8, 2026
alexey-milovidov
left a comment
Member
Author
There was a problem hiding this comment.
Looks very reasonable.
Member
|
Actually fixed here #97372 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move the
nodeshared_ptr into theexecuteInSchedulerThreadlambda so that theUnifiedSchedulerNodeis destroyed in the scheduler thread rather than the control thread. Previously, the local shared_ptr copy could become the last reference, and when it went out of scope on the control thread after the lambda erased the node from the map, the destructor would race with the scheduler thread that may still process activations (e.g.removeChildwritingchild_activevsactivateChildreading it).Changelog category (leave one):
Version info
26.2.1.406