# What if 'kill - 9' does not function?

I have a process I can not kill with kill -9 <pid>. What is the trouble in such a case, specifically given that I am the proprietor of that process. I assumed absolutely nothing can escape that kill alternative.

0
2019-05-13 03:15:55
Source Share

Check your /var/log/kern.log and also /var/log/dmesg (or matchings) for any kind of ideas. In my experience this has actually taken place to me just when an NFS mount is network link has actually instantly gone down or a tool vehicle driver collapsed. Can take place if a disk drive collisions too, I think.

You can make use of lsof to see what tool submits the process has open.

0
2019-05-17 15:54:44
Source

kill -9 (SIGKILL) constantly functions, given you have the approval to kill the process. Primarily either the process has to be begun by you and also not be setuid or setgid, or you have to be origin. There is one exemption : also origin can not send a deadly signal to PID 1 (the init process).

Nonetheless kill -9 is not assured to function quickly . All signals, consisting of SIGKILL, are supplied asynchronously : the bit might take its time to supply them. Generally, supplying a signal takes at the majority of a couple of split seconds, simply the moment it considers the target to get a time piece. Nonetheless, if the target has blocked the signal, the signal will certainly be queued till the target unclogs it.

Generally, procedures can not obstruct SIGKILL. Yet bit code can, and also procedures execute bit code when they call system calls. Bit code obstructs all signals when disturbing the system call would certainly cause a severely created data structure someplace in the bit, or even more usually in some bit stable being gone against. So if (as a result of a bug or misdesign) a system call obstructs forever, there might properly be no other way to kill the process. (But the process will certainly be eliminated if it ever before finishes the system call.)

A process obstructed in a system call remains in uninterruptible sleep. The ps or top command will certainly (on the majority of unices) show it in state D (initially for" d isk", I assume).

A timeless instance of lengthy uninterruptible rest is procedures accessing documents over NFS when the web server is not reacting ; modern-day executions often tend not to enforce uninterruptible rest (as an example under Linux, the intr place alternative permits a signal to disturb NFS documents accesses).

You might occasionally see access significant Z (or H under Linux, I do not recognize what the difference is) in the ps or top result. These are practically not procedures, they are zombie procedures, which are absolutely nothing greater than an access while doing so table, maintained about to make sure that the moms and dad process can be alerted of the fatality of its youngster. They will certainly vanish when the moms and dad process pays attention (or passes away).

0
2019-05-17 15:12:26
Source

If @Maciej is and also @Gilles is solution is do not address your trouble, and also you do not identify the process (and also asking what it is with your distro does not show up solutions ). Look for Rootkit is and also any kind of various other indicators that you've been possessed . A rootkit is greater than with the ability of stopping you from eliminating the process. Actually several can stopping you from seeing them. Yet if they neglect to change 1 tiny program they could be seen (as an example they changed top, yet not htop ). More than likely this is not the instance yet far better secure than sorry.

0
2019-05-17 15:10:14
Source

Sometime process exists and also can not be eliminated as a result of:

• being zombie. I.e. process which moms and dad did not read the exit standing. Such process does not eat any kind of sources other than PID access. In top it is signified Z
• wrong uninterruptible rest. It needs to not take place yet with a mix of buggy bit code and/or buggy equipment it at some time does. The only method is to reboot or wait. In top it is signified by D.
0
2019-05-17 14:51:00
Source

It seems like you could have a zombie process. This is safe : the only source a zombie process eats is an access while doing so table. It will certainly vanish when the moms and dad process passes away or responds to the fatality of its youngster.

You can see if the process is a zombie by utilizing top or the adhering to command:

ps aux | awk '$8=="Z" {print$2}'

0
2019-05-17 14:20:30
Source

Kill in fact suggests send a signal. there are numerous signals you can send. kill - 9 is an unique signal.

When sending out a signal the application manages it. otherwise the kernel manages it. so you can catch a signal in your application.

Yet I claimed kill - 9 was unique. It is unique because the application does not get it. it goes right to the kernel which after that absolutely eliminates the application at the first feasible possibility. to put it simply eliminates it dead

kill - 15 sends out the signal SIGTERM which represents SIGNAL TERMINATE to put it simply informs the application to give up. This is the pleasant means to inform an application it is time to closure. yet if the application is not reacting kill - 9 will certainly kill it.

if kill - 9 does not function it possibly suggests your kernel runs out whack. a reboot remains in order. I can not remember that ever before taking place.

0
2019-05-17 13:48:55
Source

There are instances where also if you send a kill - 9 to a process, that pid will stop, yet the process reactivates instantly (as an example, if you attempt it with gnome-panel, it will reactivate): could that hold true below?

0
2019-05-17 08:23:55
Source

The init process is unsusceptible to SIGKILL.

This is additionally real additionally for bit strings, i.e. "procedures" with a PPID equivalent to 0.

0
2019-05-17 07:49:54
Source