Investigating Zombie Reaping Race Condition #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Location:
crates/chvm-init/src/signal.rs:6-25Issue:
The guest
initspawns a separate reaper thread that waits for SIGCHLD. However, there's a race between:This can result in zombie processes if the child exits before the
sigwait()is active.salmaelsoly referenced this issue2026-02-25 11:38:59 +00:00
This race is no longer an issue. it was fixed in a my-celium PR
block_sigchld()calls sigprocmask(SIG_BLOCK, SIGCHLD) on the main thread, and as its documentation comments says, that it should be called before spawning any children so that SIGCHLD is inherited as blocked by all threads, ensuring the reaper thread can reliably catch it via sigtimedwait.