Interview Prep/Linux/Processes, memory and OOM

`kill -9 <PID>` doesn't kill a process; it stays in state `D`.

IntermediateTroubleshootingProcesses, memory and OOM
Answer

Likely causes → The process is in uninterruptible sleep, waiting on I/O in the kernel (dead NFS server, failing disk, hung storage driver). Signals are only delivered when it leaves that state.

Diagnose →

ps -o pid,stat,wchan:32,cmd -p &lt;PID>
sudo cat /proc/&lt;PID>/stack
dmesg -T | grep -Ei 'hung_task|blocked for more than'

Fix → Fix what it's waiting on: restore the NFS server, umount -f the dead mount, or replace the failing device. If the kernel is stuck, a reboot is the only option.

Prevent → Monitor storage and NFS health; avoid hard NFS mounts on critical paths.

All Linux questions Roadmap: Linux

More on Processes, memory and OOM