MODELDRIFT.WATCH

Question 13 · Sep 12 · Day 3

GPT on Question 13, Sep 12

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

A zombie process is already dead, so neither SIGTERM nor SIGKILL can affect it. It remains in the process table because its parent has not collected its exit status with wait().

  • 1.Confirm it is a zombie (STAT contains Z):
ps -o pid,ppid,stat,cmd -p <PID>
  • 2.Find its parent:
ps -p <PID> -o ppid=
  • 3.Ask the parent to handle terminated children:
kill -SIGCHLD <PPID>

This only helps if the parent has a proper SIGCHLD handler or subsequently calls wait().

  • 4.If the parent is broken, restart or terminate the parent process gracefully:
kill -TERM <PPID>

After the parent exits, the zombie is normally adopted and reaped by init/systemd or another subreaper. Use SIGKILL on the parent only as a last resort, since it may be an important service:

kill -KILL <PPID>

If zombies persist inside a container, its PID 1 may not be reaping children correctly. Use an init wrapper such as tini or Docker’s --init option.

If the process state is D rather than Z, it is not a zombie; it is stuck in uninterruptible kernel sleep, usually waiting on I/O, and requires resolving the underlying kernel/device/filesystem issue.

sha256 26fffb5a692e… · 22 tokens in · 407 out · 6.8 s · via OpenAI · stopped on its own

Sep 12, 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-09-12 09:00:20 UTC (matches the pin)
Date
2026-09-12 · run 20260912T090021Z-c0c86e · scorer v1
Scored
answered
sha256
26fffb5a692e6d35b5e95e3c3336289c87e68cdc064353d96cfa840d6cc8c6ba
Permalink
https://modeldrift.watch/r/2026-09-12/R1/openai/gpt-5.6-sol/
Scored
answered
Received
2026-09-12 09:05:07 UTC
Run
20260912T090021Z-c0c86e
Served by
OpenAI · HTTP 200 · finish stop
Size
1,215 characters · 407 tokens out incl. hidden reasoning · 6.8 s
A zombie process is already dead, so neither `SIGTERM` nor `SIGKILL` can affect it. It remains in the process table because its parent has not collected its exit status with `wait()`.
1. Confirm it is a zombie (`STAT` contains `Z`):
```bash
ps -o pid,ppid,stat,cmd -p <PID>
```
2. Find its parent:
```bash
ps -p <PID> -o ppid=
```
3. Ask the parent to handle terminated children:
```bash
kill -SIGCHLD <PPID>
```
This only helps if the parent has a proper `SIGCHLD` handler or subsequently calls `wait()`.
4. If the parent is broken, restart or terminate the **parent process** gracefully:
```bash
kill -TERM <PPID>
```
After the parent exits, the zombie is normally adopted and reaped by `init`/`systemd` or another subreaper. Use `SIGKILL` on the parent only as a last resort, since it may be an important service:
```bash
kill -KILL <PPID>
```
If zombies persist inside a container, its PID 1 may not be reaping children correctly. Use an init wrapper such as `tini` or Docker’s `--init` option.
If the process state is `D` rather than `Z`, it is not a zombie; it is stuck in uninterruptible kernel sleep, usually waiting on I/O, and requires resolving the underlying kernel/device/filesystem issue.

End of response · 37 lines · 1,215 characters · sha256 26fffb5a692e6d35b5e95e3c3336289c87e68cdc064353d96cfa840d6cc8c6ba