Cyrus 2.1.15 blocking connections after upgrade

Mike Brodbelt m.brodbelt at acu.ac.uk
Mon Feb 9 10:43:52 EST 2004


Rob Siemborski wrote:
> On Mon, 9 Feb 2004, Mike Brodbelt wrote:
> 
> 
>>Some connections behave as expected, but some connections to port 143
>>just hang. Using telnet to connect to the port shows that the TCP
>>connection is established, but the Cyrus banner never appears, and
>>eventually the connection times out. Once a connection has been
>>established successfully, things seem to be OK. Restarting cyrus seems
>>to make it easier to get connections, for a while. The Cyrus POP3 daemon
>>does not appear to have this problem, but cyradm hangs before bringing
>>up the password prompt.
> 
> 
> Are you killing off unconnected imapd's recklessly or are you in a
> severely resource-constrained enviornment?  Both of these could lead to
> master losing count of processes.

Neither seems to be applicable. I'm not doing anything to kill imapd
processes in any manner other than the normal, and the machine is a dual
CPU box with 1Gb of memory. It runs more than just Cyrus, but the system
load average is 0.12 right now, and there's lots of free memory.

> Note that the fact that master doesn't fork a new process does not
> indicate a problem of its own.

I thought that master would always fork off an appropriate new process
when it got a connection on any of the ports it was listening on.
Obviously I've misunderstood something here - when an incoming
connection is received on port 143, what should happen? My understanding
was that master would hand the connection off to one of the service
worker processes, and fork a new worker, so I thought that all
connections should result in a fork.

> 
>>P.S. This looks like the /dev/random problem to me in many ways, but
>>given the fact I've recompiled SASL, I can't see how it could be. Is
>>there anything else that tries to use /dev/random directly?
> 
> 
> You should do a truss of an imapd as it gets a connection -- this might
> give you more insight into what is going on.

The server seems to currently be in a state where all incoming
connections on port 143 connect, but hang until the network socket times
out. Users who are already connected to running imapd processes have no
problem whatsoever. I've appended a trace from a running imapd, where
the user concerned checked the mailbox. I'm no expert on this level of
tracing, but what it's doing looks reasonable to me:-


select(1, [0], NULL, NULL, {1675, 790000}) = 1 (in [0], left {1653, 820000})
time(NULL)                              = 1076340204
read(0, "78 noop\r\n", 4096)            = 9
stat64("cyrus.index", {st_mode=S_IFREG|0600, st_size=10476, ...}) = 0
fstat64(11, {st_mode=S_IFREG|0600, st_size=160892, ...}) = 0
fcntl64(12, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) =
-1 EAGAIN (Resource temporarily unavailable)
time([1076340204])                      = 1076340204
getpid()                                = 17474
rt_sigaction(SIGPIPE, {0x402ecf48, [], 0x4000000}, {SIG_IGN}, 8) = 0
send(8, "<23>Feb  9 15:23:24 cyrus/imapd["..., 126, 0) = 126
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
fcntl64(12, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) =
-1 EAGAIN (Resource temporarily unavailable)
time([1076340204])                      = 1076340204
getpid()                                = 17474
rt_sigaction(SIGPIPE, {0x402ecf48, [], 0x4000000}, {SIG_IGN}, 8) = 0
send(8, "<23>Feb  9 15:23:24 cyrus/imapd["..., 126, 0) = 126
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {1, 0})               = 0
fcntl64(12, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) =
-1 EAGAIN (Resource temporarily unavailable)
time([1076340205])                      = 1076340205
getpid()                                = 17474
rt_sigaction(SIGPIPE, {0x402ecf48, [], 0x4000000}, {SIG_IGN}, 8) = 0
send(8, "<23>Feb  9 15:23:25 cyrus/imapd["..., 126, 0) = 126
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({4, 0}, {4, 0})               = 0
fcntl64(12, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fstat64(12, {st_mode=S_IFREG|0600, st_size=51708, ...}) = 0
stat64("/var/lib/cyrus/user/k/ks.seen", {st_mode=S_IFREG|0600,
st_size=19384, ...}) = 0
open("/var/lib/cyrus/user/k/ks.seen", O_RDWR) = 13
dup2(13, 12)                            = 12
close(13)                               = 0


Thanks,

Mike.

---
Home Page: http://asg.web.cmu.edu/cyrus
Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list