[Dovecot] signal 11 crash, sometimes, during mbox bz2 decompression
Hello again,
I'm running dovecot 1.2.16 from the ports collection on FreeBSD 8.1-STABLE, amd64.
To enable IMAP read-only access to gzip or bzip2 compressed mbox files, I added the following to my dovecot.conf, in the protocol imap { ... } section: mail_plugins = zlib
My compressed mbox files are all .bz2 files in an 'old' subdirectory of my main mail directory. I am trying to access them with Thunderbird. I 'subscribed' to them just fine, and at first I thought it was working, but I just got lucky on the first couple I accessed. Dovecot actually fails to decompress them about 90% of the time, seemingly at random; the same box will not work a bunch of times, then work once, then not work again and again. When it works, sometimes only some of the messages get transmitted.
Most of the failures are accompanied by this pair of messages in my log:
Aug 16 00:25:33 myhost dovecot: dovecot: child 943 (imap) killed with signal 11 (core not dumped - set mail_drop_priv_before_exec=yes) Aug 16 00:25:33 myhost kernel: pid 943 (imap), uid 1001: exited on signal 11
Some of the failures have only the "exited on signal 11" message.
The very first failure had this:
Aug 16 00:22:47 myhost dovecot: IMAP(mike): Next message unexpectedly lost from mbox file (read-only mbox stream) at 2761 (cached) Aug 16 00:22:47 myhost dovecot: IMAP(mike): read(mail, uid=2) failed: Invalid argument
Is this a problem with dovecot? Let me know if/how I can help, or what other info you need.
Thanks, Mike
On Tue, 2011-08-16 at 05:00 -0600, Mike Brown wrote:
I'm running dovecot 1.2.16 from the ports collection on FreeBSD 8.1-STABLE, amd64. .. My compressed mbox files are all .bz2 files in an 'old' subdirectory of my main mail directory. I am trying to access them with Thunderbird. I 'subscribed' to them just fine, and at first I thought it was working, but I just got lucky on the first couple I accessed. Dovecot actually fails to decompress them about 90% of the time, seemingly at random; the same box will not work a bunch of times, then work once, then not work again and again. When it works, sometimes only some of the messages get transmitted.
I'm not entirely sure but I kind of remember bzip2 support being at least somewhat broken in v1.x. It's been entirely rewritten in v2.0.
Aug 16 00:25:33 myhost dovecot: dovecot: child 943 (imap) killed with signal 11 (core not dumped - set mail_drop_priv_before_exec=yes)
gdb backtrace would show more information about where it crashed: http://dovecot.org/bugreport.html
But I don't think there's much point in wasting more time on this before trying if v2.0 has already fixed it.
On 8/23/2011 11:47 AM, Timo Sirainen wrote:
On Tue, 2011-08-16 at 05:00 -0600, Mike Brown wrote:
I'm running dovecot 1.2.16 from the ports collection on FreeBSD 8.1-STABLE, amd64. ..
Thanks for the reply. Since you recommended updating to dovecot2, I'm now testing dovecot 2.0.14 from the ports collection on a different machine. Hopefully I got the configuration right.
# dovecot -n # 2.0.14: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 8.2-RELEASE-p2 i386 mail_location = mbox:~/mail:INBOX=/var/mail/%u mail_plugins = " zlib" passdb { args = %s driver = pam } plugin { zlib_save = bz2 zlib_save_level = 9 } protocols = imap ssl_cert =
On this system, I have the same setup with bz2-compressed mbox files. They're still inaccessible from Thunderbird, but dovecot isn't crashing with signal 11 anymore. Instead, the maillog says this for every compressed box it tries to check:
Sep 12 02:37:14 chilled dovecot: imap(mike): Error: read(/home/mike/mail/old/sent-1999-07.bz2) failed: Invalid argument (uid=2) Sep 12 02:37:14 chilled dovecot: imap(mike): Disconnected: Internal error occurred. Refer to server log for more information. [2011-09-12 02:37:14] bytes=5492/2664368 Sep 12 02:37:14 chilled dovecot: imap(mike): Error: Next message unexpectedly lost from mbox file /home/mike/mail/old/sent-1999-07.bz2 at 536 (cached)
Did I misconfigure something?
On Mon, 2011-09-12 at 02:55 -0600, Mike Brown wrote:
On this system, I have the same setup with bz2-compressed mbox files. They're still inaccessible from Thunderbird, but dovecot isn't crashing with signal 11 anymore. Instead, the maillog says this for every compressed box it tries to check:
Sep 12 02:37:14 chilled dovecot: imap(mike): Error: read(/home/mike/mail/old/sent-1999-07.bz2) failed: Invalid argument (uid=2) Sep 12 02:37:14 chilled dovecot: imap(mike): Disconnected: Internal error occurred. Refer to server log for more information. [2011-09-12 02:37:14] bytes=5492/2664368 Sep 12 02:37:14 chilled dovecot: imap(mike): Error: Next message unexpectedly lost from mbox file /home/mike/mail/old/sent-1999-07.bz2 at 536 (cached)
Oh, wonder why no one else has complained about that. Fixed: http://hg.dovecot.org/dovecot-2.0/rev/a930318a74a1
On 9/12/2011 5:28 AM, Timo Sirainen wrote:
Oh, wonder why no one else has complained about that. Fixed: http://hg.dovecot.org/dovecot-2.0/rev/a930318a74a1 I tested this patch, and it's working like a charm. Thanks!
participants (2)
-
Mike Brown
-
Timo Sirainen