[ale] Boot script becomes a zombie?

James Sumners james.sumners at gmail.com
Mon Feb 22 15:07:52 EST 2010


The parent process is "/usr/sbin/cron" as expected. Doing a "kill -s
SIGCHLD <ppid>" does nothing to resolve the problem. None of the
scripts executed by my boot script even mention stdin. In fact, after
discovering this problem I went back and put "exit 0" as the last line
in each script. I'm not seeing anything about the grandchildren in ps
output either.

On Mon, Feb 22, 2010 at 2:28 PM, Michael H. Warfield <mhw at wittsend.com> wrote:
> On Sun, 2010-02-21 at 23:05 -0500, James Sumners wrote:
>> I have a script that looks runs several other scripts in turn. I use
>> this script to startup several FastCGI processes. This is the script:
>
>> ##########
>> #!/bin/bash
>> find /var/www/fastcgi/scripts/ -type f -execdir '{}' 2>&1 1>/dev/null \;
>> return $?
>> ##########
>
>> I then have the following crontab entry for root:
>> @reboot /path/to/boot_cgi_bin.sh
>
>> Every time I reboot my server, this boot_cgi_bin.sh script turns into
>> a zombie (the cgi bins do get started). Does anyone see a reason why
>> this script would hang up as a zombie process?
>
> A zombie process means that process terminated but the process (which
> would seem to be cron in this case) which started it has not reaped the
> child's status.  It's really all gone and only exists as an entry in the
> proc table.  This CAN happen if a child it invokes leaves it's file
> descriptors open and they're pipes back to the parent (it's what causes
> ssh to refuse to terminate after running a script which restarts
> services.).  I had to deal with that in the smbmount program when I was
> maintaining it.
>
> Do a ps -lp {process id} on that process id and then see what the parent
> process is (may be a shell).
>
> Might also redirect stdin from /dev/null just in case one of those
> scripts you're invoking is doing something funny with stdin.
>
> Mike
> --
> Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
>   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
>   NIC whois: MHW9          | An optimist believes we live in the best of all
>  PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>



-- 
James Sumners
http://james.roomfullofmirrors.com/

"All governments suffer a recurring problem: Power attracts
pathological personalities. It is not that power corrupts but that it
is magnetic to the corruptible. Such people have a tendency to become
drunk on violence, a condition to which they are quickly addicted."

Missionaria Protectiva, Text QIV (decto)
CH:D 59



More information about the Ale mailing list