feat(kvb-org-queue): end a held job whose process tree stands still for 60 min
queue.py hold probes the command's process tree from /proc every poll (standstill.py): the descendants by parent link plus every process still in the command's session, their CPU ticks, rchar/wchar/read_bytes/ write_bytes and the process set. Unchanged for HUNG_SECONDS (3600) it records the stuck processes (pid, comm, state, wchan; never a command line), SIGTERMs the tree and the sessions its members lead, waits KILL_GRACE_SECONDS while recording what appears, SIGKILLs the rest on every pass and exits 124. A tree running docker, podman or ssh, or with a stopped member, is never judged. The history row carries the probe as `hung`, learn() skips such rows, and list marks an active job past three times its longest learned run (at least 30 min) `suspect hung`. Residual: a process that setsids out of the tree and every recorded session between two passes escapes; only a subreaper or a cgroup per job would hold it. 🎯 Fix: 90 % 💥 Break: 5 % 💸 Tokens: 104 % ⏱️ Velocity: 100 % 🛡️ Security: 100 % 🏆 Score: 82 🚦 Gate: ⚠️ tokens 104 % > 100: operator approved the commit (2026-11-15) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b44cac5d37
commit
3d7a83f4d4
7 files changed
+991
-25
No files matched your search
@@ -34,7 +34,11 @@ step inside it, or a process its own ended session left behind, once at least
|
||||
child process, no network traffic, CPU time not moving). It secures the live
|
||||
state first, then reports the timestamp, the step, the probe and the command.
|
||||
A peer's hung job goes to its owner, and to the operator when the owner does
|
||||
not answer.
|
||||
not answer. `queue.py hold` does this itself for a queued job: after 60
|
||||
minutes without CPU, I/O or new process in its tree, no stopped member and no
|
||||
docker, podman or ssh client, it records the stuck processes, ends the tree
|
||||
and exits 124; `queue.py list` marks a run past three times its longest
|
||||
learned one `suspect hung`.
|
||||
|
||||
## Resource watch
|
||||
|
||||
|
||||
Reference in new issue
Block a user