Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Zombie process

Status
Not open for further replies.

prasad5879

Technical User
Oct 13, 2003
14
HK
Hi,

How to deal with Zombie processes, Presently my system is having some zombie processes..
 
Code:
When a child process dies, its parent is notified with a signal called SIGCHLD. The exact mechanics of this are unimportant right now. What is important is that the parent must somehow acknowledge the death of the child. From the time the child dies until the time the parent acknowledges the signal, the child sits in a zombie state. The zombie is not running or consuming CPU cycles; it is merely taking up process table space. When the parent dies, the kernel is finally able to reap the unacknowledged children along with the parent. This means that the only way you can get rid of zombie processes is by killing the parent.


One way to find zombie is to look for the word defunct in the ps -ef command! (ps -ef | grep defunct)

Code:
Subject: 1.153  Why does init not reap its zombie child processes?

If you have lots of zombie (defunct) processes with parent process id 1,
the init process is probably waiting for some bad /etc/inittab
configuration line to finish. Check the inittab file for entries that
specify the wait keyword for processes that do not terminate. These
lines should probably specify "once" or "respawn" instead.


Last time when i had a zombie process, i just went there and killed it but there are some users on the net found difficulties in doing so for some reason like this guy:


As long as you know what caused these zombie processes and you are confident of stopping this from occuring that's fine otherwise i advice you to look for the reason behind your zombies!!!

Good luck and let us know if any further help is needed.

Regards,
Khalid
 
Thank you Kalidaa !!!!

So Only way to get rid of Zombies is either to reboot the machine or to kill the parent process.
 
If there was a defunct process, try killing it and see what happens. (If i remember correctly, i had the defunct process pointing to the init process! so i guess that was an orphan process not a zombie! but all i did is just killing the defunct process and everything was ok!)

otherwise, yes you need to find out the parent process and kill it as described in the links above.

I usually don't like rebooting aix box as sometimes you get stuck by having a production application on it! so i strive to maintain the availability of the box!

Regards,
Khalid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top