Justin Erenkrantz wrote:
We're running off 0.28. (I have no time to update it to 0.29 - nor any
hints that taking the time to update would fix this.)
There are quite a few changes to qpsmtpd-forkserver itself between 0.28 and
0.29, not the least of which is that the REAPER sub correctly re-init's itself
when executed as well as the addition of a HUNTSMAN sub() which will proactively
kill wayward children on SIGINT or SIGTERM. The other big thing you are missing
is the $MAXCONNIP support (limit connections per IP), which for a high volume
site like yours could be significant. We also changed then random seed handling
for the child processes.
FWIW, when we step into the processes with gdb, it is in a loop in the
Perl_newSVpvn () and it doesn't exit that function. So, I'm not
convinced a log message will help. I'll also note that these pids do
*not* appear in our qpsmtpd multilog logfiles - which is just odd. --
If those pids don't appear in the logfiles at all, then we can be very sure that
the child isn't getting started properly (I hope you are running at a log level
higher than LOGNOTICE). As soon as you run() a connection, you should see a log
entry for "Loading plugins..." so if these pids are not getting that far, they
are stuck very early.
Looking at your backtrace, it is clear that the code in qpsmtpd-forkserver that
is freaking out is hereabouts:
$SIG{CHLD} = $SIG{HUP} = $SIG{PIPE} = $SIG{INT} =
$SIG{TERM} = $SIG{QUIT} = 'DEFAULT';
because %SIG is the only Perl object that has sig magic, which is where the
Perl_magic_setsig() call comes in. That code _did_ change between 0.28 and 0.29:
- $SIG{CHLD} = $SIG{HUP} = $SIG{PIPE} = $SIG{INT} =
- $SIG{TERM} = $SIG{QUIT} = 'DEFAULT';
-
+ $SIG{$_} = 'DEFAULT' for keys %SIG;
+ $SIG{ALRM} = sub {
+ print $client "421 Connection Timed Out\n";
+ ::log(LOGINFO, "Connection Timed Out");
+ exit; };
+
so that alone might fix your problems.
I assume the reason you cannot easily move from 0.28 => 0.29 is that you have
custom mods in place. You may try to upgrade qpsmtpd-forkserver (plus
lib/Qpsmtpd/Connection.pm and lib/Qpsmtpd/Transaction.pm) without messing up
your other modifications.
HTH
John