#767512 Assertion and unclean exit

#767512#5
Date:
2014-10-31 15:51:41 UTC
From:
To:
I managed to get dovecot in a state where it only bails out:

| imap(bbl): Panic: file mail-index-map.c: line 548 (mail_index_map_lookup_seq_range): assertion failed: (first_uid <= last_uid)
| imap(bbl): Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x6b5fe) [0x7f7f049ba5fe] -> /usr/lib/dovecot/libdovecot.so.0(+0x6b6ec) [0x7f7f049ba6ec] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f7f049718fb] -> /usr/lib/dovecot/libdovecot-storage.so.0(mail_index_map_lookup_seq_range+0x108) [0x7f7f04ce6fd8] -> /usr/lib/dovecot/libdovecot-storage.so.0(mail_index_lookup_seq_range+0xa) [0x7f7f04cf8b5a] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0xaf02d) [0x7f7f04cd802d] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_mailbox_sync_pvt_view+0x30) [0x7f7f04cd81e0] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_mailbox_sync_init+0x139) [0x7f7f04cd6b99] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_sync_init+0x39) [0x7f7f04ca9209] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_sync+0x37) [0x7f7f04ca9357] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_storage_get_status+0x31) [0x7f7f04cd3e11] -> /usr/lib/dovecot/modules/lib01_acl_plugin.so(+0xe4dc) [0
 x7f7f041
 9b4dc] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_get_status+0x31) [0x7f7f04caa821] -> dovecot/imap [bbl 192.0.2.1 LIST](imap_status_get+0x77) [0x7f7f0518cf87] -> dovecot/imap [bbl 192.0.2.1 LIST](+0x10d24) [0x7f7f0517dd24] -> dovecot/imap [bbl 192.0.2.1 LIST](cmd_list_full+0x669) [0x7f7f0517e4a9] -> dovecot/imap [bbl 192.0.2.1 LIST](command_exec+0x3c) [0x7f7f0518608c] -> dovecot/imap [bbl 192.0.2.1. LIST](+0x17fa2) [0x7f7f05184fa2] -> dovecot/imap [bbl 192.0.2.1 LIST](+0x18056) [0x7f7f05185056] -> dovecot/imap [bbl 192.0.2.1 LIST](client_handle_input+0x13d) [0x7f7f0518538d] -> dovecot/imap [bbl 192.0.2.1 LIST](client_input+0x85) [0x7f7f05185735] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x3f) [0x7f7f049cbc4f] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0xf9) [0x7f7f049ccc29] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x9) [0x7f7f049cbcb9] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x38) [0x7f7f049cbd38] -> /usr/lib/d
 ove
| imap(bbl): Fatal: master: service(imap): child 3957 killed with signal 6 (core dumps disabled)

It tries to sync the pvt index against the real mdbox.  I may have an
index that is newer than the mdbox itself (think about backup restore of
a mailbox).  As it reads untrusted data from the original mdbox, abort
is no way to handle errors.

Bastian