[imapproxy] imapproxy hanging

David Shafer david-shafer at uiowa.edu
Thu Feb 6 11:27:29 PST 2003


I'm running into a strange problem using imapproxy with IMP, and I'm not
sure whether it's been reported already. Some of the symptoms sound
similar to other reports, but not identical. I'm using Horde RELENG_2,
IMP RELENG_3, and the latest imapproxy from CVS. PHP was compiled with
imap-2001a, and the server is also 2001a.

Here's what I'm seeing:

Whe you send or forward a message with a large attachment (I know at
least 400K works) via IMP, and you have the "save a copy" checkbox
selected, then the message will be sent properly, but the compose window
never closes; it acts as though it's still waiting for a response from
the web server. When that happens, if I kill the imapproxy child
process, the compose window closes immediately. If you wait long enough,
it also seems it will eventually time out on its own.

If I unselect the "save a copy" checkbox when I send the message or use
a direct IMAP connection without imapproxy, it works fine.

When I encounter the hanging problem, I see these messages in the logs:

Feb  6 11:16:00 webmail1 ImapProxy[25237]: [DEBUG 25237]
parent_conversate(): select() timed out. (60 seconds without activity) 
Feb  6 11:16:00 webmail1 ImapProxy[25237]: Status: 0 temporary, 1
active, 1 inactive, 0 other, 2 total. 
Feb  6 11:16:00 webmail1 ImapProxy[25237]: [DEBUG 25237]
parent_handle_idlers(): Sending NOOP to server -1. 
Feb  6 11:16:02 webmail1 ImapProxy[25259]: [DEBUG 25259]
child_conversate(): select() timed out. (60 seconds without activity) 
Feb  6 11:17:00 webmail1 ImapProxy[25237]: [DEBUG 25237]
parent_conversate(): select() timed out. (60 seconds without activity) 
Feb  6 11:17:02 webmail1 ImapProxy[25259]: [DEBUG 25259]
child_conversate(): select() timed out. (60 seconds without activity) 

And I see ps output like this:

webmail1 # ps -ef|grep imapproxy
nobody   25237     1  0 11:14 ?        00:00:00 /.../imapproxy -f
/etc/imapproxy.conf
nobody   25259 25237  0 11:15 ?        00:00:00 /.../imapproxy -f
/etc/imapproxy.conf

I've poked around with gdb, and this is what I see for a backtrace in
the child process while it's hanging:

#0  0x400ee41e in select () from /lib/libc.so.6
#1  0x00000006 in ?? ()
#2  0x0804f906 in main (argc=3, argv=0xbffffae4) at imapproxy.c:164
#3  0x4002f1c4 in __libc_start_main () from /lib/libc.so.6

imapproxy.c 164: child_conversate();

I'm not sure where the select() is being called from, but I suspect it's
this:

processing_child.c 476: if((r = select(maxfd,&readset,NULL,NULL,&tv)) >
0)

Here's a similar backtrace for the parent process:

#0  0x400ee41e in select () from /lib/libc.so.6
#1  0x00000007 in ?? ()
#2  0x0804f943 in main (argc=3, argv=0xbffffae4) at imapproxy.c:179
#3  0x4002f1c4 in __libc_start_main () from /lib/libc.so.6

imapproxy.c 179: parent_conversate(mainfd);

Again, I'm guessing the select() is here:

processing_parent.c: if((r = select(maxfd,&readset,&writeset,NULL,&tv))
> 0)

Has anyone seen anything similar? Any ideas where I should look to debug
this?

	 - Dave

David Shafer
University of Iowa
ITS - SPA Unix Systems



More information about the imapproxy mailing list