[wplug] kill QUESTION -> mount question
Michael Skowvron
skowvron at verizon.net
Fri Jun 25 09:21:13 EDT 2004
Robert E. Coutch wrote:
> Is there a way to get rid of a sleeping or zombie process other than by a
> reboot?
Generally, no. However, zombie processes consume no resources. The
zombie state is when a process has completely terminated and all
resources have been freed except the processes entry in the process
table. This is usually a very short term event, because on exit, the
process sends a signal to the parent indicating that it has terminated
and the parent processes frees the remaining resources.
If the parent process exits before the child, the child may become a
zombie on exit. A process can fork a child and specify whether to
catch or ignore the termination signal from the child. If the process
is forked, SIGCLD is _not_ ignored, and then the parent exits; you've
created a zombie.
Any way you look at it, it's a bug in the parent process. If the
process was supposed to terminate before the child and didn't specify
ignoring the SIGCLD -- it's a bug. Otherwise, the parent must have
exited abmormally which would also be a bug.
You can ignore zombie processes as long as you want. They consume no
resources other than the few bytes that are left in the process table.
They cannot be scheduled, so they cannot consume any CPU.
Perpetually sleeping processes are often caused by bugs in the kernel.
A sleeping prcesses is awaiting for some action to happen in the
kernel before it can proceed. Your kill signal gets posted alright,
but the signal isn't seen by the process until it exits a kernel wait
state. Since it's stuck in the kernel wait state it can never see the
signal and can't be killed.
You have to reboot to clear this condition. Not rebooting may also
lead to even more processes getting stuck.
Michael
More information about the wplug
mailing list