GPT on Question 13, Sep 24
How do I kill a zombie process in Linux that won't respond to SIGTERM?A true zombie process cannot be killed—it has already exited. It remains in the process table because its parent has not collected its exit status with wait().
Confirm it is a zombie (STAT contains Z):
ps -o pid,ppid,stat,cmd -p <PID>
Find its parent:
ps -p <PID> -o ppid=
Possible remedies:
- 1.Ask the parent to process child-exit notifications:
kill -SIGCHLD <PPID>
- 2.Restart or terminate the faulty parent process, if safe:
kill -TERM <PPID> # As a last resort: kill -KILL <PPID>
The zombie will normally be adopted and reaped by systemd/PID 1.
- 3.If the parent is an important service, restart it through its service manager instead:
sudo systemctl restart <service>
SIGKILL sent to the zombie itself will have no effect:
kill -KILL <zombie-PID> # ineffective
If the process state is D rather than Z, it is not a zombie—it is stuck in uninterruptible kernel I/O. Such a process often cannot be killed until the I/O completes or the system is rebooted. In containers, ensure PID 1 runs an init/reaper such as tini or uses --init.
Exact recordShowHideThe model id, the run, the verbatim text with line numbers and its full sha256
- Scored
- answered
- Received
- 2026-09-24 09:01:18 UTC
- Run
- 20260924T090023Z-506a29
- Served by
- OpenAI · HTTP 200 · finish stop
- Size
- 1,179 characters · 417 tokens out incl. hidden reasoning · 6.1 s
A true **zombie process cannot be killed**—it has already exited. It remains in the process table because its parent has not collected its exit status with `wait()`.
Confirm it is a zombie (`STAT` contains `Z`):
```bash
ps -o pid,ppid,stat,cmd -p <PID>
```
Find its parent:
```bash
ps -p <PID> -o ppid=
```
Possible remedies:
1. Ask the parent to process child-exit notifications:
```bash
kill -SIGCHLD <PPID>
```
2. Restart or terminate the faulty parent process, if safe:
```bash
kill -TERM <PPID>
# As a last resort:
kill -KILL <PPID>
```
The zombie will normally be adopted and reaped by `systemd`/PID 1.
3. If the parent is an important service, restart it through its service manager instead:
```bash
sudo systemctl restart <service>
```
`SIGKILL` sent to the zombie itself will have no effect:
```bash
kill -KILL <zombie-PID> # ineffective
```
If the process state is `D` rather than `Z`, it is not a zombie—it is stuck in uninterruptible kernel I/O. Such a process often cannot be killed until the I/O completes or the system is rebooted. In containers, ensure PID 1 runs an init/reaper such as `tini` or uses `--init`.
End of response · 45 lines · 1,179 characters · sha256 938afc5643e739150cc5413098f9cde9968ffe4149320463ca1f2281530ec3c5