On Mon, 2006-02-27 at 12:28 +0300, Oleg Lapshin wrote:
> Hello
> 
> And again, troubles with "address already in use"

Got it! If I hit the parent process with lots of fast SIGHUPs, I can
cause it to die, but leave children that look like parents:

nobody   30203     1  0 09:25 /usr/local/sbin/dbmail-imapd
nobody   30205     1  0 09:25 /usr/local/sbin/dbmail-imapd

Both of those processes think that they're the parent (parent id 1) and
neither have any children. Both are handling connections normally.
Trying to open a third connection does not work.

[snip]
> imap4.c,IMAPClientHandler: Finished command uid [0]
> main(): server has exited, exit status [1]

This is the parent process reporting that a child exited with a signal.
The parent then continues in its fork loop, keeping the right number of
children available. Except here that's not happening.

Reading the code here, and this is Paul's neck of the woods, so I may
well be misunderstanding things, is that at the bottom of the loop the
socket is closed, then at the top of the loop the socket is reopened and
another child is forked and waited on. If that socket could not be
opened, then the process dies (see server.c, dm_bind_and_listen).

So I think that it's the parent process here that's somehow lost
ownership of the socket and so the parent dies but the children stick
around (because their parent is now 1? or is that a sympton?)

Aaron

Attachment: dbmail-address_in_use-2006-02-27.log.gz
Description: GNU Zip compressed data

Reply via email to