Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 2014 14:39:17 -0700 (PDT)
From:      "Chris H" <bsd-lists@bsdforge.com>
To:        freebsd-stable@freebsd.org
Subject:   Re: Process handlers, and zombies, or preap(1)
Message-ID:  <f5bfca4537aaca03ef53ae45950ef764.authenticated@ultimatedns.net>
In-Reply-To: <20140331211147.GA52184@anubis.morrow.me.uk>
References:  <20140331211147.GA52184@anubis.morrow.me.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
> Quoth "Chris H" <bsd-lists@bsdforge.com>:
>>  I'm evaluating/experimenting on releng_9. The install, and now
>> custom kernel have noting exotic, or anything out of the ordinary.
>> top(1), and ps(1) indicate a (1) zombie, or <defunct> process. On
>> my releng_8 systems, when I occasionally encounter one of these,
>> they soon disappear (are reaped) from the process table. While I
>> have not investigated this far enough on both versions to determine
>> whether the parent process reaped the child on the releng_8 systems,
>> and the parent on releng_9 is simply an irresponsible parent, eg;
>> a different parent.
>
> What is the parent?

Sorry, that /should/ have been clearer. :)
Meaning; the processes (parents) that are reaping the zombies on releng_8
are different that those I'm seeing on releng_9.
In other words; On releng_8, I see a zombie, then seconds later, it's
gone. On releng_9, I see a zombie, and it never leaves.
Is the "parent" of the dead "child" on releng_9, different than that of
the parent on releng_8. I couldn't possibly expect you to know. But not
having been able to catch the parent process reaping the defunct child
on releng_8, before it has reaped it. I cannot know. Which led me to ask;
Is there anything different on releng_9, that might cause zombies
terminally within the process table?
A bit wordy, perhaps. But makes the point. No? :)

>
>> Before I do, I was wondering if there was any
>> specific difference between the 2 versions that might cause better
>> handling of such situations. While I recognize that resource
>> starvation is HIGHLY unlikely, except by perhaps a rouge parent
>
> A rouge parent? :)

Yes. An unfit parent, that will not watch after it's child(ren). We
have agencies in the US that seek to end such delinquencies. Maybe
FreeBSD could employ such tactics. :)

>
>> spawning multitudes of zombies. I thought it might be useful for
>> "housekeeping" to 1) provide a process table housekeeper (zombie
>> reaper),
>
> That's called init(8). When the parent exits, init will wait for the
> zombie.
>
>> or 2) create a system utility/command like SunOS/OpenSolaris
>> has; preap(1).
>
> That seems like a bad idea, to me. Generally speaking I would expect it
> to be safer to kill and restart the parent, allowing init to do its job.

Maybe. Maybe not. I think it depends on the parent process, and what impact
HUPing it, will have on the system. Tho this should not be an excuse for
not fixing the problem parent. But rather, a stop-gap, until a suitable
fix is created/obtained (for the parent).


Thanks for taking the time to respond, Ben.

--Chris

>
> Ben
>
> _______________________________________________
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f5bfca4537aaca03ef53ae45950ef764.authenticated>