On July 5, 2017 at 6:38 PM Anton Yuzhaninov <citrin@citrin.ru> wrote:
Hello,
I use mbox compressed by gzip as read-only folder (using zlib plugin).
I have errors in logs: Panic: file istream-zlib.c: line 416 (i_stream_zlib_seek): assertion failed: (ret == -1) and can't read messages in MUA.
IMAP commands to reproduce a bug:
1 SELECT "compressed.gz" 2 UID fetch 2 BODY.PEEK[] # sleep 5 3 UID fetch 2 BODY.PEEK[] # repeat sleep/fetch until assert (a few fetches need to trigger bug, probably because of caching)
The bug appeared in 2.2.26 and still can be reproduced (in 2.2.31)
Using 'git bisect' was not productive (a lot of build errors), but I've found that reverting this commit: https://github.com/dovecot/core/commit/6a1110d8757bb72fd90f4fe0857fd3aeaf892...
"fixes" problem for me, so I suppose the bug was introduced in this commit.
-- Best Regards, Anton Yuzhaninov
If you only revert the bit here
} while (i_stream_read(&stream->istream) > 0);
} while ((ret = i_stream_read(&stream->istream)) > 0);
in src/lib-compression/istream-zlib.c
does it still fix the issue?
Aki