You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(testing): judge::stale treats a zombie pid as alive #6865
judge::stale (plugins/testing/hooks/judge-lib.sh, around line 346) checks a pending marker's pid with kill -0, which succeeds for a zombie. When PID 1 never reaps orphans, as in a container started without --init, a killed job's marker looks alive, and the Stop hook waits out its whole 180 s deadline.
Thanks for the detailed report. I confirmed judge::stale in plugins/testing/hooks/judge-lib.sh (line 346) relies on kill -0 "$pid", which does succeed for a zombie process, so under a non-reaping PID 1 (e.g. a container without --init) a killed job's marker can appear alive and the Stop hook waits out the full 180s deadline. The reproduction evidence (3/3 failures without --init, 0/42 with it) and the suggested fix (checking /proc/<pid>/stat for state Z, falling back to kill -0 where /proc is unavailable) both look sound. No duplicates found. Marked low priority as you noted, since it only costs a wait under this specific condition.
Owner decision (2026-10-13): approved the recommendation.
Is the bug still on main? → Yes. judge::stale treats a same-host holder as dead only when ! kill -0 "$pid" succeeds (judge-lib.sh:369, checked again 2026-10-13). No PR addresses it.
Basis: origin/main plugins/testing/hooks/judge-lib.sh:358-371
Fix shape → When /proc/$pid/stat is readable, take the state character after the last ) and treat Z or X as dead; otherwise fall back to kill -0. Add a regression case to plugins/testing/hooks/test-judge.test.sh that fails before the fix, and bump the version and CHANGELOG.
Next: an agent lane, via admission, opens one PR in plugins/testing; it changes a Stop-hook library, so a human merges it.
Owner batch-ratified this admission in an attended session on 2026-10-12: work-class: scoped. Rule: class C1-C3, no trust surface, the independent check confirmed the recorded decision, and no owner step remains.
Closing as not planned. PR #7544 (merged 2026-10-16) moved the test judge off hooks and removed the test-judge Stop hook scripts this issue fixes; plugins/testing/hooks/judge-lib.sh:1-4 says no hook runs the library now.
The owner approved this close in an attended backlog-shaping session on 2026-10-18 (question: "Close the 9 issues ...?"; answer: "Close all 9 (Recommended)").
Activity
github-actions commentedon Oct 10, 2026
Thanks for the detailed report. I confirmed
judge::staleinplugins/testing/hooks/judge-lib.sh(line 346) relies onkill -0 "$pid", which does succeed for a zombie process, so under a non-reaping PID 1 (e.g. a container without--init) a killed job's marker can appear alive and the Stop hook waits out the full 180s deadline. The reproduction evidence (3/3 failures without--init, 0/42 with it) and the suggested fix (checking/proc/<pid>/statfor stateZ, falling back tokill -0where/procis unavailable) both look sound. No duplicates found. Marked low priority as you noted, since it only costs a wait under this specific condition.Automated triage. A maintainer reviews it.
kyle-sexton commentedon Oct 13, 2026
Owner decision (2026-10-13): approved the recommendation.
! kill -0 "$pid"succeeds (judge-lib.sh:369, checked again 2026-10-13). No PR addresses it.Basis: origin/main plugins/testing/hooks/judge-lib.sh:358-371
Basis: https://pubs.opengroup.org/onlinepubs/9799919799/functions/kill.html; https://man7.org/linux/man-pages/man5/proc_pid_stat.5.html
)and treat Z or X as dead; otherwise fall back to kill -0. Add a regression case to plugins/testing/hooks/test-judge.test.sh that fails before the fix, and bump the version and CHANGELOG.Next: an agent lane, via admission, opens one PR in plugins/testing; it changes a Stop-hook library, so a human merges it.
This was generated by AI.
kyle-sexton commentedon Oct 13, 2026
Owner batch-ratified this admission in an attended session on 2026-10-12: work-class: scoped. Rule: class C1-C3, no trust surface, the independent check confirmed the recorded decision, and no owner step remains.
kyle-sexton commentedon Oct 18, 2026
This was generated by AI during backlog shaping.
Closing as not planned. PR #7544 (merged 2026-10-16) moved the test judge off hooks and removed the test-judge Stop hook scripts this issue fixes;
plugins/testing/hooks/judge-lib.sh:1-4says no hook runs the library now.The owner approved this close in an attended backlog-shaping session on 2026-10-18 (question: "Close the 9 issues ...?"; answer: "Close all 9 (Recommended)").