Re: kill zombies



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

houghi wrote:
> Lew Pitcher wrote:
>
>>The /proper/ answer to "how can one eliminate a zombie" is to arrange for the
>>zombie's parent process to reap the zombie's termination status. Sometimes, this
>>can be done through a signal to the parent process, but most often it requires
>>that you kill the parent process.
>>
>>There's absolutely no need to reboot, just to get rid of zombies.
>
>
> The parent process is not available anymore in most instances and is
> already killed.

/Not/ if they are zombies.

A zombie is, by definition, a terminated process that hasn't had it's
termination status reaped yet.

There are two ways that a process can get into this situation:
1) the process's living parent hasn't performed a wait() (or family) call to
accept terminations, or
2) the process's parent is dead, and init hasn't yet reaped the zombie process's
termination

Situation #2 happens on occasion, but the interval between an orphan process
terminating and init reaping it's status is extremely small and seldom seen in a
ps listing. The only time it really becomes evident is when your inittab is
misconfigured, and init isn't yet in a state to start reaping process status
values from orphaned processes.

Situation #1 is the most common reason for a zombie process to show up in a ps
listing. Situation #1 also implies that the zombie process's parent process is
still "living" (otherwise the 'zombie' becomes an orphan, and it's termination
status gets reaped by init).

> The only thing you really can do is do a renice on them.

Nonsense. Renice only works on living processes. These zombie processes are
*dead* in all but name, and are never scheduled for execution. Thus, renice does
/nothing/ for them.



- --
Lew Pitcher
IT Specialist, Enterprise Data Systems,
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed are my own, not my employers')
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFDnYyragVFX4UWr64RAtZWAKDjiY6qtec72BVK8G9pL/lVInwOuACguZXS
VGFR/Hc4Nd0PAobjrXfH8b0=
=0lK3
-----END PGP SIGNATURE-----
.



Relevant Pages

  • Re: [opensuse] openSUSE 10.2 - process mono defunct
    ... it so confused that can't die cleanly and turns zombie. ... and whose parent process is still running but has not issued a wait ... system call to retrieve its child's exit status. ... Init _always_ reaps its children or descendants. ...
    (SuSE)
  • Re: python at login on macintels
    ... A Zombie is a process that has terminated and is waiting for its ... after the child process terminates the child process is inherited ... Zombie hang around until its parent process either issues a system ... which allows the zombie to be inherited by 'init', ...
    (comp.sys.mac.system)
  • Re: init + orphaned processes
    ... The PPID is 1, which should allow init ... >> terminate processes it inherits and reclaim ... > This is called a zombie process and is the result of the parent process ... That is not a zombie. ...
    (comp.unix.admin)
  • Re: Finding out what caused a process termination
    ... I have the PID. ... generally 0..255, 0 for successful termination. ... The parent process can ... A large number of apps don't return anything but 0 or 1, ...
    (comp.os.linux.misc)
  • Re: kill zombies
    ... > zombie's parent process to reap the zombie's termination status. ... You are about to enter another dimension, ...
    (alt.os.linux.suse)