What it means
kill sends SIGTERM by default, which a program can catch or ignore. SIGKILL can't be caught, but a process blocked on I/O (state D) only dies when the I/O returns, and a zombie (Z) is already dead and only waits for its parent to collect it.
Causes and fixes
Most likely first. Run the check, and if it matches, apply the fix.
1. The program ignores or mishandles SIGTERM
Check:
ps -o pid,stat,cmd -p <pid>; grep SigIgn /proc/<pid>/status
Fix: Wait a few seconds, then kill -KILL <pid>; fix the program's signal handling.
2. Stuck in uninterruptible I/O (STAT D, often a hung NFS mount)
Check:
ps -o pid,stat,wchan:30,cmd -p <pid>
Fix: Fix the storage or mount it blocks on; a reboot may be the only way.
3. A zombie (STAT Z)
Check:
ps -o pid,ppid,stat,cmd -p <pid>
Fix: Restart or signal its parent so it reaps the child.
Fix it yourself
A live machine in your browser with this problem already on it. The grader checks the result.
Open the labNo account needed for your first tries.
Related errors
- Container takes 10 seconds to stop (exit code 137)
The app never receives SIGTERM, so Docker waits 10 seconds and kills it.