[plug] Killing resident zombies and other undesirables

Matt Kemner zombie at wasp.net.au
Tue Apr 10 11:08:04 WST 2001


Killing Zombies?
Why, what have we ever done to you? *grin*

On Tue, 10 Apr 2001, Bill Kenworthy wrote:

> Hi, I am currently having some problems with staroffice.  The following
> shows related processes running.  All attempts at kill -9, killall,
> logging out, using kill as root, going back and forward to init 3 & 5
> (had a display crash some days ago and this is the only way it would
> startup X again!)  I cannot restart staroffice whilst these processes
> are hanging around.

Zombie processes are processes which have died, are no longer taking up
any resources and only exist in the process table because their parent
process hasn't reaped them yet.  The easiest way to get rid of them, is to
kill their parent process, which will cause the zombies to be reaped by
init.  

Also, it is more likely that the parent process is the one that is
blocking the resources you are trying to access, because the definition of
a zombie process is that it does not really exist, only in the process
table.

eg say I have the following Zombie process:

USER PID %CPU %MEM  VSZ  RSS TTY STAT START TIME COMMAND
user 9427 0.6  0.0    0    0 ?      Z 10:54 0:00  [cucipop <defunct>]

to find out the parent process we use ps l
# ps l 9427
  F UID   PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND
144 10821 9427 207   1  0   0   0  exit    Z   ? 0:00 [cucipop <defunct>]

this shows the Parent PID is 207

# ps u 207
USER PID %CPU %MEM  VSZ  RSS TTY STAT START TIME COMMAND
root 207  0.0  0.0 1440  124 ?      S  2000 10:51 /usr/sbin/cucipop -Ya

In this case I would kill 207, which should fix the problem.
Note that in the case of cucipop, there are always a couple of zombie
processes floating around, which according to the documentation is
intentional because it's "faster that way" - presumably because they don't
want to have to SIGCHLD constantly.

 - Matt




More information about the plug mailing list