Changeset c02f29ca104d badly breaks LMTP/mdbox
$ gdb /usr/lib/dovecot/lmtp core_lmtp.48883.nihlus.leuxner.net GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 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 "x86_64-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/lib/dovecot/lmtp...Reading symbols from /usr/lib/debug/usr/lib/dovecot/lmtp...done. done. [New LWP 48883]
warning: Can't read pathname for load map: Input/output error. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `dovecot/lmtp'. Program terminated with signal 6, Aborted.
#0 0x00007f0ca373b165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt full
#0 0x00007f0ca373b165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1 0x00007f0ca373e3e0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2 0x00007f0ca3b0ef85 in default_fatal_finish (type=<optimized out>, status=status@entry=0) at failures.c:202
backtrace = 0x1385320 "/usr/lib/dovecot/libdovecot.so.0(+0x79f8f) [0x7f0ca3b0ef8f] -> /usr/lib/dovecot/libdovecot.so.0(+0x79fee) [0x7f0ca3b0efee] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f0ca3abebb5] -> /usr/lib/d"...
#3 0x00007f0ca3b0efee in i_internal_fatal_handler (ctx=0x7fffdfafecb0, format=<optimized out>, args=<optimized out>) at failures.c:666
status = 0
#4 0x00007f0ca3abebb5 in i_panic (format=format@entry=0x7f0ca3e61438 "file %s: line %d (%s): assertion failed: (%s)") at failures.c:276
ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0, timestamp_usecs = 0}
args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffdfafeda0, reg_save_area = 0x7fffdfafece0}}
#5 0x00007f0ca3dc1d7a in mdbox_map_append_finish (ctx=0x142ac90) at mdbox-map.c:1153
appends = 0x0
last = 0x142b1d0
count = <optimized out>
cur_offset = <optimized out>
__FUNCTION__ = "mdbox_map_append_finish"
#6 0x00007f0ca3dc3d08 in mdbox_save_finish_write (_ctx=0x142ab50) at mdbox-save.c:205
_data_stack_cur_id = 6
ctx = 0x142ab50
mail = 0x142c4a0
#7 mdbox_save_finish (ctx=0x142ab50) at mdbox-save.c:228
ret = 21152928
#8 0x00007f0ca3e070e2 in mailbox_save_finish (_ctx=_ctx@entry=0x7fffdfafee88) at mail-storage.c:2145
_data_stack_cur_id = 5
ctx = 0x142ab50
t = 0x1426a80
keywords = 0x0
pvt_flags = 0
copying_via_save = true
ret = <optimized out>
__FUNCTION__ = "mailbox_save_finish"
#9 0x00007f0ca3dfec32 in mail_storage_copy (ctx=0x0, ctx@entry=0x142ab50, mail=mail@entry=0x13eaf20) at mail-copy.c:107
No locals.
#10 0x00007f0ca3dc42bf in mdbox_copy (_ctx=0x142ab50, mail=0x13eaf20) at mdbox-save.c:444
ctx = 0x142ab50
save_mail = 0x13eaf20
src_mbox = <optimized out>
rec = {map_uid = 21146464, save_date = 0}
guid_data = 0x142ab68
wanted_guid = "\360=B\001\000\000\000\000\340\357E\242\f\177\000"
#11 0x00007f0ca245f21b in acl_copy (ctx=0x142ab50, mail=0x13eaf20) at acl-mailbox.c:435
t = <optimized out>
abox = 0x1423df0
#12 0x00007f0ca3e0728d in mailbox_copy (_ctx=_ctx@entry=0x7fffdfafefa8, mail=mail@entry=0x13eaf20) at mail-storage.c:2215
_data_stack_cur_id = 4
ctx = 0x142ab50
t = 0x1426a80
keywords = 0x0
pvt_flags = 0
backend_mail = 0x13eaf20
ret = <optimized out>
__FUNCTION__ = "mailbox_copy"
#13 0x00007f0ca17ae91e in act_store_execute (action=<optimized out>, aenv=0x1421d60, tr_context=0x14220f8) at sieve-actions.c:584
trans = 0x14220f8
mail = 0x13eaf20
save_ctx = 0x0
keywords = 0x0
backends_equal = <optimized out>
status = 1
#14 0x00007f0ca17a5ca5 in sieve_result_transaction_execute (first=<optimized out>, result=<optimized out>) at sieve-result.c:1172
act = 0x1422088
rsef = <optimized out>
sef = <optimized out>
rac = 0x1422088
status = <optimized out>
#15 sieve_result_execute (result=0x1421d30, keep=keep@entry=0x0) at sieve-result.c:1387
status = <optimized out>
result_status = <optimized out>
first_action = 0x1422088
last_action = 0x0
implicit_keep = true
ret = <optimized out>
#16 0x00007f0ca17b5e45 in sieve_execute (sbin=<optimized out>, msgdata=<optimized out>, senv=<optimized out>, ehandler=ehandler@entry=0x140cba0, flags=flags@entry=SIEVE_RUNTIME_FLAG_NOGLOBAL, keep=keep@entry=0x0) at sieve.c:560
result = 0x1421d30
ret = 1
#17 0x00007f0ca1a113f5 in lda_sieve_singlescript_execute (srctx=0x7fffdfaff170) at lda-sieve-plugin.c:491
sbin = 0x14196a0
rtflags = SIEVE_RUNTIME_FLAG_NOGLOBAL
debug = false
svinst = 0x14092e0
script = 0x140d3c0
user_script = <optimized out>
cpflags = SIEVE_COMPILE_FLAG_NOGLOBAL
ret = <optimized out>
ehandler = 0x140cba0
error = <optimized out>
#18 lda_sieve_execute (storage_r=0x7fffdfaff338, srctx=0x7fffdfaff170) at lda-sieve-plugin.c:927
msgdata = {mail = 0x13eaf20, return_path = 0x13b63c8 "bounces+20150117-lists=leuxner.net@packages.qa.debian.org", orig_envelope_to = 0x13b6c40 "tlx@leuxner.net", final_envelope_to = 0x13b6c40 "tlx@leuxner.net",
auth_user = 0x13efc38 "tlx@leuxner.net", id = 0x13eb8a0 "1421485513.5048.5.camel@kaspar.in"}
estatus = {last_storage = 0x13f9cb0, message_saved = 0, message_forwarded = 0, tried_default_save = 0, keep_original = 0, store_failed = 0}
debug = <optimized out>
ret = <optimized out>
mdctx = 0x7fffdfaff360
svinst = <optimized out>
scriptenv = {action_log_format = 0x13d1c98 "msgid=%m: %$", user = 0x13efb50, default_mailbox = 0x4094dc "INBOX", postmaster_address = 0x13b5740 "postmaster@spectre.leuxner.net", mailbox_autocreate = false,
mailbox_autosubscribe = false, script_context = 0x7fffdfaff360, smtp_start = 0x7f0ca1a10190
Should be fixed now. I think I'm now done for a while with the new core development work that was needed, so things shouldn't break so easily for a while. Although the body.snippet stuff still needs some more work.
- Timo Sirainen tss@iki.fi 2015.01.20 06:42:
Should be fixed now. I think I'm now done for a while with the new core development work that was needed, so things shouldn't break so easily for a while. Although the body.snippet stuff still needs some more work.
Looks good now after some testing. On a related note: Is there some tool/script available which can rebuild indexes in such a scenario? Since a whole 'm.' file has been corrupted the only way to mitigate this was restoring from a backup. As I don't want to do high frequency snapshots I wonder how to cope with mdbox corruptions?
Jan 17 10:15:45 nihlus dovecot: lmtp(tlx@leuxner.net): Warning: fscking index file /var/vmail/public/storage/dovecot.map.index Jan 17 10:15:45 nihlus dovecot: lmtp(tlx@leuxner.net): Warning: mdbox /var/vmail/public/storage: rebuilding indexes Jan 17 10:15:45 nihlus dovecot: lmtp(tlx@leuxner.net): Error: Corrupted dbox file /var/vmail/public/storage/m.132 (around offset=1): Invalid dbox version Jan 17 10:15:45 nihlus dovecot: lmtp(tlx@leuxner.net): Error: mdbox rebuild: Failed to fix file /var/vmail/public/storage/m.132 Jan 17 10:15:45 nihlus dovecot: lmtp(tlx@leuxner.net): Error: Corrupted dbox file /var/vmail/public/storage/m.131 (around offset=1): Invalid dbox version Jan 17 10:15:45 nihlus dovecot: lmtp(tlx@leuxner.net): Error: mdbox rebuild: Failed to fix file /var/vmail/public/storage/m.131 Jan 17 10:15:45 nihlus dovecot: lmtp(tlx@leuxner.net): Error: Corrupted dbox file /var/vmail/public/storage/m.130 (around offset=1): Invalid dbox version Jan 17 10:15:45 nihlus dovecot: lmtp(tlx@leuxner.net): Error: mdbox rebuild: Failed to fix file /var/vmail/public/storage/m.130 Jan 17 10:15:45 nihlus dovecot: lmtp(tlx@leuxner.net): Error: Corrupted dbox file /var/vmail/public/storage/m.127 (around offset=1): Invalid dbox version Jan 17 10:15:45 nihlus dovecot: lmtp(tlx@leuxner.net): Error: mdbox rebuild: Failed to fix file /var/vmail/public/storage/m.127 Jan 17 10:15:48 nihlus dovecot: lmtp(48904): Disconnect from local: Successful quit
participants (2)
-
Thomas Leuxner
-
Timo Sirainen