It might not be a fault in dovecot, as the user is accessing the folder locally with alpine while also running imap-sessions. However it would have been nice with a more graceful action than panic?
The panic is preceeded by Error: Next message unexpectedly corrupted in mbox file PATH
Panic: file mbox-sync.c: line 152 (mbox_sync_read_next_mail): assertion failed: (sync_ctx->input->v_offset != mail_ctx->mail.from_offset || sync_ctx->input->eof)
At #7 in the enclosed backtrace the actual values are sync_ctx->input->v_offset = 564 mail_ctx->mail.from_offset = 564 sync_ctx->input->eof = 0
Some will recommend convertion to maildir, but with 25 years history, thousands of active users and dozens terrabytes of mboxes, we are not even considering it.
hmk
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.10"...
Reading symbols from /datapool/local/dovecot-2.2.15/lib/dovecot/libdovecot-storage.so.0...done.
Loaded symbols for /local/dovecot-2.2.15/lib/dovecot/libdovecot-storage.so.0
Reading symbols from /datapool/local/dovecot-2.2.15/lib/dovecot/libdovecot.so.0...done.
Loaded symbols for /local/dovecot-2.2.15/lib/dovecot/libdovecot.so.0
Reading symbols from /datapool/local/program/lib/libssl.so.1.0.0...done.
Loaded symbols for /local/program/lib/libssl.so.1.0.0
Reading symbols from /datapool/local/program/lib/libcrypto.so.1.0.0...done.
Loaded symbols for /local/program/lib/libcrypto.so.1.0.0
Reading symbols from /datapool/local/program/lib/libz.so...done.
Loaded symbols for /local/program/lib/libz.so
Reading symbols from /lib/libm.so.2...done.
Loaded symbols for /lib/libm.so.2
Reading symbols from /datapool/local/program/lib/libiconv.so.2...done.
Loaded symbols for /local/program/lib/libiconv.so.2
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libsocket.so.1...done.
Loaded symbols for /lib/libsocket.so.1
Reading symbols from /lib/libsendfile.so.1...done.
Loaded symbols for /lib/libsendfile.so.1
Reading symbols from /lib/libc.so.1...done.
Loaded symbols for /lib/libc.so.1
Reading symbols from /lib/libdl.so.1...done.
Loaded symbols for /lib/libdl.so.1
Reading symbols from /usr/lib/libz.so...done.
Loaded symbols for /usr/lib/libz.so
Reading symbols from /lib/libaio.so.1...done.
Loaded symbols for /lib/libaio.so.1
Reading symbols from /lib/libmd.so.1...done.
Loaded symbols for /lib/libmd.so.1
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
Core was generated by `dovecot/imap imap-postlogin'.
Program terminated with signal 6, Aborted.
[New process 86892 ]
#0 0xfe80c8e5 in _lwp_kill () from /lib/libc.so.1
(gdb) #0 0xfe80c8e5 in _lwp_kill () from /lib/libc.so.1
No symbol table info available.
#1 0xfe807765 in thr_kill () from /lib/libc.so.1
No symbol table info available.
#2 0xfe7b376f in raise () from /lib/libc.so.1
No symbol table info available.
#3 0xfe7929e1 in abort () from /lib/libc.so.1
No symbol table info available.
#4 0xfeda1c82 in default_fatal_finish (type=LOG_TYPE_PANIC, status=0) at failures.c:152
backtrace = 0x8093260 "0xfeda2b9f -> 0xfeda1e9b -> 0xfee9f57a -> 0xfeea207c -> 0xfeea37e9 -> 0xfeea4363 -> 0xfeea45cd -> 0xfeea477d -> 0xfeecb356 -> 0x8074b45 -> 0x805eeda -> 0x805f463 -> 0x806aad1 -> 0x8069a41 -> 0x8069d26"...
#5 0xfeda2b9f in i_internal_fatal_handler (ctx=0x80474e0,
format=0xfef4c588 "file %s: line %d (%s): assertion failed: (%s)", args=0x8047504 "°Æôþ\230")
at failures.c:152
status = 0
#6 0xfeda1e9b in i_panic (format=0xfef4c588 "file %s: line %d (%s): assertion failed: (%s)")
at failures.c:152
ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0, timestamp_usecs = 0}
args = 0x8047504 "°Æôþ\230"
#7 0xfee9f57a in mbox_sync_read_next_mail (sync_ctx=0x8047794, mail_ctx=0x804760c)
at ../../../../src/lib/array.h:158
__FUNCTION__ = "mbox_sync_read_next_mail"
#8 0xfeea207c in mbox_sync_loop (sync_ctx=0x8047794, mail_ctx=0x804760c, partial=false)
at ../../../../src/lib/array.h:158
rec = (const struct mail_index_record *) 0x0
uid = 0
messages_count = 66
offset = 564
ret = 1
expunged = false
skipped_mails = true
uids_broken = false
#9 0xfeea37e9 in mbox_sync_do (sync_ctx=0x8047794, flags=0) at ../../../../src/lib/array.h:158
mbox_hdr = (struct mbox_index_header *) 0x80b4a20
mail_ctx = {sync_ctx = 0x8047794, mail = {uid = 0, idx_seq = 0, keywords = {arr = {
buffer = 0x0, element_size = 0}, v = 0x0, v_modifiable = 0x0}, flags = 32 ' ', uid_broken = 0,
expunged = 0, pseudo = 0, status_broken = 0, xstatus_broken = 0, from_offset = 564, body_size = 0,
offset = 564, space = 0}, seq = 2, hdr_offset = 564, body_offset = 564,
header_first_change = 4294967295, header_last_change = 0, header = 0x809c758,
hdr_md5_sum = "Ô\035\214Ù\217\000²\004é\200\t\230ìøB~", content_length = 18446744073709551615,
hdr_pos = {4294967295, 4294967295, 4294967295, 4294967295, 4294967295}, parsed_uid = 0,
last_uid_updated_value = 0, last_uid_value_start_pos = 0, have_eoh = 0, need_rewrite = 0,
seen_imapbase = 0, updated = 0, recent = 0, dirty = 0, imapbase_rewrite = 0, imapbase_updated = 0}
st = (const struct stat *) 0x80c0060
i = 0
ret = 52
partial = 1
#10 0xfeea4363 in mbox_sync_int (mbox=0x80b4868, flags=0, lock_id=0x8047988)
at ../../../../src/lib/array.h:158
index_sync_ctx = (struct mail_index_sync_ctx *) 0x80b62e0
sync_view = (struct mail_index_view *) 0x80b6320
trans = (struct mail_index_transaction *) 0x80c5890
sync_ctx = {mbox = 0x80b4868, flags = 0, input = 0x80c0180, file_input = 0x80c0040,
write_fd = 12, orig_mtime = 1414582020, orig_atime = 1414582021, orig_size = 3843471, last_stat = {
st_dev = 47513605, st_pad1 = {0, 0, 0}, st_ino = 17869, st_mode = 33152, st_nlink = 1,
st_uid = 22671, st_gid = 4601, st_rdev = 4294967295, st_pad2 = {0, 0}, st_size = 3843471,
st_atim = {tv_sec = 1414582021, tv_nsec = 353242309}, st_mtim = {tv_sec = 1414582020,
tv_nsec = 0}, st_ctim = {tv_sec = 1414582021, tv_nsec = 352990278}, st_blksize = 131072,
st_blocks = 7693, st_fstype = "zfs", '\0'