MailScanner not behaving - endless loop?

Robert Waldner waldner at WALDNER.PRIV.AT
Thu Nov 20 08:34:55 GMT 2003


On Wed, 19 Nov 2003 20:12:51 GMT, Julian Field writes:
>Are you trying to use SpamAssassin without having first installed it?

No, SA is installed and working fine.

>If not, set Debug = yes in MailScanner.conf. Kill the MailScanner
>processes, then run check_mailscanner. That will probably make it obvious.

When I did that on Tuesday 2 times, I got a "hanging" process, all that was 
 logged was:
Nov 18 20:49:10 ka MailScanner[27258]: MailScanner E-Mail Virus Scanner version 
4.25-6 starting... 
Nov 18 20:49:29 ka MailScanner[27258]: lock.pl sees Config  LockType =  flock 
Nov 18 20:49:29 ka MailScanner[27258]: lock.pl sees have_module =  0 
Nov 18 20:49:29 ka MailScanner[27258]: Using locktype = flock 
Nov 18 20:49:29 ka MailScanner[27258]: New Batch: Scanning 3 messages, 14532 byt
es 
Nov 18 20:49:29 ka MailScanner[27258]: Spam Checks: Starting 
Nov 18 20:49:29 ka MailScanner[27258]: RBL Checks: returned 0 
Nov 18 20:50:02 ka MailScanner[27258]: SpamAssassin returned 0 
Nov 18 20:50:03 ka MailScanner[27258]: RBL Checks: returned 0 
Nov 18 20:50:35 ka MailScanner[27258]: SpamAssassin returned 0 
Nov 18 20:50:35 ka MailScanner[27258]: RBL Checks: returned 0 
Nov 18 20:51:06 ka MailScanner[27258]: SpamAssassin returned 0 
Nov 18 20:51:06 ka MailScanner[27258]: Created attachment dirs for 3 messages 
Nov 18 20:51:10 ka MailScanner[27258]: Virus and Content Scanning: Starting 
Nov 18 20:51:10 ka MailScanner[27258]: Commencing scanning by clamav... 
Nov 18 20:51:10 ka MailScanner[27258]: Completed scanning by clamav 
Nov 18 20:51:10 ka MailScanner[27258]: Commencing scanning by f-prot... 
Nov 18 20:51:12 ka MailScanner[27258]: Completed scanning by f-prot 
Nov 18 20:51:12 ka MailScanner[27258]: Completed checking by /usr/bin/file 
Nov 18 20:51:12 ka MailScanner[27258]: About to deliver 3 messages 
Nov 18 20:51:13 ka MailScanner[27258]: Uninfected: Delivered 3 messages 
Nov 18 20:51:13 ka MailScanner[27258]: MailScanner child dying of old age 
Nov 18 21:00:26 ka MailScanner[27779]: MailScanner E-Mail Virus Scanner version 
4.25-6 starting... 

I couldn't reproduce it yesterday evening, though. But over night, 
 running without Debug, I now have 2 hanging processes:

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
26270 root      20   0 30904  13M  4528 R    41.9  9.7  30:58 MailScanner
21075 root      20   0 30920 4556  4520 R    40.9  3.1  91:06 MailScanner

:) root at ka->/var/spool/mailscanner/incoming # date; strace -v -F -f -p 26270
Thu Nov 20 09:16:22 CET 2003
Process 26270 attached - interrupt to quit
Process 26270 detached
:) root at ka->/var/spool/mailscanner/incoming # date
Thu Nov 20 09:17:30 CET 2003

:) root at ka->/var/spool/mailscanner/incoming # egrep "\[(26270|21075)\]" /var/log/mail/mail.log
Nov 20 06:28:24 ka MailScanner[21075]: MailScanner E-Mail Virus Scanner version 4.25-6 starting... 
Nov 20 07:50:59 ka MailScanner[26270]: MailScanner E-Mail Virus Scanner version 4.25-6 starting... 

Not even one system call in over a minute. Same for the other process. 
 But they were eating CPU all the time.

I killed MailScanner, and restarted it with Debug=yes, and it worked 
 its way normally through a bunch of messages:
Nov 20 09:23:42 ka MailScanner[31673]: MailScanner E-Mail Virus Scanner version 4.25-6 starting... 
Nov 20 09:24:02 ka MailScanner[31673]: lock.pl sees Config  LockType =  flock 
Nov 20 09:24:02 ka MailScanner[31673]: lock.pl sees have_module =  0 
Nov 20 09:24:02 ka MailScanner[31673]: Using locktype = flock 
Nov 20 09:24:02 ka MailScanner[31673]: New Batch: Scanning 4 messages, 11451 bytes 
Nov 20 09:24:02 ka MailScanner[31673]: Spam Checks: Starting 
Nov 20 09:24:03 ka MailScanner[31673]: RBL Checks: returned 0 
Nov 20 09:24:35 ka MailScanner[31673]: SpamAssassin returned 0 
Nov 20 09:24:36 ka MailScanner[31673]: RBL Checks: returned 0 
Nov 20 09:25:08 ka MailScanner[31673]: SpamAssassin returned 0 
Nov 20 09:25:11 ka MailScanner[31673]: RBL Checks: returned 0 
Nov 20 09:25:33 ka MailScanner[31673]: SpamAssassin returned 0 
Nov 20 09:25:33 ka MailScanner[31673]: RBL Checks: returned 0 
Nov 20 09:26:06 ka MailScanner[31673]: SpamAssassin returned 0 
Nov 20 09:26:06 ka MailScanner[31673]: Created attachment dirs for 4 messages 
Nov 20 09:26:10 ka MailScanner[31673]: Virus and Content Scanning: Starting 
Nov 20 09:26:10 ka MailScanner[31673]: Commencing scanning by clamav... 
Nov 20 09:26:11 ka MailScanner[31673]: Completed scanning by clamav 
Nov 20 09:26:11 ka MailScanner[31673]: Commencing scanning by f-prot... 
Nov 20 09:26:12 ka MailScanner[31673]: Completed scanning by f-prot 
Nov 20 09:26:12 ka MailScanner[31673]: Completed checking by /usr/bin/file 
Nov 20 09:26:13 ka MailScanner[31673]: About to deliver 4 messages 
Nov 20 09:26:13 ka MailScanner[31673]: Uninfected: Delivered 4 messages 
Nov 20 09:26:13 ka MailScanner[31673]: MailScanner child dying of old age 

Only complaint was:
:) root at ka->/var/spool/mailscanner/incoming # /usr/local/MailScanner/bin/check_mailscanner.linux 
Starting MailScanner...
In Debugging mode, not forking...
Cannot open bayes_path /var/spool/.spamassassin/bayes R/W: File exists
Cannot open bayes_path /var/spool/.spamassassin/bayes R/W: File exists
Cannot open bayes_path /var/spool/.spamassassin/bayes R/W: File exists
Stopping now as you are debugging me.

But I'm pretty sure that when I leave it running without Debug for a 
 day, I'll end up with one or two hanging, CPU-munching processes again.
 It's happened quite a few times now, and it's not nice to my server, 
 as can be seen at <http://ka.graffl.net/mrtg/load.html>.
Is there a possibility to have MailScanner logging extensively when 
 running normally?

cheers,
&rw
-- 
-- Funny, I thought countries were formed by the biggest warlords eating
-- all the smaller warlords until they ran into a warlord they couldn't
-- run over, and called the place they met the natural border, while the
-- peasants tried to avoid getting killed in the process. Peter Da Silva


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20031120/3b445c76/attachment.bin


More information about the MailScanner mailing list