GPT on Question 13, Sep 30
How do I kill a zombie process in Linux that won't respond to SIGTERM?A zombie process cannot be killed—not even with SIGKILL—because it has already exited. It remains only as an entry in the process table until its parent collects its exit status.
Confirm it is a zombie (STAT contains Z):
ps -o pid,ppid,stat,cmd -p <PID>
Find and inspect its parent:
ps -p <PPID> -o pid,stat,cmd
Then use one of these approaches:
- 1.Restart the parent service (preferred):
```bash
sudo systemctl restart <service>
```
- 2.Ask the parent to terminate gracefully:
```bash
kill -TERM <PPID>
```
- 3.As a last resort, kill the parent:
```bash
sudo kill -KILL <PPID>
```
The zombie should then be adopted and reaped by PID 1. Be cautious: killing the parent may disrupt other processes.
If the process state is D rather than Z, it is in uninterruptible sleep—usually waiting on I/O—and cannot be killed until the kernel operation completes; resolving the underlying disk, network filesystem, or device problem may be necessary.
A persistent accumulation of zombies generally indicates a bug in the parent program: it is failing to call wait()/waitpid() or handle SIGCHLD.
Exact recordShowHideThe model id, the run, the verbatim text with line numbers and its full sha256
- Scored
- answered
- Received
- 2026-09-30 09:05:14 UTC
- Run
- 20260930T090007Z-45ce12
- Served by
- OpenAI · HTTP 200 · finish stop
- Size
- 1,172 characters · 399 tokens out incl. hidden reasoning · 5.4 s
End of response · 35 lines · 1,172 characters · sha256 1ead9e70da5dd0ab1252ae7480fdcbc85f4d4037d2a3ac76179e0a31f49fe2b8