Joel,

> I've upgraded to amavis-2.3.2 and the latest SpamAssassin from CPAN and
> the issue is still happening but is much less frequent(2-3/day for ~1
> Million emails from 70/day).  I was using amavis-2.2.1 and SpamAssassin
> 3.0.1 or 3.0.2.  I haven't been able to reproduce the error but I will
> continue to try.

Please try the following safety net around SA. In case of SA blunder,
it should log the problem and terminate the cloned process:


--- amavisd~    Wed Jun 29 12:26:11 2005
+++ amavisd     Tue Jul 26 19:05:57 2005
@@ -5912,4 +5912,5 @@
 
 use Errno qw(ENOENT EACCES);
+use POSIX ();
 use IO::File ();
 # body digest for caching, either SHA1 or MD5
@@ -12541,4 +12542,5 @@
 use Errno qw(EAGAIN);
 use FileHandle;
+use POSIX ();
 use Mail::SpamAssassin;
 
@@ -12827,5 +12829,5 @@
 
     my($sa_required, $sa_tests);
-    my($saved_umask) = umask;
+    my($saved_umask) = umask; my($saved_pid) = $$;
     my($remaining_time) = alarm(0);  # check how much time is left
     eval {
@@ -12884,4 +12886,10 @@
     section_time('SA check');
     umask($saved_umask);  # SA changes umask to 0077
+    if ($$ != $saved_pid) {
+      eval { do_log(-2,"PANIC, SA produced a clone process ".
+                       "of [$saved_pid], TERMINATING CLONE [$$]") };
+      POSIX::_exit(1);  # avoid END and destructor processing
+      kill('KILL',$$)   # still kicking? die!
+    }
     prolong_timer('spam_scan_SA', $remaining_time); # restart the timer
     if ($@ ne '') {  # SA timed out?
--------------

  Mark


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
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/

Reply via email to