Re: is killing zombies possible w/o a reboot?

From: DervishD (lkml_at_dervishd.net)
Date: 11/10/04

  • Next message: Antonino Sergi: "Re: isa memory address"
    Date:	Wed, 10 Nov 2004 10:11:16 +0100
    To: Bill Davidsen <davidsen@tmr.com>
    
    

        Hi Bill :)

     * Bill Davidsen <davidsen@tmr.com> dixit:
    > > Probably it won't do. If the zombies are there due to a signal
    > >delivery problem, sending a SIGCHLD to the parent will (probably)
    > >solve the problem. But the common case is that the parent is screwed
    > >up or simply so badly programmed that the only way of getting rid of
    > >the zombies is to kill the parent...
    > Wait a minute, in another message you just suggested that a SIGCHLD to
    > init would cause the status to be reaped.

        I don't consider init the parent of such processes. It just
    'adopts' them when the real parent doesn't care for them. I was
    talking, in the paragraph above, about the *real* parent. I don't see
    any contradiction, although sending SIGCHLD to a program that has not
    waited for a children is risky: if the programmer was so clueless
    that children were not waited for in the first place, chances are
    that SIGCHLD handling is damaged, too.

    > > Anyway I suppose that sending the SIGCHLD won't do any harm so it
    > >may be worth trying.
    > It won't hurt init, but some processes do use the SIGCHLD to trigger a
    > wait(), which might hang the parent.

        If a parent does 'wait()' instead of 'waitpid', that's lazy
    programming. The signal won't hurt anyway: if the parent blocks (bug
    in the program), then a 'kill -9' is the correct medication (it's
    what I use for buggy programs), the children are reparented to init
    and correctly handled (because a good init should, IMHO, use waitpid
    instead of wait). Let's say that sending SIGCHLD is 'mostly harmless'
    ;))

        Raúl Núñez de Arenas Coronado

    -- 
    Linux Registered User 88736
    http://www.dervishd.net & http://www.pleyades.net/
    -
    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/
    

  • Next message: Antonino Sergi: "Re: isa memory address"

    Relevant Pages

    • Re: is killing zombies possible w/o a reboot?
      ... way is to ptrace the parent and force it to wait. ... If init can indeed do the cleanup, then how hard is it to have a "kill ... Copyright 2004 by Maurice Eugene Heskett, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [RFC] "biological parent" pid
      ... >> parent dies and the process is reparented to init. ... While I think all current reparenting is done to init, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: is killing zombies possible w/o a reboot?
      ... >>could try sending a SIGCHLD to the parent and see if it does something ... It won't hurt init, but some processes do use the SIGCHLD to trigger a ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: is killing zombies possible w/o a reboot?
      ... > could try sending a SIGCHLD to the parent and see if it does something ... delivery problem, sending a SIGCHLD to the parent will ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH] ppc: Fix warnings related to seq_file
      ... parent 81fa90f4627668b94ba55163dca08b076ee71e50 ... extern void mpc85xx_restart; ... extern void mpc85xx_calibrate_decr__init; ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)