[Dovecot] dovecot 1.0-test69 io hangs
Timo Sirainen
tss at iki.fi
Fri May 13 16:10:04 EEST 2005
On Fri, 2005-05-13 at 12:36 +0200, Jens Laas wrote:
> Its seems like this is a heisenbug.
> When I use rawlog the hang problem does not show itself.
That's because then all the data from imap process's point of view is
already sent (to rawlog process). Looks like with at least Linux kernel
it can eat megabytes of data into kernel memory (I think? wonder how the
memory limits go there..) before transmit buffer is full, if the socket
destination is in the same computer.
> (Likewise it took longer to show when I patched in some extra logging,
> so the load of the machine/connection seems to be involved.)
So the client will have more time to read the answer without making imap
process's transmit buffer full.
> >> I've been testing test69 with pop3 (under Linux and with mbox).
> >> I began testing with a large inbox (11000 mails) and it seems the
> >> communication between dovecot and the mailclient (evolution) stalls after
> >> 1000-2000 messages transferred.
Looks like I broke it in test69. This should fix it:
Index: src/pop3/client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/client.c,v
retrieving revision 1.51
diff -u -r1.51 client.c
--- src/pop3/client.c 29 Apr 2005 11:42:38 -0000 1.51
+++ src/pop3/client.c 13 May 2005 13:03:20 -0000
@@ -345,8 +345,11 @@
client->last_output = ioloop_time;
o_stream_cork(client->output);
- if (client->cmd != NULL)
+ if (client->cmd != NULL) {
client->cmd(client);
+ if (client->cmd != NULL)
+ o_stream_set_flush_pending(client->output, TRUE);
+ }
o_stream_uncork(client->output);
if (o_stream_get_buffer_used_size(client->output) <
More information about the dovecot
mailing list