GPT on Question 13, Sep 26
How do I kill a zombie process in Linux that won't respond to SIGTERM?You can’t kill a zombie process—it has already exited. The remaining process-table entry exists because its parent has not collected its exit status with wait()/waitpid(). Neither SIGTERM nor SIGKILL affects it.
- 1.Confirm it is a zombie and find its parent:
ps -o pid,ppid,stat,cmd -p <PID>
A zombie has Z in the STAT column.
- 2.Ask the parent to reap children:
kill -SIGCHLD <PPID>
This only works if the parent handles SIGCHLD correctly.
- 3.If it remains, restart or terminate the parent process, after checking what it is:
ps -fp <PPID> sudo systemctl restart <service> # preferred for services # or, cautiously: kill -TERM <PPID>
When the parent exits, the zombie is normally adopted and reaped by PID 1 (systemd/init).
If PID 1 fails to reap it, that indicates a system/container-init issue; fixing/restarting the container or rebooting may be necessary. A small number of zombies is usually harmless—they consume only a PID/process-table slot, not CPU or normal process memory.
If the process state is D, not Z, it is not a zombie; it is stuck in uninterruptible kernel I/O and requires diagnosing the underlying disk, network filesystem, or driver issue.
Exact recordShowHideThe model id, the run, the verbatim text with line numbers and its full sha256
- Scored
- answered
- Received
- 2026-09-26 09:04:43 UTC
- Run
- 20260926T090007Z-89c0b7
- Served by
- OpenAI · HTTP 200 · finish stop
- Size
- 1,241 characters · 419 tokens out incl. hidden reasoning · 6.5 s
End of response · 32 lines · 1,241 characters · sha256 510cfef60e007512f9b1b146ad3253a3a1b2487eeae9c36cdbba104b1b7d2361