Skip to content

[v3-3-test] Fix generate-providers-metadata hang by using spawn pools (#69763)#69784

Draft
github-actions[bot] wants to merge 1 commit into
v3-3-testfrom
backport-5833692-v3-3-test
Draft

[v3-3-test] Fix generate-providers-metadata hang by using spawn pools (#69763)#69784
github-actions[bot] wants to merge 1 commit into
v3-3-testfrom
backport-5833692-v3-3-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

The multiprocessing pools in the providers-metadata generation flow used the
platform-default start method (fork on Linux). Before the pools are created the
parent process has already used GitPython — which opens persistent
git cat-file --batch subprocesses and is not fork-safe — and holds open
network sockets from the version and constraints downloads. Forking that state
into the workers left them with broken inherited file descriptors, so the pool
deadlocked and the command hung forever, most reliably when
--refresh-constraints-and-airflow-releases forces the parent through git and the
network before forking.

Switching these pools to the spawn start method gives each worker a clean
interpreter with no inherited git subprocesses or sockets.
(cherry picked from commit 5833692)

Co-authored-by: Jarek Potiuk jarek@potiuk.com

…#69763)

The multiprocessing pools in the providers-metadata generation flow used the
platform-default start method (fork on Linux). Before the pools are created the
parent process has already used GitPython — which opens persistent
`git cat-file --batch` subprocesses and is not fork-safe — and holds open
network sockets from the version and constraints downloads. Forking that state
into the workers left them with broken inherited file descriptors, so the pool
deadlocked and the command hung forever, most reliably when
--refresh-constraints-and-airflow-releases forces the parent through git and the
network before forking.

Switching these pools to the spawn start method gives each worker a clean
interpreter with no inherited git subprocesses or sockets.
(cherry picked from commit 5833692)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant