Interview Prep/Linux/Processes, Signals & systemd

Why can't you kill a process in D state?

AdvancedConceptProcesses, Signals & systemd
Answer

Uninterruptible sleep means the task is inside a kernel code path that cannot be safely aborted, typically waiting for a block I/O or NFS reply. Signals, including SIGKILL, are only acted on when it returns to user space. Fix the underlying I/O (failed disk, hung NFS server, stuck multipath) or reboot. cat /proc/<pid>/stack (as root) shows where it is stuck. Newer kernels add TASK_KILLABLE for some paths, so NFS hard mounts may respond to SIGKILL.

All Linux questions Roadmap: Linux

More on Processes, Signals & systemd