FWIW, I've been experiencing this symptom when running under _light_ load--e.g. handling ~ 5 messages from fetchmail.  The following may help:

On my system the symptom was _always_ associated with a ''bayes: expire_old_tokens: child processing timeout at /usr/sbin/spamd line 1088." message.   Here's the processing trace of a single message along with the R/W lock failures associated with two other messages (from /var/log/mail.log)  (unexpurgated log follows at the end):

Feb 12 12:02:13 creaky fetchmail[30122]: reading message rjohnson%[EMAIL PROTECTED]:8 of 17 (5775 octets)
Feb 12 12:02:14 creaky spamd[29924]: spamd: connection from localhost [127.0.0.1] at port 60477
Feb 12 12:02:14 creaky spamd[29924]: spamd: setuid to Debian-exim succeeded
Feb 12 12:02:14 creaky spamd[29924]: spamd: processing message <dsnml2$m7v$[EMAIL PROTECTED]> for Debian-exim:109
Feb 12 12:06:34 creaky spamd[29925]: bayes: cannot open bayes databases /var/spool/exim4/.spamassassin/bayes_* R/W: lock failed: File exists
Feb 12 12:06:58 creaky spamd[29925]: bayes: cannot open bayes databases /var/spool/exim4/.spamassassin/bayes_* R/W: lock failed: File exists
Feb 12 12:07:14 creaky spamd[29924]: bayes: expire_old_tokens: child processing timeout at /usr/sbin/spamd line 1088.
Feb 12 12:07:19 creaky spamd[29924]: spamd: clean message (-2.6/5.0) for Debian-exim:109 in 305.5 seconds, 6091 bytes.
Feb 12 12:07:19 creaky spamd[29924]: spamd: result: . -2 - BAYES_00 scantime=305.5,size=6091,user=Debian-exim,uid=109,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=60477,mid=<dsnml2$m7v$[EMAIL PROTECTED]>,bayes=2.22044604925031e-16,autolearn=unavailable
 
I found the following 2 yr old comment at http://www.sng.ecs.soton.ac.uk/cgi-bin/faq?_recurse=1&file=16:  

SA tries to expire tokens itself but it does it very poorly. Even on a lightly
loaded system it does it too seldom and it takes too long to complete so locking 
issues occur which will create huge files in short time. ...

And here's a workaround (adapted from the one given at the above website):
1. Add "bayes_auto_expire 0" to /etc/spamassassin/local.cf to
stop SA from trying (and failing) to expire old tokens.

2. Stop SA's client chain:
   ....
   /etc/init.d/exim4 stop
   /etc/init.d/spamassassin stop

3. Run "sa-learn --force-expire". (which takes ~25 secs on my machine)

4. Restart SA's client chain:
   /etc/init.d/spamassassin start
   /etc/init.d/exim4 start
   ....

5.  Bundle steps 2-4 into a crontab job(s).

With this workaround all my SA  R/W deadlocks have gone away.

I suspect some light may be shed on the problem by answering the question as to why SA's auto-expire deadlocks when ''sa-learn --force-expire'' runs to completion.


----------------------------------UNEXPURGATED /var/log/mail.log SEGMENT--------------------

