You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by km...@apache.org on 2010/03/03 14:33:50 UTC

svn commit: r918467 - in /spamassassin/branches/3.3: Makefile.PL lib/Mail/SpamAssassin/SpamdForkScaling.pm spamd/spamd.raw

Author: kmcgrail
Date: Wed Mar  3 13:33:49 2010
New Revision: 918467

URL: http://svn.apache.org/viewvc?rev=918467&view=rev
Log:
bug 6304 spamd is spawning and killing processes too often - Added spamd adjustments to info level and more information for administrators + small fix to Makefile.PL

Modified:
    spamassassin/branches/3.3/Makefile.PL
    spamassassin/branches/3.3/lib/Mail/SpamAssassin/SpamdForkScaling.pm
    spamassassin/branches/3.3/spamd/spamd.raw

Modified: spamassassin/branches/3.3/Makefile.PL
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.3/Makefile.PL?rev=918467&r1=918466&r2=918467&view=diff
==============================================================================
--- spamassassin/branches/3.3/Makefile.PL (original)
+++ spamassassin/branches/3.3/Makefile.PL Wed Mar  3 13:33:49 2010
@@ -202,7 +202,7 @@
     },
 
     'clean' => { FILES => join(' ' =>
-        'sa-learn', 'sa-update', 'spamassassin', 'sa-compile',
+        'sa-learn', 'sa-update', 'spamassassin', 'sa-compile', 'sa-awl', 'sa-check_spamd',
         
         'spamd/spamd',
 

Modified: spamassassin/branches/3.3/lib/Mail/SpamAssassin/SpamdForkScaling.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.3/lib/Mail/SpamAssassin/SpamdForkScaling.pm?rev=918467&r1=918466&r2=918467&view=diff
==============================================================================
--- spamassassin/branches/3.3/lib/Mail/SpamAssassin/SpamdForkScaling.pm (original)
+++ spamassassin/branches/3.3/lib/Mail/SpamAssassin/SpamdForkScaling.pm Wed Mar  3 13:33:49 2010
@@ -175,6 +175,8 @@
   # close the socket and remove the child from our list
   $self->set_child_state ($pid, PFSTATE_KILLED);
 
+  #Bug 6304 research
+  #info("6304: prefork: child_error_kill called - %s", $pid);
   kill 'INT' => $pid
     or warn "prefork: kill of failed child $pid failed: $!\n";
 
@@ -818,11 +820,15 @@
 
 sub need_to_add_server {
   my ($self, $num_idle) = @_;
+  my ($pid);
   my $cur = ${$self->{cur_children_ref}};
   $cur++;
   dbg("prefork: adjust: increasing, not enough idle children ($num_idle < $self->{min_idle})");
-  main::spawn();
+  $pid = main::spawn();
   # servers will be started once main_server_poll() returns
+
+  #Added for bug 6304 to work on notifying administrators of poor parameters for spamd
+  info("prefork: adjust: %s idle children less than %s minimum idle children.  Increasing spamd children: %s started.",$num_idle, $self->{min_idle}, $pid);
 }
 
 sub need_to_del_server {
@@ -853,6 +859,8 @@
   kill 'INT' => $pid;
 
   dbg("prefork: adjust: decreasing, too many idle children ($num_idle > $self->{max_idle}), killed $pid");
+  #Added for bug 6304 to work on notifying administrators of poor parameters for spamd
+  info("prefork: adjust: %s idle children more than %s maximum idle children. Decreasing spamd children: %s killed.",$num_idle, $self->{max_idle}, $pid);
 }
 
 sub vec_all {

Modified: spamassassin/branches/3.3/spamd/spamd.raw
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.3/spamd/spamd.raw?rev=918467&r1=918466&r2=918467&view=diff
==============================================================================
--- spamassassin/branches/3.3/spamd/spamd.raw (original)
+++ spamassassin/branches/3.3/spamd/spamd.raw Wed Mar  3 13:33:49 2010
@@ -1017,7 +1017,8 @@
     }
     sigprocmask( POSIX::SIG_UNBLOCK(), $sigset )
       or die "spamd: cannot unblock SIGINT/SIGCHLD for fork: $!\n";
-    return;
+    #Changing to return the process id to improve communications for bug 6304
+    return $pid;
   }
   else {
     ## CHILD