You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2006/09/06 18:35:17 UTC
Re: Spamd child states?
John Horne writes:
> On Wed, 2006-09-06 at 11:38 -0400, Theo Van Dinter wrote:
>
> > My understanding (I haven't really looked at that code) is that "K" means the
> > child has been killed but it hasn't exited yet. If a child is in that state
> > for more than, say, 5 seconds, there's likely an issue where it doesn't
> > actually die off, imo.
> >
> > You should generally see states of I or B.
> >
> I get the feeling that something is wrong here. I have restarted SA, and
> grepped the log file. It shows:
>
> =======================================================================
> prefork: child states: BI
> prefork: child states: BB
> prefork: child states: BBB
> prefork: child states: BBBB
> prefork: child states: BBBBS
> prefork: child states: BBBBII
> prefork: child states: IBBBII
> prefork: child states: IIBBIK
> prefork: child states: IIIBKK
> prefork: child states: IIKIKK
> prefork: child states: IBKKKK
> prefork: child states: IIKKKK
> prefork: child states: BBKKKK
> prefork: child states: BBKKKKB
> prefork: child states: BBKKKKBB
> prefork: server reached --max-children setting, consider raising it
> prefork: child states: BIKKKKBB
> prefork: child states: IBKKKKBB
> prefork: child states: IBKKKKIB
> prefork: child states: IIKKKKIB
> prefork: child states: BIKKKKKI
> prefork: child states: IBKKKKKB
> prefork: child states: BBKKKKKI
> prefork: child states: BIKKKKKI
> prefork: child states: IIKKKKKI
> prefork: child states: IBKKKKKK
> prefork: child states: IIKKKKKK
> prefork: child states: BBKKKKKK
> prefork: server reached --max-children setting, consider raising it
> prefork: child states: BBKKKKKK
> prefork: server reached --max-children setting, consider raising it
> prefork: child states: IBKKKKKK
> prefork: child states: BIKKKKKK
> prefork: child states: IIKKKKKK
> =======================================================================
>
> Some of the processes seem to almost immediately go in to the 'killed'
> state and stay there. 'ps auxww' shows that all 8 child processes are
> started. Running an strace (this is a Fedora Core 4 server) on some of
> the processes seems to show that they are waiting on select, and then
> get a 'resources unavailable' error. What resource I have no idea. E.g:
>
> =======================================================================
> strace -Ff -p 12805
> Process 12805 attached - interrupt to quit
> select(16, [10], NULL, NULL, {290, 888000}) = 1 (in [10], left {147,
> 820000})
> read(10, "P....\n", 6) = 6
> read(10, 0xb4515f0, 6) = -1 EAGAIN (Resource
> temporarily unavailable)
> time(NULL) = 1157559274
> select(16, [10], NULL, NULL, {300, 0}
> =======================================================================
>
> The process just sits there in this loop of some sort, and never seems
> to do any actual spam processing.
>
> Any ideas about this?
That looks bad :( The strace snippet, however, is pretty normal-looking.
First off, are you using an up-to-date 3.1.x release?
Secondly, you need to strace both the child *and* the parent spamd process
-- the easiest way to do this is to "strace -f" the parent spamd, then
kill -15 the kids so it starts new (traced) ones.
--j.
Re: Spamd child states?
Posted by John Horne <jo...@plymouth.ac.uk>.
On Wed, 2006-09-06 at 17:35 +0100, Justin Mason wrote:
>
> That looks bad :( The strace snippet, however, is pretty normal-looking.
>
> First off, are you using an up-to-date 3.1.x release?
>
Yes, version 3.1.4.
> Secondly, you need to strace both the child *and* the parent spamd process
> -- the easiest way to do this is to "strace -f" the parent spamd, then
> kill -15 the kids so it starts new (traced) ones.
>
Okay, I did that. It ran for a few minutes and produced a 10MB file.
What is odd is that while strace was running the log file shows for the
child states:
===============================================================
prefork: child states: BB
prefork: child states: BS
prefork: child states: BBS
prefork: child states: BBBS
prefork: child states: BBBBS
prefork: child states: BBBBBS
prefork: child states: BBBBBBS
prefork: child states: BBBBBBBS
prefork: server reached --max-children setting, consider raising it
prefork: child states: BBBBBBBB
prefork: server reached --max-children setting, consider raising it
prefork: child states: BBBBBBBB
prefork: server reached --max-children setting, consider raising it
prefork: child states: BBBBBBBB
prefork: server reached --max-children setting, consider raising it
prefork: child states: BBBBBBBB
===============================================================
This then goes on for quite a bit, but the child state remains at
'BBBBBBBB'.
Now that I have stopped strace, the state is:
===============================================================
prefork: child states: BIKKKKKK
prefork: child states: IIKKKKKK
prefork: child states: IIKKKKKK
prefork: child states: IIKKKKKK
prefork: child states: IBKKKKKK
===============================================================
John.
--
---------------------------------------------------------------
John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914
E-mail: John.Horne@plymouth.ac.uk Fax: +44 (0)1752 233839