spamass-milt-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Milter not restarting?


From: Dan Nelson
Subject: Re: Milter not restarting?
Date: Sat, 21 Jun 2003 20:18:25 -0500
User-agent: Mutt/1.5.4i

In the last episode (Jun 21), Cassandra Lynette Brockett said:
> I have this weird situation I've noticed from the current CVS tree of
> spamass-milter.  When I start the milter, it triggers three copies of
> the milter, as I receive email in from the server, those three copies
> seem to stick around, unless I happen to get multiple emails in "at
> once" (by that I mean if an email is received while the milter is
> already processing another email).  What happens then is that I seem
> to "loose" one of the milter copies.

>From your description I can see you're running Linux; it creates
multiple processes instead of threads.  A program running Linuxthreads
should always have three visible processes, plus one process for each
extra thread actually running.  If you ever get less than three, that
means the program has crashed and LinuxThreads didn't realize it,
leaving the helper proceses hanging.

> I have tried doing an automatic restart of the milter every few
> hours, but for some reason the milter does not like that happening
> (the milter in fact does not always restart, unless I write a
> detailed script to make sure the program is dead, and kill all run
> files, and then start the milter - not much fun, that should be the
> job of the startup script - which from what I read of the script, it
> should be handling fine anyway)....

In my experience if Linuxthreads is dead then simply killing one of the
processes won't affect the others; you would have to kill them all
manually (killall -9 spamass-milter would work).

Problem is you don't want to kill -9 on a normal shutdown because
libmilter does "clean" shutdowns on its own.  It listens for
SIGINT/TERM, and lets all current messages run to completion before
exiting.  What I do in my shutdown script is kill -INT the master
process and remove the milter communication socket, then if there are
still processes laying around after 10 seconds, kill -9 them.

> Also any ideas on how I might be able to actually get more details of
> this error to actually be able to give the author at least a good
> idea of what to look at?

My own Debian setup doesn't do this, so if you could either get a
coredump of the crash, or run spamass-milter under valgrind and get a
log, that would help.

-- 
        Dan Nelson
        address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]