You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Chris Lear <ch...@laculine.com> on 2006/10/16 11:32:02 UTC

Spamd not killing children

Subject sounds unpleasantly like incitement to filicide, for which I
apologise.

The problem I'm having is that spamd doesn't seem to be able to clean up
unwanted idle child processes.

Here's the logfile evidence:

Oct 16 00:12:59 marvin spamd[6351]: prefork: child states: III
Oct 16 00:13:09 marvin spamd[18043]: spamd: connection from localhost
[127.0.0.1] at port 35720
Oct 16 00:13:09 marvin spamd[18043]: spamd: setuid to spamd succeeded
Oct 16 00:13:09 marvin spamd[18043]: spamd: checking message
<37...@K7DR> for spamd:210
Oct 16 00:13:12 marvin spamd[25627]: spamd: connection from localhost
[127.0.0.1] at port 35722
Oct 16 00:13:12 marvin spamd[25627]: spamd: setuid to spamd succeeded
Oct 16 00:13:12 marvin spamd[25627]: spamd: checking message
<96...@MNJMTU> for spamd:210
Oct 16 00:13:14 marvin spamd[18043]: spamd: identified spam (29.7/5.0)
for spamd:210 in 5.3 seconds, 1545 bytes.
Oct 16 00:13:14 marvin spamd[18043]: spamd: result: Y 29 -
BAYES_99,RAZOR2_CF_RANGE_51_100,RAZOR2_CF_RANGE_E4_51_100,RAZOR2_CF_RANGE_E8_51_100,RAZOR2_CHECK,URIBL_AB_SURBL,URIBL_BLACK,URIBL_JP_SURBL,URIBL_OB_SURBL,URIBL_SBL,URIBL_SC_SURBL,URIBL_WS_SURBL
scantime=5.3,size=1545,user=spamd,uid=210,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=35720,mid=<37...@K7DR>,bayes=0.999999999999891,autolearn=spam
Oct 16 00:13:15 marvin spamd[6351]: prefork: child states: IBK
-------------------------------------------------------------^
[...] Time passes, and spamd continues to work [...]

Oct 16 10:18:00 marvin spamd[6351]: prefork: child states: IIKK
-------------------------------------------------------------^^

spamd seems to be trying to kill child processes to get the number of
threads down to 2. But for some (apparently unreported) reason the
threads don't die, and the server is slowly collecting children marked
as "K".

I recently upgraded spamassassin to 3.1.5, and I also installed
FuzzyOcr, which I suspect might be part of the problem.

Can anyone tell me a) what logs to look in to work out why this has
happened? (I've looked in the FuzzyOcr log, which does show some errors
and timeouts, but apparently none at relevant times), b) whether there's
anything I can do about it (I'll start by disabling FuzzyOcr, but I'd
like to use it), or c) whether there's a spamassassin bug?

I looked at the code in SpamdForkScaling.pm, and I see that there are 2
places where child processes are killed. In one place (sub
child_error_kill, line 134), there is a warn line if the kill fails. In
the other (sub need_to_del_server, line 732) there isn't.

Chris

Re: Spamd not killing children

Posted by Chris Lear <ch...@laculine.com>.
* Chris Lear wrote (16/10/06 10:32):
 > The problem I'm having is that spamd doesn't seem to be able to clean up
 > unwanted idle child processes.
 >
[...]
I've had a look in the spamd code, and I'm now wondering whether my 
problem is related to logging bugs (eg 
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4237). I've set 
logrotate to restart spamd after syslog restarts as per the advice in 
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4316. Hopefully 
this will fix it.
I'm still unsure whether this is a spamd bug or not.

Chris