[Dovecot] [dovecot-2.1.15] mdbox corruption, doveadm force-resync can't repair it (throws segfault)

Marcin Mirosław marcin at mejor.pl
Thu Mar 7 14:12:52 EET 2013


Here is backtrace from doveadm force-resync:

gdb -q /usr/bin/doveadm 'core-1362658246-8-11-!usr!bin!doveadm-3939'
Reading symbols from /usr/bin/doveadm...Reading symbols from
/usr/lib64/debug/usr/bin/doveadm.debug...done.
done.
[New LWP 3939]

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

warning: no loadable sections found in added symbol-file system-supplied
DSO at 0x3667f202000
Core was generated by `doveadm -v force-resync -u marcin at mejor.pl
mailinglists.*'.
Program terminated with signal 11, Segmentation fault.
#0  rebuild_mailbox_multi (trans=0x428b58d090, view=<optimized out>,
rebuild_ctx=0x428b5a0690, ctx=0x428b57a9a0, mbox=<optimized out>) at
mdbox-storage-rebuild.c:433
433                             map_uid = rec->map_uid;
(gdb) bt
#0  rebuild_mailbox_multi (trans=0x428b58d090, view=<optimized out>,
rebuild_ctx=0x428b5a0690, ctx=0x428b57a9a0, mbox=<optimized out>) at
mdbox-storage-rebuild.c:433
#1  rebuild_mailbox (vname=<optimized out>, ctx=0x428b57a9a0,
ns=<optimized out>) at mdbox-storage-rebuild.c:546
#2  rebuild_namespace_mailboxes (ns=<optimized out>, ctx=0x428b57a9a0)
at mdbox-storage-rebuild.c:577
#3  rebuild_mailboxes (ctx=0x428b57a9a0) at mdbox-storage-rebuild.c:597
#4  mdbox_storage_rebuild_scan (ctx=0x428b57a9a0) at
mdbox-storage-rebuild.c:905
#5  mdbox_storage_rebuild_in_context (storage=0x428b52e290,
atomic=<optimized out>) at mdbox-storage-rebuild.c:928
#6  0x000003667f13356a in mdbox_sync_begin (mbox=0x428b564a90,
flags=MDBOX_SYNC_FLAG_FORCE_REBUILD, atomic=0x428b57ef10,
ctx_r=0x3bcda49d568) at mdbox-sync.c:235
#7  0x000003667f133b75 in mdbox_sync (mbox=0x428b564a90,
flags=MDBOX_SYNC_FLAG_FORCE_REBUILD) at mdbox-sync.c:319
#8  0x000003667f133c86 in mdbox_storage_sync_init (box=0x428b564a90,
flags=(MAILBOX_SYNC_FLAG_FIX_INCONSISTENT |
MAILBOX_SYNC_FLAG_FORCE_RESYNC)) at mdbox-sync.c:349
#9  0x000003667f161631 in mailbox_sync_init (box=0x428b564a90,
flags=(MAILBOX_SYNC_FLAG_FIX_INCONSISTENT |
MAILBOX_SYNC_FLAG_FORCE_RESYNC)) at mail-storage.c:1326
#10 0x000003667f1617b7 in mailbox_sync (box=<optimized out>,
flags=<optimized out>) at mail-storage.c:1374
#11 0x0000004289345a33 in cmd_force_resync_box (ctx=0x428b511de0,
info=<optimized out>) at doveadm-mail.c:211
#12 cmd_force_resync_run (ctx=0x428b511de0, user=<optimized out>) at
doveadm-mail.c:240
#13 0x000000428934566d in doveadm_mail_next_user (error_r=0x3bcda49d6c0,
ctx=0x428b511de0, input=<optimized out>) at doveadm-mail.c:311
#14 doveadm_mail_next_user (ctx=0x428b511de0, input=<optimized out>,
error_r=0x3bcda49d6c0) at doveadm-mail.c:270
#15 0x000000428934646e in doveadm_mail_cmd (cmd=0x428b511480, argc=4,
argv=0x428b50d578) at doveadm-mail.c:520
#16 0x0000004289346a01 in doveadm_mail_try_run (cmd_name=0x428b50d593
"force-resync", argc=4, argv=0x428b50d560) at doveadm-mail.c:579
#17 0x000000428934f4eb in main (argc=4, argv=0x428b50d560) at doveadm.c:391

bt full:

#0  rebuild_mailbox_multi (trans=0x428b58d090, view=<optimized out>,
rebuild_ctx=0x428b5a0690, ctx=0x428b57a9a0, mbox=<optimized out>) at
mdbox-storage-rebuild.c:433
433                             map_uid = rec->map_uid;
(gdb) #0  rebuild_mailbox_multi (trans=0x428b58d090, view=<optimized
out>, rebuild_ctx=0x428b5a0690, ctx=0x428b57a9a0, mbox=<optimized out>)
at mdbox-storage-rebuild.c:433
        new_seq = 17684
        hdr = 0x428b59fae0
        data = 0x428b61ea8c
        expunged = false
        uid = 8877
        map_uid = 127994
        new_dbox_rec = {map_uid = 127994, save_date = 1362612657}
        rec = 0x0
        old_seq = <optimized out>
#1  rebuild_mailbox (vname=<optimized out>, ctx=0x428b57a9a0,
ns=<optimized out>) at mdbox-storage-rebuild.c:546
        box = 0x428b5ae880
        mbox = 0x428b5ae880
        rebuild_ctx = 0x428b5a0690
        ret = <optimized out>
        sync_ctx = 0x428b5a10e0
        view = 0x428b5a1ae0
        trans = 0x428b58d090
        error = <optimized out>
#2  rebuild_namespace_mailboxes (ns=<optimized out>, ctx=0x428b57a9a0)
at mdbox-storage-rebuild.c:577
        _data_stack_cur_id = 4
        iter = 0x428b585620
        info = <optimized out>
        ret = 0
#3  rebuild_mailboxes (ctx=0x428b57a9a0) at mdbox-storage-rebuild.c:597
        storage = <optimized out>
        ns = <optimized out>
#4  mdbox_storage_rebuild_scan (ctx=0x428b57a9a0) at
mdbox-storage-rebuild.c:905
        data = 0x428b589e10
        data_size = 8
#5  mdbox_storage_rebuild_in_context (storage=0x428b52e290,
atomic=<optimized out>) at mdbox-storage-rebuild.c:928
        ctx = 0x5137d1b10001f3fa
        ret = 0
#6  0x000003667f13356a in mdbox_sync_begin (mbox=0x428b564a90,
flags=MDBOX_SYNC_FLAG_FORCE_REBUILD, atomic=0x428b57ef10,
ctx_r=0x3bcda49d568) at mdbox-sync.c:235
        storage = 0x428b52e290
        ctx = <optimized out>
        sync_flags = <optimized out>
        ret = 4
        rebuild = true
        storage_rebuilt = false
#7  0x000003667f133b75 in mdbox_sync (mbox=0x428b564a90,
flags=MDBOX_SYNC_FLAG_FORCE_REBUILD) at mdbox-sync.c:319
        sync_ctx = 0x0
        atomic = 0x428b57ef10
        ret = <optimized out>
#8  0x000003667f133c86 in mdbox_storage_sync_init (box=0x428b564a90,
flags=(MAILBOX_SYNC_FLAG_FIX_INCONSISTENT |
MAILBOX_SYNC_FLAG_FORCE_RESYNC)) at mdbox-sync.c:349
        mbox = 0x428b564a90
        mdbox_sync_flags = <optimized out>
        ret = <optimized out>
#9  0x000003667f161631 in mailbox_sync_init (box=0x428b564a90,
flags=(MAILBOX_SYNC_FLAG_FIX_INCONSISTENT |
MAILBOX_SYNC_FLAG_FORCE_RESYNC)) at mail-storage.c:1326
        _data_stack_cur_id = 3
        ctx = <optimized out>
#10 0x000003667f1617b7 in mailbox_sync (box=<optimized out>,
flags=<optimized out>) at mail-storage.c:1374
        ctx = <optimized out>
        status = {sync_delayed_expunges = 0}
#11 0x0000004289345a33 in cmd_force_resync_box (ctx=0x428b511de0,
info=<optimized out>) at doveadm-mail.c:211
        box = 0x428b564a90
        ret = 0
#12 cmd_force_resync_run (ctx=0x428b511de0, user=<optimized out>) at
doveadm-mail.c:240
        _data_stack_cur_id = 2
        iter = 0x428b554d40
        info = 0x428b556e70
        ret = 0
#13 0x000000428934566d in doveadm_mail_next_user (error_r=0x3bcda49d6c0,
ctx=0x428b511de0, input=<optimized out>) at doveadm-mail.c:311
        ret = 0
#14 doveadm_mail_next_user (ctx=0x428b511de0, input=<optimized out>,
error_r=0x3bcda49d6c0) at doveadm-mail.c:270
        error = <optimized out>
        ret = <optimized out>
#15 0x000000428934646e in doveadm_mail_cmd (cmd=0x428b511480, argc=4,
argv=0x428b50d578) at doveadm-mail.c:520
        input = {module = 0x0, service = 0x4289370302 "doveadm",
username = 0x428b50d5a3 "marcin at mejor.pl", session_id = 0x0, local_ip =
{family = 0, u = {ip6 = {
                __in6_u = {__u6_addr8 = '\000' <repeats 15 times>,
__u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}},
ip4 = {s_addr = 0}}},
          remote_ip = {family = 0, u = {ip6 = {__in6_u = {__u6_addr8 =
'\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
__u6_addr32 = {0, 0, 0,
                    0}}}, ip4 = {s_addr = 0}}}, local_port = 0,
remote_port = 0, userdb_fields = 0x0, flags_override_add = (unknown: 0),
          flags_override_remove = (unknown: 0), no_userdb_lookup = 0}
        ctx = 0x428b511de0
        getopt_args = 0x42893702e5 "AS:u:"
        wildcard_user = 0x0
        error = <optimized out>
        ret = <optimized out>
        c = <optimized out>
#16 0x0000004289346a01 in doveadm_mail_try_run (cmd_name=0x428b50d593
"force-resync", argc=4, argv=0x428b50d560) at doveadm-mail.c:579
        cmd__foreach_end = 0x428b511690
        cmd = 0x428b511480
        cmd_name_len = <optimized out>
        __FUNCTION__ = "doveadm_mail_try_run"
#17 0x000000428934f4eb in main (argc=4, argv=0x428b50d560) at doveadm.c:391
        cmd_name = <optimized out>
        i = <optimized out>
        quick_init = false
        c = <optimized out>
(gdb) quit


More information about the dovecot mailing list