[Dovecot] assertion failed: (need_space == (uoff_t)-mails[idx].space)
I'm running Dovecot dovecot-1.0.r13 on FreeBSD (FreeBSD 6.1-RELEASE- p10). Mail is stored in mbox format (dovecot.conf after the msg).
Procmail delivers mail to subfolders under ~/.mail, locking using
dotfiles. One folder in particular for one user has an mbox file
~/.mail/Cron.
Quite often, I'll see that procmail processes are stacking up because
~/.mail/Cron.lock exists, and they (rightly) refuse to deliver to a
locked mailbox. It seems that dovecot is creating these lock files
and then dying. The .lock file's contents refer to a PID that, by the
time I see the lockfile, doesn't exist.
It appears that dovecot is leaving behind the lock files, after
exiting with a signal 6 (sometimes 11) and leaving behind messages
in /var/log/maillog (and the end of this message).
In dovecot.conf I have mail_drop_priv_before_exec = no, but I can't
find the core file that I would expect it to dump, so I can't give
you a backtrace. Hopefully the assertion in /var/log/maillog is enough.
With ~/.mail/Cron perpetually locked, I'm not able to receive mail in
this folder, and with any IMAP client that tries to access that
folder having the IMAP server shut down, it keeps me from getting
mail. Any ideas?
# tail /var/log/maillog
Nov 11 23:05:32 melchoir dovecot: imap-login: Login:
user=<ketralnis>, method=PLAIN, rip=10.0.1.239, lip=10.0.0.1, TLS
Nov 11 23:05:32 melchoir dovecot: IMAP(ketralnis): Disconnected:
Logged out
Nov 11 23:06:52 melchoir dovecot: IMAP(ketralnis): file mbox-sync-
rewrite.c: line 405 (mbox_sync_read_and_move): assertion failed:
(need_space == (uoff_t)-mails[idx].space)
Nov 11 23:06:52 melchoir dovecot: child 16929 (imap) killed with
signal 6
Here is dovecot.conf:
# cat /usr/local/etc/dovecot.conf | sed -E 's/^(.*)#.*$/\1/' | grep -
Ev '(^#|^[ ]*$'
protocols = imap pop3 imaps pop3s
ssl_cert_file = /etc/ssl/mail-cert.pem
ssl_key_file = /etc/ssl/private/mail-key.pem
disable_plaintext_auth = no
login_user = dovecot
verbose_proctitle = yes
first_valid_gid = 0
mail_extra_groups = mail
default_mail_env = mbox:%h/.mail:INBOX=/var/mail/%u
mmap_disable = no
lock_method = fcntl
mbox_read_locks = dotlock
mbox_write_locks = dotlock fcntl
mail_drop_priv_before_exec = no
protocol imap {
login_greeting_capability = yes
imap_client_workarounds = delay-newmail outlook-idle netscape-eoh
tb-extra-mailbox-sep
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
auth default {
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
userdb prefetch {
}
user = root
}
On Sat, 2006-11-11 at 23:15 -0800, David King wrote:
I'm running Dovecot dovecot-1.0.r13 on FreeBSD (FreeBSD 6.1-RELEASE- p10). Mail is stored in mbox format (dovecot.conf after the msg).
I fixed one reason for this in rc11, but I don't know why it would happen in rc13 anymore..
In dovecot.conf I have mail_drop_priv_before_exec = no, but I can't
find the core file that I would expect it to dump, so I can't give
you a backtrace. Hopefully the assertion in /var/log/maillog is enough.
You need to have mail_drop_priv_before_exec=yes to get the core files, and ulimit -c set to be high enough before starting dovecot.
With ~/.mail/Cron perpetually locked, I'm not able to receive mail in
this folder, and with any IMAP client that tries to access that
folder having the IMAP server shut down, it keeps me from getting
mail. Any ideas?
If it happens only for that one mailbox, can you easily reproduce the crash then? If so, could you put the mbox file through http://dovecot.org/tools/mbox-anonymize.pl and send it to me? There's something in the mbox that Dovecot doesn't seem to like.
passdb pam { } userdb passwd { } userdb prefetch { }
BTW. There's no use to have prefetch there, since passwd will always get used before that.
In dovecot.conf I have mail_drop_priv_before_exec = no, but I can't find the core file that I would expect it to dump, so I can't give you a backtrace. Hopefully the assertion in /var/log/maillog is
enough. You need to have mail_drop_priv_before_exec=yes to get the core files, and ulimit -c set to be high enough before starting dovecot.
Ah, makes sense, I feel dumb now :)
Here's a backtrace from imap.core, I can do more with the core if it
helps
#0 0x182bc437 in kill () from /lib/libc.so.6 #1 0x182bc3d6 in raise () from /lib/libc.so.6 #2 0x182baf02 in abort () from /lib/libc.so.6 #3 0x080b7355 in i_set_failure_file () #4 0x080b6dc9 in i_panic () #5 0x0807c19d in mbox_sync_try_rewrite () #6 0x0807c70e in mbox_sync_rewrite () #7 0x08076df9 in mbox_sync_apply_index_syncs () #8 0x0807756b in mbox_sync_apply_index_syncs () #9 0x08078326 in mbox_sync_apply_index_syncs () #10 0x08078bea in mbox_sync () #11 0x08070456 in mbox_is_valid_mask () #12 0x080a8607 in mailbox_close () #13 0x080569e2 in cmd_copy () #14 0x0805a573 in cmd_uid () #15 0x0805b12c in _client_reset_command () #16 0x0805b21d in _client_input () #17 0x080bd39c in io_loop_handler_run () #18 0x080bccb8 in io_loop_run () #19 0x08064078 in main ()
With ~/.mail/Cron perpetually locked, I'm not able to receive mail in this folder, and with any IMAP client that tries to access that folder having the IMAP server shut down, it keeps me from getting mail. Any ideas? If it happens only for that one mailbox, can you easily reproduce the crash then? If so, could you put the mbox file through http://dovecot.org/tools/mbox-anonymize.pl and send it to me? There's something in the mbox that Dovecot doesn't seem to like.
Sent it to you
passdb pam { } userdb passwd { } userdb prefetch { } BTW. There's no use to have prefetch there, since passwd will
always get used before that.
Good to know
After much frustration I finally deleted all of the .imap directories
in the mbox directory tree and the problem seems to have gone away.
-- David
On 12 Nov 2006, at 03:19, Timo Sirainen wrote:
On Sat, 2006-11-11 at 23:15 -0800, David King wrote:
I'm running Dovecot dovecot-1.0.r13 on FreeBSD (FreeBSD 6.1-RELEASE- p10). Mail is stored in mbox format (dovecot.conf after the msg).
I fixed one reason for this in rc11, but I don't know why it would happen in rc13 anymore..
In dovecot.conf I have mail_drop_priv_before_exec = no, but I can't find the core file that I would expect it to dump, so I can't give you a backtrace. Hopefully the assertion in /var/log/maillog is
enough.You need to have mail_drop_priv_before_exec=yes to get the core files, and ulimit -c set to be high enough before starting dovecot.
With ~/.mail/Cron perpetually locked, I'm not able to receive mail in this folder, and with any IMAP client that tries to access that folder having the IMAP server shut down, it keeps me from getting mail. Any ideas?
If it happens only for that one mailbox, can you easily reproduce the crash then? If so, could you put the mbox file through http://dovecot.org/tools/mbox-anonymize.pl and send it to me? There's something in the mbox that Dovecot doesn't seem to like.
passdb pam { } userdb passwd { } userdb prefetch { }
BTW. There's no use to have prefetch there, since passwd will
always get used before that.
participants (2)
-
David King
-
Timo Sirainen