Linux Zombie Processes: Find the Parent and Reap the Child
Confirm Linux process state Z, identify the parent and inspect child cleanup. Distinguish defunct processes from running or blocked GPU workers.
Check the process state before attempting cleanup. Linux reports a zombie as state Z: the child has exited but its parent has not collected its exit status. A live worker or a process in uninterruptible sleep is a different problem. Inspect the parent and its child-reaping path instead of repeatedly signaling the defunct PID.
- Root cause
- An exited child has not yet had its status collected by its parent. A state Z record alone does not identify why the parent failed to reap it.
- Recommended fix
- Correct the owning parent to collect completed children through its process-management API.
- How Denpex helps
- Denpex investigates Linux Zombie Processes: Find the Parent and Reap the Child using the evidence you provide or your connected workload collects. Earlier rank, host or application evidence is needed to distinguish an initiating failure from a downstream report.
What this failure is
A zombie is an exited process awaiting collection of its status. The remaining process-table record can persist even though the child is no longer running.
Is this what broke your run? Paste your log.
You're reading about Linux Zombie Processes: Find the Parent and Reap the Child. Paste your own traceback and relevant evidence for an investigation of your workload, with a next action or a specific missing fact. A reference entry does not establish your cause. No account or card for the free diagnosis. Review data handling before submitting sensitive logs.
Before uploading, review cloud data handling and local options.
Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.
Why it happens (the mechanism)
The parent has not completed the wait or join operation for an exited child. Investigate that parent and its shutdown logic. In Python multiprocessing, queue flushing and join ordering can also leave shutdown waiting, so first establish whether the child has actually exited.
What you'll observe
- Exited child processes remain visible after a workload finishes.
Common symptoms and what they mean
Check possible explanations against the incident evidence. A matching symptom alone does not establish its cause.
| Symptom | Possible explanation |
|---|---|
| State: Z (zombie) in /proc/PID/status | An exited child has not yet had its status collected by its parent. A state Z record alone does not identify why the parent failed to reap it. |
| A defunct child remains associated with a parent PID | An exited child has not yet had its status collected by its parent. A state Z record alone does not identify why the parent failed to reap it. |
Which systems are affected
- Linux process supervisors and POSIX Python multiprocessing applications
How to confirm this is the problem
Use this checklist to test the hypothesis against a small reproduction. No single line proves the root cause, so preserve the preceding events and compare one variable at a time.
- ✓Read /proc/PID/status and record State and PPid.
- ✓Inspect the parent and workload ownership before taking action.
- ✓Distinguish Z from a live process or state D, which indicates an uninterruptible wait.
Root cause
- An exited child has not yet had its status collected by its parent. A state Z record alone does not identify why the parent failed to reap it.
The fix and how to prevent it
How to fix it
- Correct the owning parent to collect completed children through its process-management API.
- In Python multiprocessing, arrange orderly queue consumption and join completed workers; inspect exitcode after a bounded join.
- Coordinate parent-service maintenance with its owner if it cannot reap children. Avoid indiscriminate process killing or host restarts.
How to prevent it
- Exercise normal completion and failure cleanup in the supervisor.
- Keep process ownership and shutdown order explicit.
Save this diagnosis and catch the next crash automatically
All root cause, fix, and prevention steps above are free to read. Create a free account with any email or GitHub to keep your saved diagnosis history across the encyclopedia and run cloud checks, or use a work email below for the 30-day Team evaluation. No card required.
Or start a 30-day free Team trial (work email)
Verified work email unlocks all 14 fleet diagnostic tools, Slack alerts, and team history for 30 days. No card and no automatic charge.
Diagnose your own log automatically
The root cause and fix steps above stay free. Create a free account to analyze full job logs, attribute the first failed rank, and keep saved incident history.
Sign up free. Analyze your cluster logsNo credit card. Daily allowance follows verified trust tier. Instant access.
Why the recommended fix works
Collecting exit status addresses the defunct child record. It does not diagnose a separate live GPU worker or blocked I/O operation.
Code examples
# Read-only Linux checks. Replace 12345 with the observed PID.
cat /proc/12345/status
ps -p 12345 -o pid,ppid,stat,comm
# Inspect the PPid from that output before changing any process.This snippet illustrates the entry-specific check. Verify the installed versions, permissions, target and workload context before using it. A command or API example is not proof of recovery.
Diagnostic note
“This is documentation-based process triage, not a captured Denpex customer recovery. The state signature is not a complete incident log.”
Diagnose this failure in VS Code
Select the traceback or open the failed terminal, then run Denpex locally to inspect matched failure patterns, supporting evidence and next checks without uploading the log. Verify recommendations against your workload before changing production.
Install the free VS Code extensionFrequently asked questions
Questions engineers and on-call staff commonly ask about this failure.
Is a zombie the same as a hung GPU worker?
Don't just read the fix, diagnose your run
The encyclopedia explains documented failure patterns. Denpex investigates your logs, configuration and stack, shows the supporting evidence, and asks for missing details when needed.
Related Reliability errors
GB200 NVL72 driver hang with Xid 150 and 154 after long uptime is a firmware bug, not a dead GPU
Reliability · high
Sequence Length Imbalance Causing Distributed Training Stragglers
Reliability · high
Silent Data Corruption from GPU Hardware Faults Causing Loss Spikes and Model Divergence
Reliability · critical
NIXL Firmware Page Registration Fan-Out Triggers Host OOM Kills on HGX H200 and B200
Reliability · critical