Re: [exim] exim in queue mode but after some time queues are…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Rafał Kupka
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] exim in queue mode but after some time queues are nolonger run
On Mon, May 25, 2009 at 10:17:47PM +0200, Arkadiusz Miskiewicz wrote:
> On Monday 25 of May 2009, Arkadiusz Miskiewicz wrote:


Hello,

> > So looks like ALRM isn't send. How's that organized in exim
> > - is there one process that sends ALRM periodically?


Typically yes, exim daemon process started with -q<time> option.

> exim in debug mode (exim -dd -q2m) looks like this:
>
> 15021 SIGALRM received
> 15021 1 queue-runner process running
> 25275 Starting queue-runner: pid 25275
> 15021 child 25275 ended: status=0x0
> 15021 0 queue-runner processes now running
>
> and stops there (according to main.log 25275 queue runner was last run 2 hours
> ago!).


Look at daemon.c near line 1608, the for (;;) loop.

Pseudo-code:

for (;;) {

if (sigalrm_seen)
  {
    <do some stuff>
    /* Reset the alarm clock */
    sigalrm_seen = FALSE;
    alarm(queue_interval);
  }
...
}


Variable sigalrm_seen is set by signal handler, exim.c line 185.

void
sigalrm_handler(int sig)
{
sig = sig;      /* Keep picky compilers happy */
sigalrm_seen = TRUE;
os_non_restarting_signal(SIGALRM, sigalrm_handler);
}


Something very strange happens to signals in your system. Some time
ago there was similar problem with lost SIGALRM:
http://www.mail-archive.com/exim-users@exim.org/msg23913.html
but on your system exim process signals masks looks correct.

This piece of exim code is small and simple, not much space for bugs.
(But signal handling in lower layers, kernel & glibc seems to be quite
complicated, more bug-prone).

Maybe you should try to run two exim daemons, one listener, and one
queue runner. It could help pinpoint that problem. Much less code to run
in a queue spawner daemon: main loop over alarm(), sleeping and
sometimes forking queue runner.

Regards,
Kupson
--
Great software without the knowledge to run it is pretty useless.
(Linux Gazette #1)