lkml.org 
[lkml]   [2004]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: is killing zombies possible w/o a reboot?
DervishD wrote:
> Hi Bill :)
>
> * Bill Davidsen <davidsen@tmr.com> dixit:
>
>>> I think that the parent (which is whatever process did the fork
>>>when you clicked your mouse) is still alive and forgetting to do the
>>>'wait()' for its children.
>>
>>It would be good to know what the PPID is, from ps or similar. Things
>>from X are a pain, the parent is often something you don't want to kill.
>>Sometimes you can reparent from command line, "bash -c foo&" or similar,
>>so the parent can be killed without logging out.
>
>
> Just use ps to reveal the family tree. Is not that hard ;)

That's what I just said, the original poster should tell us what the
PPID is, which may help someone help the OP.
>
>
>>I would swear that the parent *is* init in some cases, which is puzzling
>>since they should be reaped.
>
>
> But that's OK :))) When a parent dies without waiting for its
> children, the zombies are reparented to init. That's correct. Then
> init will wait for them. The problem is that sometimes the signals
> doesn't arrive or the like. Then the zombies are laying around a bit,
> until a timer in 'init' reaps them. That's correct too: init can only
> wait for children when it receives SIGCHLD or periodically, using a
> timer. I've written a init program and that's the way I do it, just
> in case some signal gets lost.
>
> If init is the parent, all works ok, just wait a bit and all
> those zombies will really die ;)

Actually the ones in i/o probably won't, since the kernel either missed
the completion or didn't time out if the hardware missed sending the
int. And even plain non-i/o zombies, just how long "a bit" are you
proposing?

Over Thanksgiving weekend I will try to look at the init code and see if
a signal could be used to initiate a forced reap without waiting for the
timer. By "look at" I mean not only "could I do that" but is it a good
thing to do, before someone starts trying to explain that it's going to
do something evil not to wait for the timer...

--
-bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.012 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site