How to kill a process in Linux if kill -9 has no effect

I imagine that kill -9 still just sends a signal to a process. If the process is not behaving well, I would imagine that kill -9 would have no effect. Indeed, today for the first time I saw kill -9 have no effect when sent to a stuck ruby process. So here is my question: Is there some harsher way to kill a process?


You have to reboot the machine. If kill -9 doesn't kill a process, that means it is stuck in the kernel. Unless you can figure out what it's stuck on and unstick it, there's nothing you can do. The reason it's stuck is that it is waiting for something and the logic necessary to cleanly stop waiting simply doesn't exist.

(The above assumes the process has already been reparented to init. Otherwise, its parent may be keeping it around. You may have to kill its parent.)


Every time I have a job that is stuck and signals 9 or 15 won't kill it, I send it signal 30 (SIGPWR) and almost every single time it will clear it out. I can't recall when sending the power outage signal didn't work.