5 ms·
> When I kill -9 in Linux, the application is dead, gone... doesn't hang, doesn't sit there frozen. Wrong. If a Linux process is blocked in an uninterruptible
by agwa 9y ago
> When I kill -9 in Linux, the application is dead, gone... doesn't hang, doesn't sit there frozen.
Wrong. If a Linux process is blocked in an uninterruptible system call (typically for disk I/O), it cannot be killed, even with -9.
I have been unable to cleanly shut down Linux systems in the past due to processes getting stuck in this state.
- joshstrange 9y agoThis 10000X over. I have an SSD that I have to assume is bad that had abyssal read/write speeds due to processes constantly getting stuck in state D when they touched it. It would bring the system to its knees with load averages 40+ while my 8c/16t CPU would be sitting there doing nothing.
- pritambaral 9y ago`kill -9` on a process blocked on a syscall does kill the process, it just doesn't clean the process up. The result of SIGKILL-ing (i.e., killing with -9) a blocked process is a zombie process. Zombies are dead, right?
- pjc50 9y agoWith a suitably wedged NFS process I believe you can get a process that is stuck in D even if you `kill -9` it.
- dozzie 9y agoYou're right, signal delivery does not interrupt an atomic operation, so if a syscall takes unusually long time (like network filesystems sometimes cause), the process hasn't received its SIGKILL yet.
- kl4m 9y agoI don't remember ever seeing Linux create a Zombie(Z) when a process is KILLed while in the (D) state. It just stays alive, stuck in D state.
- agwa 9y agoA zombie is a process which has terminated but has not been waited for by its parent. SIGKILLing a process blocked in an uninterruptible system call does not create a zombie.