MODELDRIFT.WATCH

Question 13 · Sep 27 · Day 18

GPT on Question 13, Sep 27

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

A zombie process is already dead—it has exited, but its parent has not collected its exit status. Therefore, neither SIGTERM nor SIGKILL can remove the zombie directly.

  • 1.Confirm it is a zombie and find its parent:
    ```bash
    ps -o pid,ppid,state,cmd -p <PID>
    ```
    A zombie has state Z.
  • 2.Ask the parent to reap exited children:
    ```bash
    kill -SIGCHLD <PPID>
    ```
    This only helps if the parent handles SIGCHLD correctly.
  • 3.If it remains, gracefully restart or terminate the parent process:
    ```bash
    kill -TERM <PPID>
    ```
    Once the parent exits, the zombie is normally adopted and reaped by PID 1 (systemd/init). Use SIGKILL on the parent only as a last resort, since it may disrupt a service or lose data.

If the parent is PID 1, or zombies persist inside a container, the init process is not reaping children correctly. Restart the container/service and use an init wrapper such as tini or Docker’s --init option.

Also verify the process is not in state D instead. A D process is blocked in uninterruptible kernel I/O and cannot be killed until the underlying I/O operation returns.

sha256 ada54ee50243… · 22 tokens in · 384 out · 5.9 s · via OpenAI · stopped on its own

Sep 27, 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-27 09:00:07 UTC (matches the pin)
Date
2026-09-27 · run 20260927T090007Z-7adb14 · scorer v1
Scored
answered
sha256
ada54ee5024373bd3001e7ebf45cdb498edbee052b9676c60441ccf65f976018
Permalink
https://modeldrift.watch/r/2026-09-27/R1/openai/gpt-5.6-sol/
Scored
answered
Received
2026-09-27 09:04:46 UTC
Run
20260927T090007Z-7adb14
Served by
OpenAI · HTTP 200 · finish stop
Size
1,141 characters · 384 tokens out incl. hidden reasoning · 5.9 s
A zombie process is already dead—it has exited, but its parent has not collected its exit status. Therefore, neither `SIGTERM` nor `SIGKILL` can remove the zombie directly.
1. Confirm it is a zombie and find its parent:
```bash
ps -o pid,ppid,state,cmd -p <PID>
```
A zombie has state `Z`.
2. Ask the parent to reap exited children:
```bash
kill -SIGCHLD <PPID>
```
This only helps if the parent handles `SIGCHLD` correctly.
3. If it remains, gracefully restart or terminate the parent process:
```bash
kill -TERM <PPID>
```
Once the parent exits, the zombie is normally adopted and reaped by PID 1 (`systemd`/`init`). Use `SIGKILL` on the parent only as a last resort, since it may disrupt a service or lose data.
If the parent is PID 1, or zombies persist inside a container, the init process is not reaping children correctly. Restart the container/service and use an init wrapper such as `tini` or Docker’s `--init` option.
Also verify the process is not in state `D` instead. A `D` process is blocked in uninterruptible kernel I/O and cannot be killed until the underlying I/O operation returns.

End of response · 23 lines · 1,141 characters · sha256 ada54ee5024373bd3001e7ebf45cdb498edbee052b9676c60441ccf65f976018