1838243 Members
6149 Online
110125 Solutions
New Discussion

Re: Dead process

 
juno3
Occasional Advisor

Dead process

There are so many defunct processes generated in our system , how to eliminate these process ?
6 REPLIES 6
Alex Lavrov
Regular Advisor

Re: Dead process

Well, kill -9 not always works for defunct processes (zombies), but try it anyway couple of times. You can just sit and wait until they disappear or reboot the system.
Anyway, u must check your system, why there is so many zombies, may be it's caused by some bug in your system or someone just works wrong with it and causes so many defuncts, normally, there must be no defunct proccesess ...

good luck.
Printaporn_1
Esteemed Contributor

Re: Dead process

you need to reboot !
enjoy any little thing in my life
Alex Lavrov
Regular Advisor

Re: Dead process

There is alway reboot option, but maybe after couple of hours (even days) there will be a bunch of defunct processes again.
I suggest to find out the source of these processes, and then reboot.
Bill Hassell
Honored Contributor

Re: Dead process

man glossary

A defunct process is also known as a zombie because it is already dead but the parent failed to handle the chile process correctly. Tow possibilities:

1. Bad programming techniques in starting processes,

2. use of kill -9 indiscriminately

Item 2 is very common to new sysadmins that were told to kill everything with -9 in some Unix-101 class. Nothing could be worse for the stability of the system! kill -9 pulls out the rug from underneath the program, giving the program no chance to handle ope files, unposted buffers, child processes, etc. Never use kill -9! Use kill -15 (or kill with no option which is kill -15 or SIGTERM). If kill -15 doesn't terminate the process, you can then use kill -9 but you'll need to find the reason that the program is ignoring normal kill signals.


Bill Hassell, sysadmin
Michael Steele_2
Honored Contributor

Re: Dead process

You can get more information about the process with lsof.

lsof -p pid

Often times a defunct, or zombie, process will be waiting on some I/O, like with an open file. See if another process also has your defunct process's open file.

Also is you pid using shared memory?

ipcs

Support Fatherhood - Stop Family Law
Adam J Markiewicz
Trusted Contributor

Re: Dead process

Hi

Dead process is most probabilly the fault of the parent, as the parent is oblidget to confirm the childs death.

What can you do is: check the processes parent. If it's not '1' (init) you have a responsible for the whole situation. You can that try to kill it (do not use SIGKILL, try with SIGTERM at the begining). THe processes of the dead parent are 'adopted' by init process. If it adopts zombies - it can remove them.

However if it doesn't help, or if the parent of the zombies is already '1' then you can only reboot.

Good luck
Adam
I do everything perfectly, except from my mistakes