Investigating Zombie Reaping Race Condition #13

Open
opened 2026-02-22 09:04:15 +00:00 by rawan · 0 comments
Member

Location: crates/chvm-init/src/signal.rs:6-25

Issue:
The guest init spawns a separate reaper thread that waits for SIGCHLD. However, there's a race between:

  1. Main thread spawning a child process
  2. Reaper thread not yet installed signal handlers
  3. Child exiting before reaper reads it

This can result in zombie processes if the child exits before the sigwait() is active.

**Location:** `crates/chvm-init/src/signal.rs:6-25` **Issue:** The guest `init` spawns a separate reaper thread that waits for SIGCHLD. However, there's a race between: 1. Main thread spawning a child process 2. Reaper thread not yet installed signal handlers 3. Child exiting before reaper reads it This can result in zombie processes if the child exits before the `sigwait()` is active.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_code/my_hypervisor#13
No description provided.