Killing a nonexistent process on a UNIX system

I have a process that doesn’t exist on my system:

abc 22093 19508 0 23:29 pts/4 00:00:00 grep ProcA abc 31756 1 0 Dec08 ? 00:00:00 [ProcA_my_collect] <defunct> 

How can I kill the above process without rebooting the machine? I tried with

 kill -9 31756 sudo kill -9 31756 
+48
unix process kill zombie-process
Dec 10 '08 at 16:42
source share
5 answers

You killed a process, but a dead process does not disappear from the process table until its parent process completes a task called reap (essentially calling wait(3) for that process to read its exit status). Dead processes that have not been received are called zombie processes .

The identifier of the parent process that you see for 31756 is the identifier of process 1, which always refers to init . This process should periodically receive its zombie processes, but if it cannot, they will remain zombies in the process table until you reboot.

+39
Dec 10 '08 at 18:07
source share

Have you checked a child process that might need to be killed first? Sometimes a jam up the line ... Try ps -ef --forest

to see what could be lower (if anything) then destroy it first and then the one you already know about

+22
Dec 10 '08 at 17:33
source share

If kill -9 cannot kill the process, the cause is almost always a driver or operating system error.

The init process has accepted this process, but it cannot retrieve it. That is: when init calls wait (2), this process does not return. One of the main goals of init is to reap dead orphans, so the problem is not that his parent died before he was reaped. Think: Otherwise, who gets the results of the nohup'd process after logging out?

Killing children from a non-arising process is unlikely to help if they are somehow not related to the specific mistake you see.

+6
Mar 10 '09 at 12:07
source share

You probably won’t be able to if you don’t allow the parent to be killed. For some reason, systems do not collect this zombie process.

FWIW, I saw this quite a bit in the SCO Openserver kernel, which I used to control. Heavy multi-user use and low system resources, but this did not hurt at all. I was just annoyed. :)

0
Dec 10 '08 at
source share

The process probably freezes, for example. ignoring signals like SIGPIPE, check strace -p <pid> what happens here.

0
Dec 07 '09 at 22:21
source share



All Articles