[Dovecot] UIDL bug

dovecot at spam.turbolink.net dovecot at spam.turbolink.net
Tue Oct 5 23:20:18 EEST 2004


On Sun, 3 Oct 2004, Timo Sirainen wrote:

> On 30.9.2004, at 02:34, dovecot at spam.turbolink.net wrote:
>
> > I noticed a problem with handling UIDL msgnumber in test46.
> > If you do "UIDL 1" on a POP3 connection it returns the UID of the
> > message
> > followed by a dot and an error message.  I made 2 changes:
>
> Thanks, fixed.

I'm getting a few other crashes now as well as we deploy this to more
'live' mboxes.  Here is one backtrace but I've got a dozen core files from
processes that died at the same place.  I'm also seeing lots more of this
error with POP3 users only:

file mbox-lock.c: line 493 (mbox_lock): assertion failed: (lock_type == F_RDLCK ||ibox->mbox_lock_type != F_RDLCK)

And lots more of this one with IMAP users only:

file mbox-sync-rewrite.c: line 460 (mbox_sync_rewrite): assertion failed: (mails[idx].space > 0)

I have mail_cache_fields=flags in the config.

#0  0x0807d63f in mail_cache_merge_bitmask (cache=0x6e6ca9a0, buffer=0x80b6b58, field=0, data=0x4027ebf8, data_size=4)
    at mail-cache-compress.c:29
29                      buf_data_size = cache->fields[buf_field].field.field_size;
(gdb) bt
#0  0x0807d63f in mail_cache_merge_bitmask (cache=0x6e6ca9a0, buffer=0x80b5070, field=0, data=0x401ae8a0, data_size=4)
    at mail-cache-compress.c:29
#1  0x0807d790 in mail_cache_compress_callback (view=0x80ba820, field=0, data=0x401ae8a0, data_size=4, context=0xbffff840)
    at mail-cache-compress.c:65
#2  0x08071f9e in mail_cache_foreach_rec (view=0x80ba820, offset=0xbffff7b8, callback=0x807d6a8 <mail_cache_compress_callback>,
    context=0xbffff840) at mail-cache-lookup.c:134
#3  0x0807212e in mail_cache_foreach (view=0x80ba820, seq=153, callback=0x807d6a8 <mail_cache_compress_callback>,
    context=0xbffff840) at mail-cache-lookup.c:189
#4  0x0807d911 in mail_cache_copy (cache=0x80b3a08, view=0x40, fd=8) at mail-cache-compress.c:154
#5  0x0807dbc2 in mail_cache_compress (cache=0x80b3a08, view=0x80ba728) at mail-cache-compress.c:253
#6  0x08078298 in mail_index_sync_commit (ctx=0x80b36c0) at mail-index-sync.c:455
#7  0x08069888 in mbox_sync (ibox=0x80b3268, flags=MBOX_SYNC_LAST_COMMIT) at mbox-sync.c:1341
#8  0x08064453 in mbox_transaction_commit (_t=0x80ba728, flags=0) at mbox-transaction.c:48
#9  0x0807e876 in mailbox_transaction_commit (t=0x6e6ca9a0, flags=0) at mail-storage.c:409
#10 0x0805aaae in imap_sort (client=0x80a88a0, charset=0x80a8bc2 "US-ASCII", args=0x80b9528, sort_program=0x809e0b6)
    at imap-sort.c:257
#11 0x08055cd4 in cmd_sort (client=0x80a88a0) at cmd-sort.c:123
#12 0x0805660f in cmd_uid (client=0x80a88a0) at cmd-uid.c:19
#13 0x08056d8a in client_handle_input (client=0x80a88a0) at client.c:323
#14 0x08056e99 in _client_input (context=0x80a88a0) at client.c:367
#15 0x0808cc34 in io_loop_handler_run (ioloop=0x80a61d0) at ioloop-poll.c:184
#16 0x0808c379 in io_loop_run (ioloop=0x80a61d0) at ioloop.c:218
#17 0x0805d13f in main (argc=2, argv=0xbffffc04, envp=0xbffffc10) at main.c:214
#18 0x40037bb4 in __libc_start_main () from /lib/libc.so.6


And here is one connection through pop3 that dies at the same place:

#0  0x08073f1b in mail_cache_merge_bitmask (cache=0x6e6ca9a0, buffer=0x80a1358, field=0, data=0x401ae8a0, data_size=4)
    at mail-cache-compress.c:29
29                      buf_data_size = cache->fields[buf_field].field.field_size;
(gdb) bt
#0  0x08073f1b in mail_cache_merge_bitmask (cache=0x6e6ca9a0, buffer=0x80a1358, field=0, data=0x401ae8a0, data_size=4)
    at mail-cache-compress.c:29
#1  0x0807406c in mail_cache_compress_callback (view=0x80a18b0, field=0, data=0x401ae8a0, data_size=4, context=0xbffff8f0)
    at mail-cache-compress.c:65
#2  0x0806887a in mail_cache_foreach_rec (view=0x80a18b0, offset=0xbffff868, callback=0x8073f84 <mail_cache_compress_callback>,
    context=0xbffff8f0) at mail-cache-lookup.c:134
#3  0x08068a0a in mail_cache_foreach (view=0x80a18b0, seq=237, callback=0x8073f84 <mail_cache_compress_callback>,
    context=0xbffff8f0) at mail-cache-lookup.c:189
#4  0x080741ed in mail_cache_copy (cache=0x809d8b0, view=0x40, fd=8) at mail-cache-compress.c:154
#5  0x0807449e in mail_cache_compress (cache=0x809d8b0, view=0x809d6e8) at mail-cache-compress.c:253
#6  0x0806eb74 in mail_index_sync_commit (ctx=0x80a1930) at mail-index-sync.c:455
#7  0x08060164 in mbox_sync (ibox=0x809d110, flags=MBOX_SYNC_LAST_COMMIT) at mbox-sync.c:1341
#8  0x0805ad2f in mbox_transaction_commit (_t=0x80a38b8, flags=0) at mbox-transaction.c:48
#9  0x08075152 in mailbox_transaction_commit (t=0x6e6ca9a0, flags=0) at mail-storage.c:409
#10 0x08052668 in init_mailbox (client=0x809cc88) at client.c:121
#11 0x080527d9 in client_create (hin=134861072, hout=1, storage=0x809cb88) at client.c:168
#12 0x08053e48 in main_init () at main.c:155
#13 0x08053f87 in main (argc=2, argv=0xbffffc04, envp=0xbffffc10) at main.c:188
#14 0x40037bb4 in __libc_start_main () from /lib/libc.so.6


I can't reproduce any of the problems but they do seem to occur often...

- Mike



More information about the dovecot mailing list