[Dovecot] dsync assert failure in 2.2.2

Tomas Olsson
2013-05-31T09:00:43Z

Hi,
with 2.2.2 and today's hg, dsync crashes with
dsync(root): Panic: file ../../../../../src/lib-storage/index/mbox/mbox-lock.c:
line 797 (mbox_lock): assertion failed: (lock_type == F_RDLCK ||
mbox->mbox_lock_type != F_RDLCK)
when I run
USER=root 2.2-hg/bin/dsync -c etc/dovecot.conf -f -o
mail_location=mbox:/tmp/imap/fwadmin.tmp:INBOX=/tmp/imap/fwadmin.tmp/INBOX
mirror mdbox:/tmp/imap/fwadmin
It seems to happen for all mailboxes that are not empty.

2.2.1 completes the conversion without any complaints.

config:
# 2.2.2 (a3b5b762639a): etc/dovecot.conf
# OS: Linux 3.2.0-32-generic i686 Ubuntu 12.04.2 LTS
default_internal_user = nobody
default_login_user = nobody

Backtrace (hg version):
#0  i_panic (format=0x252530 "file %s: line %d (%s): assertion failed:
(%s)")
    at ../../../src/lib/failures.c:255
#1  0x001c643f in mbox_lock (mbox=0x80d9b40, lock_type=<optimized out>,
    lock_id_r=0x811352c)
    at ../../../../../src/lib-storage/index/mbox/mbox-lock.c:797
#2  0x001c695c in mbox_mail_seek (mail=0x81188e0)
    at ../../../../../src/lib-storage/index/mbox/mbox-mail.c:82
#3  0x001c6ee1 in mbox_mail_init_stream (mail=0x81188e0)
    at ../../../../../src/lib-storage/index/mbox/mbox-mail.c:335
#4  mbox_mail_get_stream (_mail=0x81188e0, get_body=false, hdr_size=0x0,
    body_size=0x0, stream_r=0xbffff77c)
    at ../../../../../src/lib-storage/index/mbox/mbox-mail.c:375
#5  0x001e65b0 in mail_get_hdr_stream (mail=0x81188e0, hdr_size=0x0,
    stream_r=0xbffff77c) at ../../../src/lib-storage/mail.c:226
#6  0x00215532 in index_mail_get_header_stream (_mail=0x81188e0,
    headers=0x8106fd0, stream_r=0xbffff7e0)
    at ../../../../src/lib-storage/index/index-mail-headers.c:837
#7  0x001e649d in mail_get_header_stream (mail=0x81188e0, headers=0x8106fd0,
    stream_r=0xbffff7e0) at ../../../src/lib-storage/mail.c:190
#8  0x08084bf2 in dsync_mail_get_hdr_hash (mail=0x81188e0,
    hdr_hash_r=0xbffff8ec) at ../../../../src/doveadm/dsync/dsync-mail.c:32
#9  0x080736a8 in importer_try_next_mail (wanted_uid=1, importer=0x81136e0)
    at ../../../../src/doveadm/dsync/dsync-mailbox-import.c:515
#10 importer_next_mail (importer=0x81136e0, wanted_uid=1)
    at ../../../../src/doveadm/dsync/dsync-mailbox-import.c:536
#11 0x0807729a in dsync_mailbox_import_changes_finish (importer=0x81136e0)
    at ../../../../src/doveadm/dsync/dsync-mailbox-import.c:1754
#12 0x08072e3b in dsync_brain_recv_mail_change (brain=0x80beaf8)
    at ../../../../src/doveadm/dsync/dsync-brain-mails.c:102
#13 dsync_brain_sync_mails (brain=0x80beaf8)
    at ../../../../src/doveadm/dsync/dsync-brain-mails.c:319
#14 0x0806f11b in dsync_brain_run_real (changed_r=0xbffffae6, brain=0x80beaf8)
    at ../../../../src/doveadm/dsync/dsync-brain.c:440
#15 dsync_brain_run (brain=0x80beaf8, changed_r=0xbffffae6)
    at ../../../../src/doveadm/dsync/dsync-brain.c:469
#16 0x0806d1ef in cmd_dsync_run_local (ibc2=0x80be8d8, brain=0x80beaf8,
    user=0x80ba8f0, ctx=0x80b2ca8)
    at ../../../../src/doveadm/dsync/doveadm-dsync.c:356
#17 cmd_dsync_run (_ctx=0x80b2ca8, user=0x80ba8f0)
    at ../../../../src/doveadm/dsync/doveadm-dsync.c:543
#18 0x08055424 in doveadm_mail_next_user (error_r=0xbffffbcc, ctx=0x80b2ca8,
    input=<optimized out>) at ../../../src/doveadm/doveadm-mail.c:308
#19 doveadm_mail_next_user (ctx=0x80b2ca8, input=<optimized out>,
    error_r=0xbffffbcc) at ../../../src/doveadm/doveadm-mail.c:267
#20 0x080560fc in doveadm_mail_cmd (argv=0x80af1ec, argc=<optimized out>,
    cmd=0x80b226c) at ../../../src/doveadm/doveadm-mail.c:517
#21 doveadm_mail_try_run (cmd_name=0x80af286 "sync", argc=3,
argv=0x80af1e4)
    at ../../../src/doveadm/doveadm-mail.c:609
#22 0x08055046 in main (argc=3, argv=0x80af1e4)
    at ../../../src/doveadm/doveadm.c:398

I'm attaching the mbox file.

/t
-------------- next part --------------
A non-text attachment was scrubbed...
Name: INBOX
Type: application/octet-stream
Size: 788 bytes
Desc: INBOX
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20130531/a9fe1fac/attachment.obj>