[Dovecot] dovecot 1.0.alpha4 hangs at auth

Mihai Secasiu mihai.secasiu at denixtech.net
Mon Nov 28 12:03:59 EET 2005


I'm using dovecot 1.0.alpha4 on a freebsd 5.3 i386 system. Dovecot is 
configured to use mysql authentication and I'm running mysql 5.0.15 . 
Everything works fine, but after a period of inactivity (20-30 minutes ) 
when I connect and try to authenticate it just hangs.
I noticed that the dovecot-auth worker process is not running anymore...
from looking at the source code I understand that the dovecot-auth 
worker process is actually a client that connects to the main 
dovecot-auth process ( the server)

I restarted dovecot and I straced the auth worker process ... after 
20-30 minutes it just existed
here is the output of strace :

gettimeofday({0, 0}, NULL)              = 0
poll([{fd=5, events=POLLIN|POLLPRI|POLLERR|POLLHUP|POLLNVAL}, {fd=4, 
events=POLLIN|POLLPRI|POLLERR|POLLHUP|POLLNVAL}], 2, 0) = 0
gettimeofday({1133138508, 221796}, {0, 0}) = 0
gettimeofday({0, 0}, NULL)              = 0
poll([{fd=5, events=POLLIN|POLLPRI|POLLERR|POLLHUP|POLLNVAL}, {fd=4, 
events=POLLIN|POLLPRI|POLLERR|POLLHUP|POLLNVAL, revents=POLLIN}], 2, 
1999) = 1
gettimeofday({1133138509, 49095}, {0, 0}) = 0
read(4, "", 478)                        = 0
close(4)                                = 0
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
read(7, "", 8192)                       = 0
fcntl(7, F_SETFL, O_RDWR)               = 0
write(7, "\1\0\0\0\1", 5)               = -1 EPIPE (Broken pipe)
shutdown(7, 2 /* send and receive */)   = 0
close(7)                                = 0
close(3)                                = 0
close(5)                                = 0
close(6)                                = 0
close(-1)                               = -1 EBADF (Bad file descriptor)
exit(0)                                 = ?

Why is the auth worker exiting if it reads 0 from fd=4 ? is it possible 
to make it so that it does not exit ?
and in the case it exits is there a mechanism to restart it?
Another question would be why read(4, "", 478) returns 0 ? this means 
that the server closed connection right ?
why would the auth server close the connection with the auth worker ?

I had a similar problem with dovecot 0.99 but there I got a "login 
failed" error message immediately , with 1.0alpha4 it just hangs.
I also used a nightly cvs snapshot and the problem is there too.

Thank you for your time

Mihai Secasiu
http://denixsolutions.com/


More information about the dovecot mailing list