Crash on index upgrade: failed to mmap new message file
Thomas Jarosch
thomas.jarosch at intra2net.com
Thu Feb 6 12:00:36 EST 2014
Hi,
I just encountered one system where cyr_expire / reconstruct / imapd process
died during the index upgrade from cyrus 2.3.16 to 2.4.17.
The error message was:
"fatal error: failed to mmap new message file"
To make a long debug session short: One folder had a broken "cyrus.index"
file that seemed to contain an index record for uid 0 (-> invalid record).
(I saved the file in case it's of interest)
Consider this call stack:
upgrade_index_record():
-> mailbox_message_fname(mailbox, record->uid)
-> message_parse(fname, record)
When mailbox_message_fname(mailbox, record->uid) is called for uid 0,
the function returns the folder name without any message filename.
In my case that was ".../user/xxx/Sent items" instead of
".../user/xxx/Sent items/123.".
message_parse() then calls map_refresh() with the folder name (ugh!)
and dies with the above error message.
The workaround was to kill the broken cyrus.index file and run reconstruct.
@Bron: Do you know by chance if this error case is detected in 2.5?
I took a quick look at the code in git HEAD and it seems to behave the same.
Cheers,
Thomas
More information about the Cyrus-devel
mailing list