Skip to content

[v3-4-test] Drain result_queue before dispatch in LocalExecutor to prevent runtime dispatch deadlock (#70545) - #74949

Merged
vatsrahul1001 merged 1 commit into
v3-4-testfrom
backport-b00cfeb-v3-4-test
Oct 18, 2026
Merged

vatsrahul1001 merged 1 commit into
v3-4-testfrom
backport-b00cfeb-v3-4-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

…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>
@boring-cyborg boring-cyborg Bot added the area:Executors-core LocalExecutor & SequentialExecutor label Oct 18, 2026
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.4.0 milestone Oct 18, 2026
@vatsrahul1001
vatsrahul1001 marked this pull request as ready for review October 18, 2026 07:46
@vatsrahul1001
vatsrahul1001 merged commit 20711a9 into v3-4-test Oct 18, 2026
105 of 116 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport-b00cfeb-v3-4-test branch October 18, 2026 09:35
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Executors-core LocalExecutor & SequentialExecutor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants