amavis crashing in Natty

Patrick Ben Koetter p at state-of-mind.de
Sun Mar 13 14:41:05 CET 2011


Scott,

look at the diff below. Mark posted this a while ago.

* Scott Kitterman <amavis at kitterman.com>:
> Patrick Ben Koetter <p at state-of-mind.de> wrote:
> 
> * Florian Effenberger <floeff at gmail.com>: > I just discovered some woes with
> amavis on Natty. Maybe someone can > confirm, so a fix could make it right
> into the release: >
> https://bugs.launchpad.net/ubuntu/+source/amavisd-new/+bug/731878 I think
> this goes back to a problem in Net::Server, which doesn't kill old processes
> correctly when /etc/init.d/amavis force-reload has been executed. Marc
> posted a fix for this to the (old) list. p at rick 
> 
> I thought I checked when that was discussed and Natty had the fixed version.
> Which version do we need (or even better, please point me at the patch again
> and I'll do a code check)?


The following patch against Net-Server-0.99 seems to handle it:


--- Net/Server/PreFork.pm~      2010-07-08 21:13:47.000000000 +0200
+++ PreFork.pm  2011-01-04 18:48:54.103050023 +0100
@@ -331,4 +331,13 @@
                );

+  ### reclaim process exit status from any terminated child process
+  ### inherited from a previous incarnation whose SIGCHLD signal was
+  ### ignored during a blind period between a restart and the moment
+  ### when the SIGCHLD handler was established just now
+  while ( defined(my $chld = waitpid(-1, WNOHANG)) ){
+    last unless $chld > 0;
+    $self->{reaped_children}->{$chld} = 1;
+  }
+
   ### loop on reading info from the children
   while( 1 ){
--- Net/Server/PreForkSimple.pm~        2010-05-05 05:01:58.000000000 +0200
+++ Net/Server/PreForkSimple.pm 2011-01-04 18:40:23.631629852 +0100
@@ -332,4 +332,13 @@
                );

+  ### reclaim process exit status from any terminated child process
+  ### inherited from a previous incarnation whose SIGCHLD signal was
+  ### ignored during a blind period between a restart and the moment
+  ### when the SIGCHLD handler was established just now
+  while ( defined(my $chld = waitpid(-1, WNOHANG)) ){
+    last unless $chld > 0;
+    $self->delete_child($chld);
+  }
+
   ### loop forever
   while( 1 ){


-- 
All technical questions asked privately will be automatically answered on the
list and archived for public access unless privacy is explicitely required and
justified.

saslfinger (debugging SMTP AUTH):
<http://postfix.state-of-mind.de/patrick.koetter/saslfinger/>


More information about the amavis-users mailing list