One more attempt: stuck processes

Ken Murchison murch at andrew.cmu.edu
Wed Nov 14 16:39:44 EST 2007


Sebastian Hagedorn wrote:
> Hi,
> 
> I've brought up this topic before. We've been running cyrus-imapd very 
> happily for several years. Yet there's one issue that none of the 
> updates have resolved. The last time I reported it we were running 
> 2.2.12. Now we're running 2.3.8, but the issues is the same: POP and 
> IMAP processes that use TLS/SSL get "stuck". My observations point 
> towards dropped dial-up connections as the cause. Here's an example:
> 
> [root at lvr13 root]# strace -p 4998
> Process 4998 attached - interrupt to quit
> read(0,  <unfinished ...>
> Process 4998 detached
> 
> In gdb:
> 
> 0x003ed41e in __read_nocancel () from /lib/tls/libc.so.6
> (gdb) bt
> #0  0x003ed41e in __read_nocancel () from /lib/tls/libc.so.6
> #1  0x00c422f7 in BIO_new_socket () from /lib/libcrypto.so.4
> #2  0x00c402b2 in BIO_read () from /lib/libcrypto.so.4
> #3  0x00d26c30 in ssl3_alert_code () from /lib/libssl.so.4
> #4  0x00d26dcc in ssl3_alert_code () from /lib/libssl.so.4
> #5  0x00d280cf in ssl3_read_bytes () from /lib/libssl.so.4
> #6  0x00d28ffc in ssl3_get_message () from /lib/libssl.so.4
> #7  0x00d1ecab in ssl3_accept () from /lib/libssl.so.4
> #8  0x00d1e944 in ssl3_accept () from /lib/libssl.so.4
> #9  0x00d2dc9a in SSL_accept () from /lib/libssl.so.4
> #10 0x00d2980d in ssl23_get_client_hello () from /lib/libssl.so.4
> #11 0x00d29712 in ssl23_accept () from /lib/libssl.so.4
> #12 0x00d2dc9a in SSL_accept () from /lib/libssl.so.4
> #13 0x080a0a03 in idle_notify ()
> #14 0x0805ef21 in idle_update ()
> #15 0x08051fc6 in shut_down ()
> #16 0x0804ebe4 in ?? ()
> #17 0x08d53458 in ?? ()
> #18 0x08d61a98 in ?? ()
> #19 0x00000000 in ?? ()
> (gdb)

It looks to me like we are timing out the client while the client is 
IDLEing, but we get a signal from idled in the middle of shutdown(). 
Try this patch.

--- imapd.c.~1.535.~	2007-11-14 16:16:21.000000000 -0500
+++ imapd.c	2007-11-14 16:22:59.000000000 -0500
@@ -836,6 +836,8 @@
  {
      int i;

+    idle_done(imapd_mailbox);
+
      proc_cleanup();

      i = 0;


-- 
Kenneth Murchison
Systems Programmer
Project Cyrus Developer/Maintainer
Carnegie Mellon University


More information about the Info-cyrus mailing list