Unix & Linux: What if 'kill -9' does not work? (13 Solutions!!)
Channel: Roel Van de Paar
Date: 06/08/2020

Unix & Linux: What if 'kill -9' does not work?


The Question: I have a process I can't kill with kill -9 ＜pid＞. What's the problem in such a
case, especially since I am the owner of that process. I thought nothing could
evade that kill option.

Solutions: Please watch the whole video to see all solutions, in order of how many people found them helpful

== This solution helped 32 people ==
It sounds like you might have a http://en.wikipedia.org/wiki/Zombie_process.
This is harmless: the only resource a zombie process consumes is an entry in
the process table. It will go away when the parent process dies or reacts to
the death of its child.
You can see if the process is a zombie by using top or the following command:
ps aux | awk '$8=="Z" {print $2}'

== This solution helped 105 people ==
Sometime process exists and cannot be killed due to:
 * being zombie. I.e. process which parent did not read the exit status.
 Such process does not consume any resources except PID entry. In top it
 is signaled Z
 * erroneous uninterruptible sleep. It should not happen but with a
 combination of buggy kernel code and/or buggy hardware it sometime does.
 The only method is to reboot or wait. In top it is signaled by D.

With thanks & praise to God, and with thanks to the many people who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music: https://www.bensound.com/royalty-free-music | Images: https://stocksnap.io/license & others | With thanks to user xenoterracide (https://unix.stackexchange.com/users/29), user user36035 (https://unix.stackexchange.com/users/36035), user tshepang (https://unix.stackexchange.com/users/688), user nmz787 (https://unix.stackexchange.com/users/221516), user Maciej Piechotka (https://unix.stackexchange.com/users/305), user lepe (https://unix.stackexchange.com/users/41945), user LawrenceC (https://unix.stackexchange.com/users/3389), user Kevin (https://unix.stackexchange.com/users/11750), user Josh (https://unix.stackexchange.com/users/1974), user jlliagre (https://unix.stackexchange.com/users/2594), user Gilles 'SO- stop being evil' (https://unix.stackexchange.com/users/885), user DeveloperChris (https://unix.stackexchange.com/users/3568), user dag729 (https://unix.stackexchange.com/users/529), user Christophe Drevet-Droguet (https://unix.stackexchange.com/users/27599), and the Stack Exchange Network (http://unix.stackexchange.com/questions/5642). Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything is amiss at Roel D.OT VandePaar A.T gmail.com.