amavis crashing in Natty

Mark Martinec Mark.Martinec+amavis at ijs.si
Wed Apr 6 20:56:10 CEST 2011


> Actually, the underlying problem seems to be a change in the TCP/IP stack
> or kernel.  The following test program can be normally be started
> repeatedly without a failure, but chokes on Natty unless at least 13
> seconds pass from a shutdown of the previous incarnation to a new start:

I should correct the above. The 13 seconds I noticed is just the 10 second
sleep in a child plus some margin. Removing the sleep allows an almost
immediate restart, as it allows the child process to close its reference
to the socket, and kernel should be removing it quickly afterwards.

So what this means for restarting amavis: it means that on Ubuntu Natty
a start of amavisd must not occur before all child processes of a
previous incarnation have exited, thus fully releasing a socket.
On other systems (Maverick, FreeBSD, ...) it suffices to wait for the
main process to exit.

Can't tell if this is a feature of the new Linux kernel or a bug.

Anyway, my patch to Net::Server should suffice to prevent the
parent amavisd process from exiting before all its child processes
are gone.

A dirty quick hack (not guaranteed to always work) is just to insert
some sleep between stopping amavisd and restarting it again.

  Mark


More information about the amavis-users mailing list