[Dovecot] imap process consuming 100% CPU (Dovecot 1.0.3)
Robert Tomanek
rth23 at poczta.onet.pl
Mon Sep 3 13:37:36 EEST 2007
Hi,
Sunday, September 2, 2007, 22:42:37, you wrote:
>> 0x0806049d in imap_sync_more (ctx=0x80d9770) at imap-sync.c:104
>> 104 if (ctx->seq == 0) {
A short follow-up on this, looks like an infinite loop to me, unless
some threading magic is supposed to happen here:
> (gdb) step
> 120 if (ctx->sync_rec.seq1 > ctx->messages_count)
> (gdb)
> 104 if (ctx->seq == 0) {
> (gdb)
> 117 if (ctx->sync_rec.seq2 > ctx->messages_count) {
> (gdb)
> 120 if (ctx->sync_rec.seq1 > ctx->messages_count)
> (gdb)
> 104 if (ctx->seq == 0) {
> (gdb)
> 117 if (ctx->sync_rec.seq2 > ctx->messages_count) {
> (gdb)
> 120 if (ctx->sync_rec.seq1 > ctx->messages_count)
> (gdb) print ctx->seq
> $1 = 8317
> (gdb) print ctx->sync_rec.seq1
> $2 = 8318
> (gdb) print ctx->sync_rec.seq2
> $3 = 8320
> (gdb) print ctx->messages_count
> $4 = 8317
The corresponding code in imap-sync.c is:
103: for (;;) {
104: if (ctx->seq == 0) {
105: /* get next one */
106: ret = mailbox_sync_next(ctx->sync_ctx,
107: &ctx->sync_rec);
108: if (ret <= 0) {
109: if (ret == 0) {
110: /* all finished ok */
111: ret = 1;
112: }
113: break;
114: }
115: }
116:
117: if (ctx->sync_rec.seq2 > ctx->messages_count) {
118: /* don't send change notifications of messages we
119: haven't even announced to client yet */
120: if (ctx->sync_rec.seq1 > ctx->messages_count)
121: continue;
122: ctx->sync_rec.seq2 = ctx->messages_count;
123: }
...
185: }
--
Best regards,
Robert Tomanek mailto:rth23 at poczta.onet.pl
More information about the dovecot
mailing list