Hi! On 06/02/2009 07:13 PM, Mark Martinec wrote: >> I am experiencing problems with some spam-mail that causes amavisd to >> hang forever. Maybe it has some problems when running spamassassin, at >> least in many cases the last debug-output is from spamassassin. However, >> when manually feeding the mail to spamassassin, everything works fine. > > I tried to reproduce with your versions of amavisd, SA and perl, > (with disabled virus scanner, so that a message could reach SpamAssassin) > but it didn't fail here, so I'll need some assistance.
Thanks for your help! Lets see... >> Additionally, the following error is output: >> >> *** glibc detected *** amavisd (ch1-30412-01): free(): invalid next size >> (normal): 0x0def2e28 *** > > It may or may not be related. > >> The corresponding process never recovers and has to be killed with -9. > > It is spinning CPU, or just hanging? Just hanging, they are not consuming cpu. >> The emails that cause the trouble contain a zip file as attachment. >> I have saved one of those mails, together with the debug-output of >> amavis at the following address: >> http://leo.kloburg.at/tmp/amavis-hang/ >> >> Since mail delivery stops once all configured amavisd children are in >> such a hanging state, I am desperately looking for an advice how to >> further track down the bug. >> >> Additionally I'd appreciate any hints on how to reject those mails in an >> early state, so that amavisd won't crash. (Maybe based on the >> attachment-name?) > > These viruses are probably now caught by ClamAV and other virus scanners, > or by banning rules. Nevertheless, the issue should be tracked down. Interestingly, my AVG scanner didn't detect them as a virus. Moreover I believe it might be a problem with the .zip or .exe handlers in amavis. In that case, the virus-scanner won't help because amavis will unpack the zip file anyways... > Your file amavisd-debug.txt seems to indicate it stopped while SA > is trying to compile or evaluate its first set of body rules at > priority -1000. Are you using any custom rules? Could you run > the same test with only the rules that come with SA? > It might help disabling BerkeleyDB ( $enable_db=0; ), it saves > some memory and the stack, which can be an issue with Perl 5.10.0 > or 5.8.9 on some platforms. I did already try it without custom rulesets. I am using spamassassin with mysql, so Berkeley-DB isn't involved. > What is your other debug file amavisd-debug2.txt? This one doesn't > stop while calling SpamAssassin, but apparently while doing > header section check or thereabout. Are these two logs from the > same event? It is another run with the same mail. Looks like it hangs on totally different places, so maybe process memory gets corrupted in an earlier stage, maybe in zlib or other C-extensions which then causes hangs on random locations? However, I have extracted the do_unzip code into a small test script. Running this script on the zip-file the same box doesn't produce the above glibc error... And as far as I could see, the other unpackers are external programs, so they shouldn't corrupt the amavisd process... > With your version of amavisd you can get a merged amavisd+SpamAssassin > log on stdout by setting: > $DO_SYSLOG = 0; > $LOGFILE = undef; > $sa_debug = 1; > and running: > amavisd foreground The logs where produced with $log_level = 5; $sa_debug = '1,all'; and amavisd -c /etc/amavisd/amavisd.conf -d 5 debug >& debug.log Doesn't that produce the same result? --leo -- e-mail ::: Leo.Bergolth (at) wu.ac.at fax ::: +43-1-31336-906050 location ::: IT-Services | Vienna University of Economics | Austria ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/