[MINOR] kill_process_tree SIGKILL verify timeout too short #32
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?
Problem
After sending SIGKILL in
kill_process_tree, the code sleeps 100ms then verifies processes are dead. On a heavily loaded system, 100ms might not be enough for the kernel to reap all processes, especially if they're in uninterruptible sleep (D state).Impact
kill_process_treemay report partial failures when processes are actually dying but haven't been reaped yet. Or it may miss dead processes that are in D state.Files
crates/my_init_server/src/process.rs--kill_process_treeSuggested Fix
Use a retry loop with exponential backoff (e.g., 10ms, 20ms, 50ms, 100ms, 200ms) instead of a single 100ms sleep.
Fixed 100ms sleep is insufficient under load. Use retry loop with exponential backoff.