LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to Kill Zombie Process premanently (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-kill-zombie-process-premanently-4175530105/)

suryadubey 01-05-2015 12:33 PM

How to Kill Zombie Process premanently
 
Hi All,

Can any one help me to kill the zombie process permanently in RHEL6 ,tried to kill them by kill -9 PID but they come back immediately

/dev/random 01-05-2015 01:03 PM

You can't kill a zombie process, you can however kill the parent (this doesnt help if the parent is init)

jpollard 01-05-2015 06:06 PM

Quote:

Originally Posted by suryadubey (Post 5295747)
Hi All,

Can any one help me to kill the zombie process permanently in RHEL6 ,tried to kill them by kill -9 PID but they come back immediately

They never went away.

Zombie processes can exist for long terms for two reasons...

1. the process opens some device that is failing, and you aborted the process. The zombie can't terminate until the device (that is failing) releases it. Some network operations can also do this, though they also have a timeout (anything from 10 seconds to about 15 minutes has been seen).

2. the parent process of the zombie either exits, or expects its children to exit and just hasn't gotten around to getting the exit status.

The zombie process that has init (pid 1) as its parent should get cleaned up and removed nearly immediately. The one time this doesn't happen is when it has a kernel operation requested that has failed (or just taking a long time to exit - some network operations can do this).

The purpose of a zombie process to to pass some resources/information back to the parent process. When the parent process (or init) receives the SIGCHLD signal, it can then retrieve the exit status (which releases the process header, and the process vanishes). If you are worried about the process memory, that was already released - only the header remains to provide the exit status (it also has the various utilizations that could be recorded for accounting).


All times are GMT -5. The time now is 03:20 PM.