Gemini gave a longer answer than usual to a question about killing a stuck process in Linux, about 1.4 times its usual length.
GeminiSep 14
How do I kill a zombie process in Linux that won't respond to SIGTERM?440 wordsin its answer. From Sep 10 to 14 its answers ran between 405 and 491 words.
The reason the zombie process won't respond to SIGTERM (or even SIGKILL / kill -9) is because a zombie process is already dead.In Linux, a zombie is a process that has finished executing, but its parent process…
GeminiSep 15
How do I kill a zombie process in Linux that won't respond to SIGTERM?640 wordsin its answer, about 1.4 times its usual length.
The short answer is: You cannot kill a zombie process because it is already dead.This is why it won't respond to SIGTERM (or even SIGKILL / kill -9).A "zombie" (defunct) process is simply an…
Why it’s minor
A much shorter or longer answer can mean a changed model, or only a different way of saying the same thing; the two answers are here to compare.
The full answers
Each answer as the API returned it, with its Markdown rendered for reading. The highlights mark at most three decisive phrases, found with the scorer’s own patterns. Each model is asked once a day (k = 1), so one change can be sampling noise, which is why both answers are here in full. How scoring works.
Asked verbatim · Question 13
SEP 14beforePermalink
The reason the zombie process won't respond to SIGTERM (or even SIGKILL / kill -9) is because a zombie process is already dead.
In Linux, a zombie is a process that has finished executing, but its parent process hasn't read its exit status yet. Because it is already dead, you cannot kill it directly.
To get rid of a zombie, you have to target its parent process. Here is the step-by-step way to do it:
Step 1: Find the Parent Process ID (PPID)
First, you need to find out which process spawned the zombie. Run this command, replacing <ZOMBIE_PID> with the ID of your zombie process:
ps -o pid,ppid,state,cmd -p <ZOMBIE_PID>
Look at the PPID column. That is the Parent Process ID.
(If you don't know the zombie's PID, you can list all zombies and their parents using: ps -A -ostat,pid,ppid,cmd | grep -e '^[Zz]')
Step 2: Notify the parent (The polite way)
Sometimes, the parent process just needs a reminder to clean up its dead children. You can send a SIGCHLD signal to the parent process. This tells the parent, "One of your children died, please collect its exit status."
kill -s SIGCHLD <PPID>
Check if the zombie is gone. If it is, you are done.
Step 3: Kill the parent (The forceful way)
If the parent process is poorly written or completely frozen, it will ignore the SIGCHLD signal. In this case, your only option is to kill the parent process.
When a parent process dies, all of its children (including zombies) are adopted by init or systemd (PID 1), which automatically cleans up zombie processes.
⚠️ WARNING: Before you do this, check what the parent process is. If it's a critical service (like a database or a web server), killing it will take that service offline. Never try to kill PID 1.
If it is safe to kill the parent, try asking it to close gracefully first:
kill -15 <PPID>
If the parent doesn't respond, force kill the parent:
kill -9 <PPID>
Once the parent dies, the zombie process will immediately disappear from your process table.
What if the Parent is PID 1?
If you look at the PPID in Step 1 and it is 1 (systemd or init), it means the system's main process has adopted it but is failing to reap it. This is incredibly rare and usually indicates a bug in the kernel or a process stuck in un-interruptible hardware sleep (often caused by a failing hard drive or bad network mount). In this scenario, the only way to clear the zombie is to reboot the server.
SEP 15afterPermalink
The short answer is: You cannot kill a zombie process because it is already dead.
This is why it won't respond to SIGTERM (or even SIGKILL / kill -9).
A "zombie" (defunct) process is simply an entry in the process table. The process itself has already finished executing and released its memory. It is just waiting for its parent process to acknowledge its death (by reading its exit status). If the parent process is poorly programmed or frozen, it never acknowledges the child's death, leaving the zombie in the process table.
To get rid of a zombie, you don't kill the zombie—you kill the parent process.
Here is the step-by-step guide to removing it:
Step 1: Confirm it is actually a zombie
First, make sure it is a zombie (State Z) and not a process stuck in uninterruptible sleep (State D). Run:
ps aux | awk '{ print $8 " " $2 }' | grep -w ZIf you see your Process ID (PID) listed next to a Z, it is a zombie. If it has a D instead, see the note at the bottom of this answer.
Step 2: Find the Parent Process ID (PPID)
You need to find out which process spawned the zombie. Run this command, replacing <zombie_pid> with the ID of your zombie process:
ps -o ppid= -p <zombie_pid>
This will output a single number. That number is the Parent Process ID (PPID).
(Alternatively, you can use pstree -p -s <zombie_pid> to see a visual tree of the process).
Step 3: Nudge the Parent Process
Before killing the parent, you can try sending it a SIGCHLD signal. This signal tells the parent, "Hey, one of your children died, you need to clean it up."
kill -s SIGCHLD <ppid>
Note: This rarely works because if the parent was going to respond to this signal, it wouldn't have created a zombie in the first place. But it is harmless to try.
Step 4: Kill the Parent Process
If step 3 doesn't work, you must kill the parent process.
Warning: Make sure you know what the parent process is before you kill it! If the parent is a vital service (like nginx or mysql), killing it will stop that service. You can check what the parent is by running ps -p <ppid>.
If you are okay with killing the parent, run:
kill -15 <ppid>
If the parent also refuses to die, force kill it:
kill -9 <ppid>
What happens next?
When the parent dies, the zombie process becomes an "orphan." The Linux kernel automatically assigns all orphans to the init or systemd process (PID 1). PID 1 is explicitly programmed to immediately clean up and clear out zombie processes. The zombie will instantly disappear.
Exception: What if the Parent is PID 1?
If you check the PPID in Step 2 and the number is 1, you cannot kill the parent (killing PID 1 will crash your system). At this point, the only way to clear the zombie from the process table is to reboot the machine. Fortunately, zombies use absolutely zero system resources (CPU/RAM); they just take up one slot in the process ID table, so it is perfectly safe to just ignore them until your next scheduled reboot.
A Common Mix-Up: State "D" (Uninterruptible Sleep)
Often, people have a process that is frozen, refusing to die via kill -9, and they assume it is a zombie. If you check the process state in top or ps and it has a D instead of a Z, it is not a zombie.
State D means the process is stuck waiting for hardware I/O (usually a failing hard drive, or a disconnected NFS network drive). To fix a D state process, you must fix the hardware/network issue it is waiting on, or reboot the server. You cannot kill it.
Exact recordShowHideEach response verbatim, unrendered, with line numbers and its sha256
Before baseline
2026-09-14 permalink
- Scored
- answered
- Received
- 2026-09-14 09:06:06 UTC
- Run
- 20260914T090022Z-e98262
- Served by
- Google · HTTP 200 · finish stop
- Size
- 2,514 characters · 1,659 tokens out incl. hidden reasoning · 15.5 s
End of response · 45 lines · 2,514 characters · sha256 82220d6bf8e0a6f2f036e116c1f8fcaf335fb4e2069faa5ea8d8982d56753a02
After this run
2026-09-15 permalink
- Scored
- answered
- Received
- 2026-09-15 09:06:01 UTC
- Run
- 20260915T090004Z-599f39
- Served by
- Google · HTTP 200 · finish stop
- Size
- 3,633 characters · 2,022 tokens out incl. hidden reasoning · 17.1 s
End of response · 61 lines · 3,633 characters · sha256 a2c45b65997941cbc39ecc08ef0cb13cd83c20c73a8090820b2aeb8303a58d25
Record detailsShowHideModel version, runs, baseline, triage, permalink, event ID
Every morning, what moved on the model you depend on, what it means for you, and what to check.
$9 a month. Cancel any time. The next one tomorrow morning.
Get the daily brief$99 once, for as long as modeldrift.watch runs. The first 100 buyers.
The record stays free. The brief is the reading of it.