Repository navigation
Bound the backend pytest session so a wedged xdist worker cannot eat the job - #9530
Conversation
…the job --timeout=330 arms inside each xdist worker, so it never fires when the controller is what is stuck. On the #9473 branch this step went silent at 95 percent for 36.8 minutes, three runs running, each burning the full 45 minute budget and reporting cancelled, which reads exactly like ordinary concurrency supersession. Wrap the session in coreutils timeout: SIGINT at 1500s so pytest dumps where it was stuck, SIGKILL 60s later. Reproduced with a test that forks a child that never exits. Unwrapped the run is silent forever and the per-test cap never fires. Wrapped it exits 124 through execnet safe_terminate -> workerpool.waitall, the controller blocked on its workers.
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The gap
studio-backend-ci.ymlalready passes--timeout=330, and its comment states the guarantee:That guarantee did not hold.
pytest-timeoutarms inside each xdist worker, so it is never consulted when the controller is the thing stuck.Evidence
On
fix/appimage-colrv1-runtime-9453,(Python 3.13)reached 95% and then emitted nothing for 36.8 minutes until the 45m job cap cut it:Three runs in a row, and job cleanup terminated three orphan
pythonprocesses each time. Because a timed-out job reportscancelled, this is indistinguishable from ordinary concurrency supersession unless you diff the job duration againsttimeout-minutes.For reference the same lane on
mainfinishes in 11-12 minutes, so this is a hang, not slowness.The change
Wrap the session in coreutils
timeout: SIGINT at 1500s (roughly 3x the 8-10 minute norm, well inside the job's 45), SIGKILL 60s later.Verification
Reproduced with a test that forks a child that never exits, under
-n 2 --timeout=8:execnet/multi.py safe_terminate -> workerpool.waitallThat frame is the controller blocked on its workers, which is why the per-test cap could not help. The dump names a stuck frame, not always a test name, and the comment in the diff says so rather than overpromising.