potiuk opened a new pull request, #69538: URL: https://github.com/apache/airflow/pull/69538
`test_end_drains_result_queue_to_avoid_join_deadlock` intermittently timed out on the Python 3.14 CI jobs (always the `3.14 Core...Serialization` group, all DB backends). Root cause: Python 3.14 changes the default multiprocessing start method on Linux from `fork` to `forkserver`. The drain logic under test is start-method-agnostic, but a `forkserver` worker is forked from a near-empty server and re-imports the entire airflow stack on every spawn. The throwaway worker this test starts therefore spends seconds in `import airflow` before it writes a single result, and `end()` waits through it — occasionally exceeding the test's `@execution_timeout(10)`. Pinning the worker to the `fork` start method makes it inherit the already-imported parent, write immediately, and reliably reproduce the full-`result_queue` scenario the test guards — as it did before 3.14 changed the default. The production `LocalExecutor.end()` drain path is unchanged (it is correct). Verified on the `main/ci/python3.14` image: the unpatched test reproducibly hangs (~1/50 iterations, 7–12 s each), while the patched test passes 300/300 under the `forkserver` default with every iteration under 0.3 s. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.8) Generated-by: Claude Code (Opus 4.8) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
