Skip to content

test(sandbox): TEMPORARY reaper diagnostic, do not merge - #4561

Closed
larryro wants to merge 4 commits into
mainfrom
fix/reaper-exec-window-diag
Closed

larryro wants to merge 4 commits into
mainfrom
fix/reaper-exec-window-diag

Conversation

@larryro

@larryro larryro commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Throwaway diagnostic for the exec-completion failure seen on #4445 (Checks runs 37752204357 and 37782005524). Runs the setsid-survivor scenario 12 times on the CI runner and fails on purpose with a report of which signals reached the survivor and when. Will be closed and the branch deleted once read. Not for merge.

The reaper finds a process that left an exec's group by the exec id in its
environment. A process in the middle of an execve has no environment to
read: from the moment the new image's memory replaces the old until its
arguments and environment are laid out, the kernel answers an empty one
(a probe reading /proc/<pid>/environ of a process that execs in a loop got
an empty answer in 3,341 of 20,000 reads). A leftover is often right there
when a round comes: `cmd &` and the command's exit are an instant apart,
and `setsid cmd` is two execs. The SIGTERM round counted such a process as
untagged and skipped it; only the SIGKILL round, SIGKILL_GRACE_MS later,
ended it.

That is how exec-completion.test.ts failed on CI (#4445, Checks run
37752204357): its final barrier gave the reaper five seconds to end the
`setsid sleep 60` a finished exec left, and the SIGKILL round came a few
milliseconds after that. The test now waits for the reaper's own bound (the
SIGKILL grace plus the scan deadline), and the scan reads an empty
environment again, four times ten milliseconds apart, before the process
counts as untagged; a process whose environment really is empty costs a
scan that long.

No user-visible change: no messages, docs under docs/ or READMEs.
@larryro

larryro commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator Author

Diagnostic read; findings are on #4531. Branch deleted.

@larryro larryro closed this Oct 8, 2026
@larryro
larryro deleted the fix/reaper-exec-window-diag branch October 8, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant