zombie processes

Alex Neuman alex at nkpanama.com
Thu Jun 17 13:35:15 IST 2004


I see zombie processes from time to time too, but since they're not taking
up resources I don't give them much thought.

What I've noticed in one of my servers from time to time is the following:
Jun 17 07:41:43 mail kernel: application bug: MailScanner(20611) has SIGCHLD
set to SIG_IGN but calls wait().
Jun 17 07:41:43 mail kernel: (see the NOTES section of 'man 2 wait').
Workaround activated.

Any thoughts?

I checked the archives and there was a minor patch involved, but I want to
know if it was incorporated into any of the latest builds.

-----Original Message-----
From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK] On Behalf
Of James Gray
Sent: Thursday, June 17, 2004 2:05 AM
To: MAILSCANNER at JISCMAIL.AC.UK
Subject: Re: zombie processes

Julian Field wrote:
> At 18:42 15/06/2004, Marcel Karras wrote:
>> 2. Whenever I send a mail, there'll be a new zombie process and ps shows
>> "[MailScanner <defunct>]". The mail will be scanned and delivered just
>> perfect but you can certainly imagine what would happen if this server
>> would work in a productive area rather than a testing one.
>
> And you should find it will destroy the zombie process itself pretty
> quickly too.

I've noticed this zombie process too on my Linux+exim gateways.  FreeBSD
seems unaffected but all the BSD gateways run sendmail.

I know what zombies are and why they occur, but "mailscanner <defunct>"
is never being cleaned up.  So I did some digging that might help solve
why.  The following applies to all my Debian (woody) systems running
exim3, MailScanner 4.31.6 and McAfee.

When MailScanner is started, it creates the parent and child instances
as per the config.  When a message batch is scanned for the FIRST TIME
by a child (each child) it spawns a zombie.  The first and subsequent
batches are all scanned properly, but there are no more zombies[1], and
the first zombie is never cleaned up.  After a while, I end up with one
zombie from each child, until the child is killed due to old age.  When
the child is killed, the zombie goes with it...until the new child reads
its 1st batch then the zombie returns.

I can't untangle the code in MailScanner enough to figure out where the
stray process (zombie) is created from the child, but I'm hoping Julian
might be able to offer $ENLIGHTENMENT.

[1] Actually other defunct processes DO occur but are promptly cleaned
up.  By promptly, I mean with "top" set to 1/2 second updates you see
them, set the updates to 2 seconds you never see them.

Cheers,

James

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html



More information about the MailScanner mailing list