Repository navigation
[v3-4-test] Drain result_queue before dispatch in LocalExecutor to prevent runtime dispatch deadlock (#70545) - #74949
Merged
Conversation
…event runtime dispatch deadlock (#70545) Fixes the runtime/dispatch-path deadlock reported in #70526: during _process_workloads the scheduler could block in activity_queue.put() while workers were blocked writing results into a full result_queue pipe, a circular wait. Draining the result queue before each put breaks the cycle. The end()/join path is already handled by #67881; this covers normal dispatch. Adds a call-order unit test and a bounded real-queue regression test. (cherry picked from commit b00cfeb) Co-authored-by: Saksham Kapoor <sakshamkapoor2911@gmail.com>
1 task done
vatsrahul1001
marked this pull request as ready for review
October 18, 2026 07:46
vatsrahul1001
requested review from
XD-DENG,
ashb,
dheerajturaga,
hussein-awala,
o-nikolas and
pierrejeambrun
as code owners
October 18, 2026 07:46
vatsrahul1001
pushed a commit
that referenced
this pull request
Oct 20, 2026
…event runtime dispatch deadlock (#70545) (#74949) Fixes the runtime/dispatch-path deadlock reported in #70526: during _process_workloads the scheduler could block in activity_queue.put() while workers were blocked writing results into a full result_queue pipe, a circular wait. Draining the result queue before each put breaks the cycle. The end()/join path is already handled by #67881; this covers normal dispatch. Adds a call-order unit test and a bounded real-queue regression test. (cherry picked from commit b00cfeb) Co-authored-by: Saksham Kapoor <sakshamkapoor2911@gmail.com>
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.
Fixes the runtime/dispatch-path deadlock reported in #70526: during
_process_workloads the scheduler could block in activity_queue.put() while workers
were blocked writing results into a full result_queue pipe, a circular wait. Draining
the result queue before each put breaks the cycle. The end()/join path is already
handled by #67881; this covers normal dispatch. Adds a call-order unit test and a
bounded real-queue regression test.
(cherry picked from commit b00cfeb)
Co-authored-by: Saksham Kapoor sakshamkapoor2911@gmail.com