Join tasks waited by JoinableTaskCollection.JoinUntilEmpty in dumpasync result#1538
Open
Join tasks waited by JoinableTaskCollection.JoinUntilEmpty in dumpasync result#1538
Conversation
added 2 commits
February 8, 2026 15:20
Join to the task it waits on.
There was a problem hiding this comment.
Pull request overview
Updates !DumpAsync analysis to better surface JoinableTask dependencies when a JoinableTaskCollection.JoinTillEmptyAsync-style state machine is involved, and to improve identification of main-thread blocking scenarios in nested JTF runs.
Changes:
- Extracts joined tasks from
JoinableTaskCollection.dependentData.childDependentNodesand attaches them to the corresponding async state machine. - Extends joinable-task chaining logic to also consider tasks found via a
JoinableTaskCollection. - Adjusts blocking-task discovery to continue scanning for additional blocking joinable tasks on the same thread; tweaks output spacing behavior.
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.
This PR is to join waiting tasks in the JoinableTaskCollection case. It appears that it is quite common in closing IDE hangs, and quite some developers struggle to find out what is inside the collection. Those steps are often done through some unreliable manual step works depending on the initialDelegate of the JTF task, which sometime doesn't work well when it points some JIT stubs.
This PR is to fix (at least in some cases based on dumps I got) and join the task chain in that case. It also fixes some missing indication that a task is blocking the main thread, when the main thread has several nested JTF.Run. (I guess it is better to nested them in the task chain, which I will follow up on that.
Hopefully, it can save some time in some deadlock investigation sessions.
A sample looks like this. Before this PR, the JoinTillEmptyAsync and BuildAsync will be seperated, and SynchouslyBlockingMainThread is missing due to the logic only marks on JTF.Run inside the solution code. The project JTF is nested inside that one.