Coredump v2.3.8 specific msg fetch, corrupted record in index cache, Broken physical size

Timo Sirainen timo at sirainen.com
Sun Oct 20 12:25:00 EEST 2019


On 18 Oct 2019, at 15.36, Erik de Waard via dovecot <dovecot at dovecot.org> wrote:
> 
> Hi, i'm getting a coredump on a specific msg, i've attached the gdb.
> 
> file on disk i noticed W=<vsize> is missing.
> 1571209735.M744550P1608.rwvirtual65,S=15886:2,S
..
> mail.log
> Oct 18 14:41:39 rwvirtual10 dovecot: imap(johndoe at company.nl <mailto:johndoe at company.nl>)<15868><qjTFpy6VPsMKAAok>: Error: Mailbox INBOX.Debug: UID=1041: read(/data/mail/company.nl/users/johndoe/Maildir/.Debug/cur/1571209735.M744550P1608.rwvirtual65,S=15886:2,S <http://company.nl/users/johndoe/Maildir/.Debug/cur/1571209735.M744550P1608.rwvirtual65,S=15886:2,S>) failed: Cached message size smaller than expected (15886 < 16367, box=INBOX.Debug, UID=1041) (read reason=mail stream)
> Oct 18 14:41:39 rwvirtual10 dovecot: imap(johndoe at company.nl <mailto:johndoe at company.nl>)<15868><qjTFpy6VPsMKAAok>: Error: Corrupted record in index cache file /data/indexes/johndoe at company.nl/.Debug/dovecot.index.cache <http://johndoe@company.nl/.Debug/dovecot.index.cache>: UID 1041: Broken physical size in mailbox INBOX.Debug: read(/data/mail/company.nl/users/johndoe/Maildir/.Debug/cur/1571209735.M744550P1608.rwvirtual65,S=15886:2,S <http://company.nl/users/johndoe/Maildir/.Debug/cur/1571209735.M744550P1608.rwvirtual65,S=15886:2,S>) failed: Cached message size smaller than expected (15886 < 16367, box=INBOX.Debug, UID=1041)
> Oct 18 14:41:39 rwvirtual10 dovecot: imap(johndoe at company.nl <mailto:johndoe at company.nl>)<15868><qjTFpy6VPsMKAAok>: Panic: file istream.c: line 315 (i_stream_read_memarea): assertion failed: (old_size <= _stream->pos - _stream->skip)

The missing W shouldn't matter, but the S size is wrong. So the error is expected, but the panic isn't. I tried to reproduce this, but I couldn't get the panic to happen. Do you still have the file? Could you send it to me? You can also put it through https://dovecot.org/tools/maildir-obfuscate.pl which should remove all sensitive content but hopefully still contain enough to reproduce the bug.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20191020/9ebca031/attachment.html>


More information about the dovecot mailing list