Repository navigation
Conversation
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.
4 of 5 tasks
Collaborator
Author
|
Diagnostic read; findings are on #4531. Branch deleted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.