[Dovecot] new crashes: is the index/mail cache endian neutral?
Part of our migration plan takes our users from one endianness to another (big to little). Will the index and mail cache files survive? I'm seeing some new core dumps as the first test user is migrated, which makes me think... not. What about if we want to build dovecot 64 bit in the future? Will that cause problems too?
Stack trace is below the log messages. I've edited the user's name out and replaced it with foobar, and cleansed out a few sensitive things.
-dp
dovecot: Mar 01 08:46:49 Info: imap-login: Login: user=<foobar>, method=PLAIN, r ip=WWW.XXX.YYY.ZZ, lip=AAA.BBB.CC.DD, TLS dovecot: Mar 01 08:46:49 Info: IMAP(foobar): Effective uid=88442, gid=10, home=/ home/foobar dovecot: Mar 01 08:46:49 Info: IMAP(foobar): mbox: data=/home/foobar:INBOX=/var/ mail/foobar:INDEX=/home/foobar/Mail/imapd-indices dovecot: Mar 01 08:46:49 Info: IMAP(foobar): mbox: root=/home/foobar, index=/hom e/foobar/Mail/imapd-indices, inbox=/var/mail/foobar dovecot: Mar 01 08:46:50 Error: IMAP(foobar): Corrupted index file /home/foobar/ Mail/imapd-indices/.imap/INBOX/dovecot.index: messages_count too large (0 > 0) dovecot: Mar 01 08:46:50 Error: IMAP(foobar): Corrupted index file /home/foobar/ Mail/imapd-indices/.imap/INBOX/dovecot.index: messages_count too large (0 > 0) dovecot: Mar 01 08:46:50 Error: IMAP(foobar): Corrupted index cache file /home/f oobar/Mail/imapd-indices/.imap/INBOX/dovecot.index.cache: field header points ou tside file dovecot: Mar 01 08:46:51 Error: IMAP(foobar): Corrupted transaction log file /ho me/foobar/Mail/imapd-indices/.imap/INBOX/dovecot.index.log: unknown record type 0x10 dovecot: Mar 01 08:46:51 Warning: IMAP(foobar): fscking index file /home/foobar/ Mail/imapd-indices/.imap/INBOX/dovecot.index dovecot: Mar 01 08:46:51 Error: IMAP(foobar): Unexpected transaction log desync with index /home/foobar/Mail/imapd-indices/.imap/INBOX/dovecot.index dovecot: Mar 01 08:46:51 Info: IMAP(foobar): Disconnected: Mailbox is in inconsi stent state, please relogin. dovecot: Mar 01 08:48:06 Info: imap-login: Login: user=<foobar>, method=PLAIN, r ip=WWW.XXX.YYY.ZZ, lip=AAA.BBB.CC.DD, TLS dovecot: Mar 01 08:48:06 Info: IMAP(foobar): Effective uid=88442, gid=10, home=/ home/foobar dovecot: Mar 01 08:48:06 Info: IMAP(foobar): mbox: data=/home/foobar:INBOX=/var/ mail/foobar:INDEX=/home/foobar/Mail/imapd-indices dovecot: Mar 01 08:48:06 Info: IMAP(foobar): mbox: root=/home/foobar, index=/hom e/foobar/Mail/imapd-indices, inbox=/var/mail/foobar dovecot: Mar 01 09:07:09 Error: IMAP(foobar): Corrupted index file /home/foobar/ Mail/imapd-indices/Mail/.imap/zfs/dovecot.index: messages_count too large (27853 45536 > 1) dovecot: Mar 01 09:07:10 Error: IMAP(foobar): Corrupted index cache file /home/f oobar/Mail/imapd-indices/Mail/.imap/zfs/dovecot.index.cache: field header points outside file dovecot: Mar 01 09:20:44 Error: IMAP(foobar): Corrupted index file /home/foobar/ Mail/imapd-indices/Mail/.imap/NDMP/dovecot.index: messages_count too large (5200 93696 > 3) dovecot: Mar 01 09:20:44 Error: IMAP(foobar): Corrupted transaction log file /ho me/foobar/Mail/imapd-indices/Mail/.imap/NDMP/dovecot.index.log: start_offset (61 44) > file size (1768) dovecot: Mar 01 09:20:44 Warning: IMAP(foobar): fscking index file /home/foobar/ Mail/imapd-indices/Mail/.imap/NDMP/dovecot.index dovecot: Mar 01 09:20:44 Error: child 111112 (imap) killed with signal 11
-dp
#0 0x0809eaa1 in mail_index_lock_exclusive (index=0x8117c70,
lock_id_r=0x8047490) at mail-index-lock.c:326
ret = 0
__PRETTY_FUNCTION__ = "mail_index_lock_exclusive"
#1 0x0809e15e in mail_index_fsck (index=0x8117c70) at mail-index-fsck.c:169
error = 0x80e9498 ""
lock_id = 135173240
file_seq = 16777216
file_offset = 6144
ret = 134509928
lock_log = true
#2 0x080a5c49 in mail_transaction_log_file_set_corrupted (file=0x8101c30,
fmt=0x80d51a8 "start_offset (%llu) > file size (%llu)")
at mail-transaction-log.c:64
No locals.
#3 0x080a785e in mail_transaction_log_file_map (file=0x8101c30,
start_offset=6144, end_offset=18446744073709551615)
at mail-transaction-log.c:1313
index = (struct mail_index *) 0x8117c70
st = {st_dev = 47777187, st_pad1 = {0, 0, 0}, st_ino = 15761,
st_mode = 33152, st_nlink = 1, st_uid = 88442, st_gid = 10,
st_rdev = 4294967295, st_pad2 = {0, 0}, st_size = 1768, st_atim = {
tv_sec = 1172769644, tv_nsec = 151892829}, st_mtim = {tv_sec = 1172522367,
tv_nsec = 0}, st_ctim = {tv_sec = 1172732240, tv_nsec = 566025559},
st_blksize = 2048, st_blocks = 4,
st_fstype = "lofs", '\0'
-- Daniel Price - Solaris Kernel Engineering - dp@eng.sun.com - blogs.sun.com/dp
On Mon, 2007-03-05 at 01:21 -0800, Dan Price wrote:
Part of our migration plan takes our users from one endianness to another (big to little). Will the index and mail cache files survive?
It should rebuild the index files silently and automatically.
I'm seeing some new core dumps as the first test user is migrated, which makes me think... not.
Looks like the endianess check was done a bit too late. This should fix it: http://dovecot.org/list/dovecot-cvs/2007-March/007927.html
What about if we want to build dovecot 64 bit in the future? Will that cause problems too?
No, the index files will survive that change. If sizeof(off_t) changes then dovecot.index.cache file gets rebuilt, but the default is to use 64bit offsets also with 32bit machines (at least with Linux and Solaris).
dovecot: Mar 01 09:20:44 Warning: IMAP(foobar): fscking index file /home/foobar/ Mail/imapd-indices/Mail/.imap/NDMP/dovecot.index dovecot: Mar 01 09:20:44 Error: child 111112 (imap) killed with signal 11
http://dovecot.org/list/dovecot-cvs/2007-March/007929.html should fix this.
participants (2)
-
Dan Price
-
Timo Sirainen