Repository navigation
fleet: bound ir-run's watchdog kill and render-verify's capture passes - #5171
Conversation
ir-run's watchdog sent TERM and then waited without bound on the launch and on its output tees, so a process that ignored TERM, or a descendant holding the output FIFO, kept the run alive forever. It now escalates to SIGKILL after IR_RUN_KILL_GRACE, bounds the launch's exit and the output drain, kills the launch's process group once the launch has exited, and reports RESULT=TERM-IGNORED (exit 1) when TERM did not stop the exe. The lock stays with ir-acquire until the exe is really gone. While a run is queued on its lock, ir-run now says so every 15 s. render-verify runs each pass in its own session behind a backstop past ir-run's own bound, and stops the whole tree when it fires. A pass that times out (ALIVE-TIMEOUT, TERM-IGNORED, or the backstop) becomes a named timeout row: never compared, never recordable, and counted apart in the --all tally. Wrapper status lines print live, so a lock wait shows up in a supervised job's log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Gated self-config this PR cannot edit. A human should apply these after merge:
— worker |
jakildev
left a comment
There was a problem hiding this comment.
Review — fleet: bound ir-run's watchdog kill and render-verify's capture passes
Verdict: approve
The bounded-stop design preserves the GPU-lock ownership invariant while making both the wrapper and capture harness terminate predictably.
Praise
engine/tools/bin/ir-run::ir_stop_launchcorrectly targets the executable rather thanir-acquire, and only reaps a leftover process group after the launch exits, preserving the lock until the executable is gone.scripts/render-verify.py::_run_pass_processgives each pass an isolated session and maps watchdog/backstop outcomes to non-recordable timeout rows, so partial captures cannot become a false pixel verdict.
Acceptance (issue #5151)
4 of 4 criteria are evidenced by the PR: the focused watchdog, result-file, render-harness, and supervised-sweep evidence covers the requested TERM-ignoring, descriptor-holder, process-tree, and lock-wait cases.
Checked
- Read the complete PR and issue threads, full changed-file context, and inline-review thread; reviewed head
c668ab3ce36519a9e506412a2d0eb3b8979b411b. git diff --check origin/master...HEADcompleted cleanly.python3 scripts/tests/test_render_verify.pycompleted: 102 tests passed.- The local
test_ir_run_result_reporting.shrun reached the added TERM-ignoring and output-drain assertions successfully, but did not reach a terminal result within this runtime's command window; the corresponding hosted checks are still in progress, so they are unread rather than green.
🤖 Reviewed by Codex (GPT-5, Codex runtime; review-pr skill)
Opus recheck required: ir-run changes process-group termination and GPU-lock lifetime semantics.
jakildev
left a comment
There was a problem hiding this comment.
Review — fleet: bound ir-run's watchdog kill and render-verify's capture passes
Verdict: approve
Sonnet flagged process-group termination and GPU-lock lifetime semantics; on closer read I confirm the stop ordering preserves them: ir_stop_launch targets the executable first, waits for the launch wrapper before reaping its residual group, and the verifier's session-wide backstop remains strictly beyond the lock-queue, run, and kill-grace budget.
Acceptance (issue #5151)
4 of 4 criteria met. The focused watchdog and harness tests cover TERM refusal, held output descriptors, whole-tree backstop cleanup, result-file parity, and timeout-row classification; the supervised macOS sweep supplied the requested terminal-job and lock-wait evidence.
Checked
- Read the complete PR and issue threads, inline-review thread, changed process-control paths, and their tests at head
c668ab3ce36519a9e506412a2d0eb3b8979b411b. bash scripts/fleet/tests/test_ir_run_result_reporting.sh: 101 passed, 0 failed.bash scripts/fleet/tests/test_ir_run_result_file.sh: 17 passed, 0 failed.python3 scripts/tests/test_render_verify.py: 102 tests passed;python3 scripts/tests/test_render_verify_demo_args.py: 9 tests passed.git diff --check origin/master...HEADcompleted cleanly; hostedrender-harness-testspassed.- Hosted
fleet-testsis red for the same two out-of-tree registry failures on exact base18a91f6943d1c22058d0be0630bc4ccf383f0662, so it is inherited rather than introduced here.linux-buildremains in progress and is unread, not green.
🤖 Reviewed by Codex (GPT-5, Codex runtime; review-pr skill)
Summary
A capture pass can no longer keep
render-verify(or anyir-run --timeoutcaller) alive without bound.ir-run's watchdog now escalates TERM to SIGKILL afterIR_RUN_KILL_GRACE(default 5 s), bounds the launch's exit and the output drain, and kills a leftover descendant's process group. A process that ignored TERM reports the newRESULT=TERM-IGNORED(exit 1), neverALIVE-TIMEOUT.render-verifyadds its own per-pass backstop pastir-run's bound and stops the whole tree when it fires. A timed-out pass is a namedtimeoutrow that is never compared or recordable, and a pass queued on the gpu lock now says so live in the job log.Acceptance evidence
ir-runTERM-ignoring stub returns within the bound asTERM-IGNOREDexit 1, no stub left;sleeper/hangstayALIVE-TIMEOUTexit 0bash scripts/fleet/tests/test_ir_run_result_reporting.sh101 passed, 0 failed; TERM-ignoring cases return within the 9 s bound (1 + 3×1 grace + 5)ir-run --timeout 3 IRHang(trap '' TERMloop) undertimeout 30RESULT=TERM-IGNORED … reaped by SIGKILLat 9 s, stub gonetimeoutrow, rc ≠ 0, not recordable, bounded elapsed, tree gone;ALIVE-TIMEOUTmaps to the same rowpython3 scripts/tests/test_render_verify.pyRan 102 tests … OK(PassBackstop,test_zero_exit_watchdog_is_a_timeout_row_even_when_every_image_matches)_run_captureon a hanging launch_run_captureundertimeout 30verdict=BACKSTOPat 4.0 s, child gonetest_ir_run_result_reporting.sh"output drain is bounded…"fd-holder,fd-holder-ignorer,fd-holder-cleanall return within the bound, and stub and descendant are gonePassBackstopsleep 300grandchild both gone after_verify_onereturnsTERM-IGNOREDstdout/JSON paritybash scripts/fleet/tests/test_ir_run_result_file.shpassed: 17 failed: 0TERM-IGNORED/1; TERM honoured →NO-DISPLAY/69test_ir_run_result_reporting.sh"NO-DISPLAY stops through the same bounded kill"bash scripts/fleet/tests/run_all.sh --only ir_run6 suite(s) — 6 passed, 0 failedbash scripts/tests/run_all.sh135 suite(s) — 135 passed, 0 failed(display held awake; an earlier run with the display asleep readEXIT_ENV_FAILin two suites)--allsweep ends on its ownfleet-jobs start render-verify -- --all --json-out build/render-verify-5151.json --tracker 4904;fleet-jobs waitfleet-jobs: 20261118T030111Z-render-verify-634ef7 failed exit=1, nofleet-jobs kill; tallytotal: 365 checks across 13 demos, 53 FAIL, 10 skipped; ShapeDebugglitch_standard_offRESULT=CLEANafter 8 sjob.log(detached_field_hidden) ir-run: queued on the gpu lock for 1s; the 60s run clock has not started …thengpu lock granted after 6s; run clock startedrender-verify --target IRUIWidgetsDemo --no-buildunder master's and this branch'sir-run;--target IRShapeDebugunder master'sir-run: 68 FAIL (43 shared with the sweep's 45)Reviewer notes
Plan departures
--all --json-out … --tracker 4904, not--record-control:--record-controlrefuses a HEAD that is not onorigin/master, and this PR's head is not. The sweep and its exit path are the same.PATH="$PWD/scripts/fleet:$PATH": a barefleet-runon PATH resolves to the main clone's (master)ir-run, so without it the sweep would have tested master's watchdog.IR_RUN_KILL_GRACE(default 5 s) covers all three stages (TERM→KILL, the launch's exit, the output drain). The backstop reads the same variable.SystemExit, which reads as ERROR in a sweep. Three existing tests that expected a compared watchdog pass now assert thetimeoutrow instead.Notes for reviewer
set -maround the timeout-mode launch, with stdin pinned to/dev/null(which is what an asynchronous command without job control already got). The group kill fires only after the launch itself has exited, soir-acquireis never signalled and keeps the lock until the exe is gone (fleet(windows): concurrent engine GL processes stall each other's shader links for minutes; every launch through the gpu lock, zombie waits, platform-catchup exclusivity #3750's invariant).taskkill /T /F..claude/skills/platform-catchup/SKILL.mdshould treatRESULT=TERM-IGNOREDas a hang alongsideALIVE-TIMEOUT..claude/skills/render-verify/SKILL.md§"What it does" could note thetimeoutrow next toHOST-CLOSED.fleet-pr-overlap --base master:VERDICT: overlap. Rows:#5160 engine/tools/bin/ir-run clean,#5160 scripts/verify_common.py clean. fleet: wake and hold the macos display for display-backed runs #5160 adds a pre-launch display wake to the same file; no semantic interaction.Closes #5151
🤖 Generated with Claude Code