[Dovecot] Dovecot 1.1.1 + zlib plugin + mbox crash

Chris Wakelin c.d.wakelin at reading.ac.uk
Thu Jul 24 18:30:28 EEST 2008


Chris Wakelin wrote:
>>> I can try this in Solaris 10, but I don't really see why the
>>> OS/architecture should matter.
>>
>> Oh, unless there are some bugs in your zlib version, such as related to
>> seeking..
> 
> Could be, I imagine it's as prehistoric as the bzlib :)
> 

Right, I've tried dovecot-1.1.2 using my own zlib-1.2.3 (and 
bzlib-1.0.5) build on Solaris 8:

ldd lib20_zlib_plugin.so gives
         libz.so =>       /opt/RDGzlib/lib/libz.so
         libbz2.so =>     /opt/RDGbzlib/lib/libbz2.so ...

and get the same problems.

I've tried building on Solaris 10 (using Sun's zlib and bzlib2) and get 
a similar problem

ldd lib20_zlib_plugin.so
         libz.so.1 =>     /usr/lib/libz.so.1
         libbz2.so.1 =>   /usr/lib/libbz2.so.1 ...

After FETCH 1:167 FULL, FETCH 167 BODY[], FETCH 123 BODY[], FETCH 39 
BODY[], FETCH 23 BODY[] :-
> dovecot: Jul 24 16:02:51 Error: IMAP 28535 xxxxxxxx xxx.xxx.xxx.xxx : Cached message offset 45576 is invalid for mbox file (read-only mbox stream)
> dovecot: Jul 24 16:02:51 Error: IMAP 28535 xxxxxxxx xxx.xxx.xxx.xxx : Cached message offset 45576 is invalid for mbox file (read-only mbox stream)
> dovecot: Jul 24 16:02:51 Error: IMAP 28535 xxxxxxxx xxx.xxx.xxx.xxx : Losing sync for mail uid=23 in mbox file (read-only mbox stream)
> dovecot: Jul 24 16:02:51 Error: IMAP 28535 xxxxxxxx xxx.xxx.xxx.xxx : Unexpectedly lost From-line at 45576
> dovecot: Jul 24 16:02:51 Error: IMAP 28535 xxxxxxxx xxx.xxx.xxx.xxx : Unexpectedly lost From-line at 45576
> dovecot: Jul 24 16:02:51 Error: IMAP 28535 xxxxxxxx xxx.xxx.xxx.xxx : Couldn't get mbox size
> dovecot: Jul 24 16:02:51 Info: IMAP 28535 xxxxxxxx xxx.xxx.xxx.xxx : Disconnected: Internal error occurred. Refer to server log for more information. [2008-07-24 16:02:51] bytes=114/90517

On the SuSE box, it's fine. However, on all three boxes when I use bzip2 
instead (i.e. same folder, bzipped) I get a segfault crash after just 
"FETCH 1:167 FULL" :-

> dovecot: Jul 24 16:17:29 Error: child 28544 (imap) killed with signal 11

backtrace on the Solaris 8 version:

> #0  0xff2505a0 in memmove ()
>    from /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1
> #1  0xa6d60 in i_stream_compress (stream=0xfc930) at istream.c:301
> #2  0xff1414e4 in i_stream_zlib_seek (stream=0xfc930, v_offset=0, mark=true)
>     at istream-zlib.c:173
> #3  0xa6920 in i_stream_seek_mark (stream=0xfc958, v_offset=4443332646273026)
>     at istream.c:139
> #4  0x4f654 in istream_raw_mbox_seek (stream=0x1142f0, offset=0)
>     at istream-raw-mbox.c:625
> #5  0x45cd8 in mbox_file_seek (mbox=0x10e6b8, view=0x4868b0, seq=1,
>     deleted_r=0xffbeee37) at mbox-file.c:171
> #6  0x4739c in mbox_mail_seek (mail=0x10edd8) at mbox-mail.c:70
> #7  0x474f4 in mbox_mail_get_received_date (_mail=0xffffffff,
>     date_r=0xffbeef8c) at mbox-mail.c:103
> #8  0x6acf4 in mail_get_received_date (mail=0xffffffff, date_r=0xffbeef8c)
>     at mail.c:79
> #9  0x2aeb0 in fetch_internaldate (ctx=0x10edd8, mail=0x10edd8, context=0x0)
>     at imap-fetch.c:552
> #10 0x2a4fc in imap_fetch_more (ctx=0xf6180) at imap-fetch.c:309
> #11 0x2a744 in imap_fetch (ctx=0xf6180) at imap-fetch.c:361
> #12 0x23628 in cmd_fetch (cmd=0xf60f0) at cmd-fetch.c:152
> #13 0x28784 in client_command_input (cmd=0xf60f0) at client.c:580
> #14 0x28628 in client_command_input (cmd=0xf60f0) at client.c:629
> #15 0x2880c in client_handle_next_command (client=0xf5e90,
>     remove_io_r=0xffbef2bf) at client.c:670
> #16 0x288f4 in client_handle_input (client=0xf5e90) at client.c:680
> #17 0x28a40 in client_input (client=0xf5e90) at client.c:725
> #18 0xaa1a4 in io_loop_handler_run (ioloop=0xf29e8) at ioloop-poll.c:200
> #19 0xa99d4 in io_loop_run (ioloop=0xf29e8) at ioloop.c:308
> #20 0x31cf4 in main (argc=0, argv=0xffbef504, envp=0xffbef514) at main.c:293

I could send you the dovecot index files at each stage of the zlib test 
if that would help?

Chris

-- 
--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
Christopher Wakelin,                           c.d.wakelin at reading.ac.uk
IT Services Centre, The University of Reading,  Tel: +44 (0)118 378 8439
Whiteknights, Reading, RG6 2AF, UK              Fax: +44 (0)118 975 3094


More information about the dovecot mailing list