Feb 12 12:02:09 creaky fetchmail[30122]: awakened at Sun Feb 12 12:02:09 2006
Feb 12 12:02:13 creaky fetchmail[30122]: 17 messages (7 seen) for rjohnson%dogstar-interactive.com at pop3.dogstar-interactive.com (59311 octets).
Feb 12 12:02:13 creaky fetchmail[30122]: reading message rjohnson%[EMAIL PROTECTED]:8 of 17 (5775 octets)
Feb 12 12:02:14 creaky spamd[29924]: spamd: connection from localhost [127.0.0.1] at port 60477
Feb 12 12:02:14 creaky spamd[29924]: spamd: setuid to Debian-exim succeeded
Feb 12 12:02:14 creaky spamd[29924]: spamd: processing message <dsnml2$m7v$[EMAIL PROTECTED]> for Debian-exim:109
Feb 12 12:06:14 creaky fetchmail[30122]:  flushed
Feb 12 12:06:14 creaky fetchmail[30122]: reading message rjohnson%[EMAIL PROTECTED]:9 of 17 (3305 octets)
Feb 12 12:06:14 creaky spamd[29925]: spamd: connection from localhost [127.0.0.1] at port 60480
Feb 12 12:06:14 creaky spamd[29925]: spamd: setuid to Debian-exim succeeded
Feb 12 12:06:15 creaky spamd[29925]: spamd: processing message <dsnl1i$g34$[EMAIL PROTECTED]> for Debian-exim:109
Feb 12 12:06:34 creaky spamd[29925]: bayes: cannot open bayes databases /var/spool/exim4/.spamassassin/bayes_* R/W: lock failed: File exists
Feb 12 12:06:34 creaky spamd[29925]: spamd: clean message (-2.6/5.0) for Debian-exim:109 in 19.2 seconds, 3653 bytes.
Feb 12 12:06:34 creaky spamd[29925]: spamd: result: . -2 - BAYES_00 scantime=19.2,size=3653,user=Debian-exim,uid=109,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=60480,mid=<dsnl1i$g34$[EMAIL PROTECTED]>,bayes=5.55111512312578e-17,autolearn=unavailable
Feb 12 12:06:34 creaky fetchmail[30122]:  flushed
Feb 12 12:06:34 creaky fetchmail[30122]: reading message rjohnson%[EMAIL PROTECTED]:10 of 17 (3348 octets)
Feb 12 12:06:36 creaky spamd[29923]: prefork: child states: BB
Feb 12 12:06:36 creaky spamd[29925]: spamd: connection from localhost [127.0.0.1] at port 60481
Feb 12 12:06:36 creaky spamd[29923]: spamd: server successfully spawned child process, pid 30220
Feb 12 12:06:36 creaky spamd[29925]: spamd: setuid to Debian-exim succeeded
Feb 12 12:06:36 creaky spamd[29923]: prefork: child states: BBI
Feb 12 12:06:36 creaky spamd[29925]: spamd: processing message <[EMAIL PROTECTED]> for Debian-exim:109
Feb 12 12:06:58 creaky spamd[29925]: bayes: cannot open bayes databases /var/spool/exim4/.spamassassin/bayes_* R/W: lock failed: File exists
Feb 12 12:06:58 creaky spamd[29925]: spamd: identified spam (20.9/5.0) for Debian-exim:109 in 22.5 seconds, 3698 bytes.
Feb 12 12:06:58 creaky spamd[29925]: spamd: result: Y 20 - BAYES_99,FAKE_HELO_EUDORAMAIL,FORGED_EUDORAMAIL_RCVD,FRONTPAGE,HTML_30_40,HTML_MESSAGE,LONGWORDS,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_WHOIS_BOGONS,RCVD_IN_XBL,RCVD_NUMERIC_HELO,SUBJ_ALL_CAPS scantime=22.5,size=3698,user=Debian-exim,uid=109,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=60481,mid=<[EMAIL PROTECTED]>,bayes=0.99999970388423,autolearn=unavailable
Feb 12 12:06:58 creaky fetchmail[30122]: SMTP error: 550 Rejected
Feb 12 12:06:58 creaky fetchmail[30122]: SMTP listener refused delivery
Feb 12 12:06:58 creaky fetchmail[30122]:  flushed
Feb 12 12:06:58 creaky fetchmail[30122]: reading message rjohnson%[EMAIL PROTECTED]:11 of 17 (3295 octets)
Feb 12 12:06:59 creaky spamd[30220]: spamd: connection from localhost [127.0.0.1] at port 60484
Feb 12 12:06:59 creaky spamd[30220]: spamd: setuid to Debian-exim succeeded
Feb 12 12:07:00 creaky spamd[29923]: prefork: child states: BIB
Feb 12 12:07:00 creaky spamd[30220]: spamd: processing message <[EMAIL PROTECTED]> for Debian-exim:109
Feb 12 12:07:14 creaky spamd[29924]: bayes: expire_old_tokens: child processing timeout at /usr/sbin/spamd line 1088.
Feb 12 12:07:18 creaky spamd[30220]: spamd: clean message (-2.6/5.0) for Debian-exim:109 in 19.5 seconds, 3655 bytes.
Feb 12 12:07:18 creaky spamd[30220]: spamd: result: . -2 - AWL,BAYES_00 scantime=19.5,size=3655,user=Debian-exim,uid=109,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=60484,mid=<[EMAIL PROTECTED]>,bayes=0,autolearn=ham
Feb 12 12:07:18 creaky fetchmail[30122]:  flushed
Feb 12 12:07:19 creaky fetchmail[30122]: reading message rjohnson%[EMAIL PROTECTED]:12 of 17 (3925 octets)
Feb 12 12:07:19 creaky spamd[29924]: spamd: clean message (-2.6/5.0) for Debian-exim:109 in 305.5 seconds, 6091 bytes.
Feb 12 12:07:19 creaky spamd[29924]: spamd: result: . -2 - BAYES_00 scantime=305.5,size=6091,user=Debian-exim,uid=109,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=60477,mid=<dsnml2$m7v$[EMAIL PROTECTED]>,bayes=2.22044604925031e-16,autolearn=unavailable

Reply via email to