Skip to content

[v3-4-test] Fix flaky LocalExecutor concurrent result refill test (#75030) - #76117

Merged
vatsrahul1001 merged 1 commit into
v3-4-testfrom
backport/75030-to-v3-4-test
Oct 31, 2026
Merged

vatsrahul1001 merged 1 commit into
v3-4-testfrom
backport/75030-to-v3-4-test

Conversation

@vatsrahul1001

Copy link
Copy Markdown
Contributor

Backport of #75030 to v3-4-test.

Why

v3-4-test CI is red on the core DB-test jobs — and therefore the rc2 sync PR #76068 — because the Other parallel test type deadlocks and times out the whole job (56-min total-test-timeout → exit 2).

The culprit is airflow-core/tests/unit/executors/test_local_executor.py::TestLocalExecutor::test_process_workloads_progresses_under_concurrent_result_refill, the regression test added by #70545 (backported here as #74949). That test was flaky: it emitted 16 KiB result payloads for ~0.9 KiB workloads, which can close a two-pipe deadlock that the production drain-before-put fix is not meant to prevent at that ratio. It passes most of the time (so rc1's sync PR #75755 merged green on 2026-10-27) but deadlocks reliably under heavier parallel load.

#75030 fixed the test — it uses result payloads smaller than a workload (512 B) and raises the workload count so it stays deterministic with the fix. Production local_executor.py is unchanged and is already byte-identical to main; this is a test-only change.

#75030 merged to main on 2026-10-19 but was never labelled backport-to-v3-4-test, so auto-backport never carried it over (its parent #70545 was labelled and backported, leaving v3-4-test running the flaky test without its fix).

This unblocks the 3.4.0rc2 sync.

Verification

Reproduced the deadlock on v3-4-test locally (parallel core-tests, sqlite backend, all six test types) — Other hangs on this exact test. With this cherry-pick applied the same run no longer deadlocks. The CI on this PR is the authoritative check.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8)

The test sent 16 KiB results for each ~0.9 KiB workload. When the dispatch
loop blocked on a full activity pipe, the worker could fill the result pipe
before it freed a page of the activity pipe, closing a two-pipe deadlock that
drain-before-put cannot prevent at that ratio. It hangs intermittently, more
often when pipes are smaller. Production results are a few hundred bytes,
so the test now uses results smaller than a workload, which makes it
deterministic with the fix, and dispatches enough workloads that it still
deadlocks without it.

(cherry picked from commit cffe6df)
@boring-cyborg boring-cyborg Bot added the area:Executors-core LocalExecutor & SequentialExecutor label Oct 31, 2026
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.4.0 milestone Oct 31, 2026
@vatsrahul1001
vatsrahul1001 enabled auto-merge (squash) October 31, 2026 07:10
@vatsrahul1001
vatsrahul1001 merged commit 1c8d167 into v3-4-test Oct 31, 2026
49 of 50 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport/75030-to-v3-4-test branch October 31, 2026 07:11
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