From: Ori Tzoran <ori_tz@netvision.net.il>
To: Jeff Denham <jdenham@brighttiger.com>,
"Sergey Yu. Bobrovnikov" <sergo@dec1.npi.msu.su>
Subject: Re: Cannot kill <defunct> processes
Date: 1999/02/18 [thread overview]
Message-ID: <36CC80E8.BE8049D5@netvision.net.il> (raw)
In-Reply-To: 36CAE18D.A8AE9476@brighttiger.com
[-- Attachment #1: Type: text/plain, Size: 2429 bytes --]
both postings from Sergey and Jeff are missing the point.
the answer is simple:
when a parent forks a child, the child does an exit (for whatever reason, this may also be an abnormal exit) but the parent doesn't wait(2) on it, the kernel holds the accounting information for the child.
as soon as the parent do one of the wait variants, the kernel releases the PCB for the child and you wont see the defunct anymore.
a defunct is not annoying so much, it doesn't take system resources, except for a slot in the (limited) array of tasks.
if you encounter a pbl with "no more processes", max_task is reached.
you can work around that by setting maxusers higher and wait for your vendor to fix the pbl.
now for some pedagogy, first lets handle Sergey:
you suggest:
> Try to
> # ps -fe | grep 10710
> # kill 10710
>
did you try your idea? it won't work. so what's the point in making a posting?
i saw a similar posting for a question regarding "truss" on DUX: someone says "try one of the CDs" in reply to someone who asks on which CD he can find truss. the latter mentions he searched them...
then Jeff:
> ....
>
> Outside the realm of vampires, you can't kill something that's
> already dead, even a zombie process. That defunct process
> still has a PID and a parent, but that's about it.
well, defunct is EXACTLY a zombie. one is legacy unix term, the other is slang...
>
> If the parent PID of these defunct processes is 1 (the init process),
> then you've hit an OS bug -- init should be cleaning these up.
you wont encounter that....
>
>
> But if the parent isn't PID 1, then the only way to clean them up is
> to kill the buggy parent, which isn't cleaning up its zombie children.
what an interesting idea. mind you, on DUX 4.0x, yppasswdd also leaves a zombie. so kill it too...
>
>
> Most likely, this app was ported from a System V base, where it
> used signal() to set SIGCHLD to SIG_IGN, which causes the system to
> clean up zombies automatically.
>
> Under Tru64 UNIX, formerly known as Digital UNIX, formerly know
> as DEC OSF/1, formerly known as OSF/1, formerly known as
> Mach 2.5, you have to use sigaction() with SA_FLAGS set to
> SA_NOCLDWAIT for SIGCHLD to get the same automatic cleanup
> behavior (or run in the UNIX 95 evironment using,
> of course, the c89 compiler, or link with libsys5). Maybe you
> can pass that on to your vendor.
this is quite interesting, but is a bit aside the issue.
[-- Attachment #2: Type: text/html, Size: 2771 bytes --]
next prev parent reply other threads:[~1999-02-18 5:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7acpii$2df$1@charm.magnus.acs.ohio-state.edu>
1999-02-17 5:00 ` Cannot kill <defunct> processes Sergey Yu. Bobrovnikov
1999-02-18 5:00 ` Gene Homan
1999-02-17 5:00 ` Jeff Denham
1999-02-18 5:00 ` Ori Tzoran [this message]
1999-02-19 5:00 ` Jeff Denham
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox