[Mimedefang] Slaves dying unexpectedly with signal 14

Jan Pieter Cornet johnpc at xs4all.nl
Wed Jan 18 03:49:59 EST 2006


On Wed, Jan 18, 2006 at 08:37:31PM +1300, Roland Pope wrote:
> I posted an email some time back asking about MD slaves that were
> unexpectedly terminating with a signal 14. David Skoll mentioned at the time
> that it was possibly a perl module generating this signal 14 which was
> somehow not being handled and was causing the slaves to die.
> At the time, I upgraded a few of the perl modules, and the problem seemed to
> go away.

I assume signal 14 is a SIGALRM. If "kill -l" on your system doesn't show
"14) SIGALRM" in the output somewhere, then the below is invalid.

> Unfortunately, it is back.
> Once the errors start occuring, a restart seems to stop it happening for a
> time, but eventually, it returns. This error is occuring on two seperate
> mail exchangers (Which are running the same software versions).
> I am running mimedefang 2.53 under CentOS linux 3.6
> Can anyone give me any pointers at all as to how I can go about further
> tracking down what is generating these signal 14's?? Can I arm some sort of
> signal handler in my filter and generate some sort of trace back?

A traceback from the moment the signal is generated will not be helpful,
since the alarm() call that generated the signal is issued several seconds
before that (that's the whole point of the alarm() call).

If it's a perl module that uses alarm() and then fails to unset it,
you might be able to trace it by inserting something like this (UNTESTED)

use Carp qw(longmess);
my $buzz;
my $mess;
*CORE::GLOBAL::alarm = sub {
    my $arg = shift || $_;
    CORE::alarm($arg);
    if ( $arg == 0 ) {
	undef $buzz;
    } else {
	$buzz = time + $arg;
	$mess = longmess;
    }
};

# ... somewhere at the beginning or end of your filter code, where you
# are sure there should be no pending alarms going off..
if ( $buzz ) {
    warn "Alarm set to go off at " . localtime($buzz) .
	", set by alarm() call at: $mess";
}

-- 
#!perl -wpl # mmfppfmpmmpp mmpffm <pmmppfmfpppppfmmmf at fpffmm4mmmpmfpmf.ppppmf>
$p=3-2*/[^\W\dmpf_]/i;s.[a-z]{$p}.vec($f=join('',$p-1?chr(sub{$_[0]*9+$_[1]*3+
$_[2]}->(map{/p|f/i+/f/i}split//,$&)+97):qw(m p f)[map{((ord$&)%32-1)/$_%3}(9,
3,1)]),5,1)='`'lt$&;$f.eig;                                # Jan-Pieter Cornet



More information about the MIMEDefang mailing list