MODELDRIFT.WATCH

Question 13 · Oct 3 · Day 24

GPT on Question 13, Oct 3

How do I kill a zombie process in Linux that won't respond to SIGTERM?

A zombie process cannot be killed, even with SIGKILL, because it has already exited. It remains only as an entry in the process table until its parent reads its exit status.

1. Confirm it is a zombie

ps -o pid,ppid,state,cmd -p <PID>

A state of Z means zombie.

2. Find and notify its parent

Note the PPID, then ask the parent to reap exited children:

kill -SIGCHLD <PPID>

Whether this works depends on the parent program’s signal handling.

3. Restart or terminate the parent

If the zombie remains, restart the parent service:

sudo systemctl restart <service>

As a last resort, terminate the parent:

kill -TERM <PPID>
# If it still does not exit:
sudo kill -KILL <PPID>

This can disrupt the service and its other child processes. Once the parent exits, the zombie is normally adopted and reaped by PID 1 (systemd/init).

To list zombies and their parents:

ps -eo pid,ppid,state,cmd | awk '$3 == "Z"'

If the process state is D, not Z, it is blocked in uninterruptible kernel I/O and is a different problem; signals usually take effect only after the I/O returns.

sha256 8f83b06b366e… · 22 tokens in · 393 out · 5.5 s · via OpenAI · stopped on its own

Oct 3, the whole dayQuestion 13, every day

Exact recordShowHideThe model id, the run, the verbatim text with line numbers and its full sha256
Model
openai/gpt-5.6-sol
pinned openai/gpt-5.6-sol-20260709; alias resolved to openai/gpt-5.6-sol-20260709 at 2026-10-03 09:00:07 UTC (matches the pin)
Date
2026-10-03 · run 20261003T090008Z-b2d35e · scorer v1
Scored
answered
sha256
8f83b06b366e31ed79c1f49fb92eda0d86b13d76e85677f9bcf60cf6b9dd84f9
Permalink
https://modeldrift.watch/r/2026-10-03/R1/openai/gpt-5.6-sol/
Scored
answered
Received
2026-10-03 09:04:37 UTC
Run
20261003T090008Z-b2d35e
Served by
OpenAI · HTTP 200 · finish stop
Size
1,165 characters · 393 tokens out incl. hidden reasoning · 5.5 s
A **zombie process cannot be killed**, even with `SIGKILL`, because it has already exited. It remains only as an entry in the process table until its parent reads its exit status.
### 1. Confirm it is a zombie
```bash
ps -o pid,ppid,state,cmd -p <PID>
```
A state of `Z` means zombie.
### 2. Find and notify its parent
Note the `PPID`, then ask the parent to reap exited children:
```bash
kill -SIGCHLD <PPID>
```
Whether this works depends on the parent program’s signal handling.
### 3. Restart or terminate the parent
If the zombie remains, restart the parent service:
```bash
sudo systemctl restart <service>
```
As a last resort, terminate the parent:
```bash
kill -TERM <PPID>
# If it still does not exit:
sudo kill -KILL <PPID>
```
This can disrupt the service and its other child processes. Once the parent exits, the zombie is normally adopted and reaped by PID 1 (`systemd`/`init`).
To list zombies and their parents:
```bash
ps -eo pid,ppid,state,cmd | awk '$3 == "Z"'
```
If the process state is `D`, not `Z`, it is blocked in uninterruptible kernel I/O and is a different problem; signals usually take effect only after the I/O returns.

End of response · 45 lines · 1,165 characters · sha256 8f83b06b366e31ed79c1f49fb92eda0d86b13d76e85677f9bcf60cf6b9dd84f9