OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Re: postfix's incoming smtp hangs randomly
From: Erik Forsberg (forsberglysator.liu.se)
Date: Tue May 02 2000 - 16:26:56 CDT


Wietse Venema writes:
>
>The fix may be to tweak sigsetmask() arguments so that SIGCHLD
>properly interrupts select(). Perhaps it helps to turn off the
>SA_RESTART flag (master/master_select.c). Perhaps that breaks
>everything.

I had almost the same problem as Stefan, though our OS versions differ
slightly. I have a IRIX 6.5 IP27, his was a IP32 (I think).

My problem was that if I altered a dbm file listed in the
smtpd_recipient_restrictions a already running smtpd would notice that
and exit on new incoming connection. Master wouldn't notice that there
were no smtpd's, and the incoming smtp session would freeze until
select() exited. Ie, the same symptons as Stefan has.

I tried turning off the SA_RESTART flag in master/master_sig.c and it
seems that solved the problem. There might of course be some unwanted
side-effects, but I'll monitor the system closely and see if it
behaves weird.

It seems your explanation of the problem was correct. I added some
debugprinting and found that the master_sigchld function was called,
but the select() call in util/event.c never returned -1 with errno set to
EINTR.

I'm running Snapshot-20000309, compiled with IRIX cc. Now let's see if
this solves Stefans problem too.

\EF

-- 
Erik Forsberg                 http://www.lysator.liu.se/~forsberg/
PGP fingerprint = 37 1B D7 9E 97 8C EF 39  0E DE 08 E8 99 0C 5E A9