Bug#377857: occasional SIGSEGV in exim4 under heavy load

Chris Lightfoot chris at mysociety.org
Tue Jul 18 13:12:38 UTC 2006


On Tue, Jul 18, 2006 at 01:32:10PM +0200, Marc Haber wrote:
> tags #377587 unreproducible
> thanks
> 
> On Sat, Jul 15, 2006 at 01:26:38PM +0100, Chris Lightfoot wrote:
> > On Fri, Jul 14, 2006 at 09:46:39PM +0200, Marc Haber wrote:
    [...]
> > ok, I've just tried your config and it still crashes here,
> > in the same place.
> 
> Bad :-(   This makes the bug unreproducible :-(

I've just had a try on another machine (different
hardware, 2.6 kernel rather than 2.4) and it hasn't
crashed in a few minutes' testing. Is it possible you've
been testing on 2.6? I've also tried it on a third
machine, identically configured to the second, but running
2.4, and the bug does exhibit there.

> > No throughput figures (it crashed
> > within the first minute on the couple of occasions I've
> > tried) but on the previous config (with logging to the
> > tmpfs partition) it was doing 12--14,000 messages/minute.
> > Logging to disk, as in the default config, is likely to be
> > quite a bit slower on this hardware.
> 
> Logging to a tmpfs didn't influence throughput here. Additionally,
> having exim query a local caching resolver, the throughput didn't
> change as well.

I'm very surprised by that -- logging to disk is very
costly at high throughput.

It turns out (as expected, more-or-less) that you don't
need to do any deliveries to trigger it; simply connecting
and disconnecting is enough. The program below triggers
the bug on the first machine rather more quickly than
postal typically does.

#!/usr/bin/perl -w
use strict;
use IO::Socket;

die "arguments are server and number of clients" unless (@ARGV == 2);
my ($server, $numclients) = @ARGV;

IO::Handle->input_record_separator("\r\n");

sub smtp_client () {
    my $i = 0;
    for (;; ++$i) {
        my $s = new IO::Socket::INET(PeerAddr => "$server:25", ReuseAddr => 1);
        die "connect: $!\n" if (!$s);
        $s->getline();
        $s->syswrite("HELO localhost.localdomain\r\n");
        $s->getline();
        $s->syswrite("QUIT\r\n");
        $s->getline();
        $s->shutdown(2);
        $s->close();
        print STDERR "." if (0 == ($i % 10));
    }
}

for (my $i = 0; $i < $numclients; ++$i) {
    if (0 == fork()) {
        smtp_client();
        exit(0);
    }
}

for (my $i = 0; $i < $numclients; ++$i) {
    wait();
}

exit(0);

-- 
Chris Lightfoot
mySociety




More information about the Pkg-exim4-maintainers mailing list