On 6.5.2014, at 23.24, Robert Nowotny <rnowotny@rotek.at> wrote:
when using xz compression, on high load (syncing thousands of emails) dovecot panics with : Panic: file ostream-lzma.c: line 147: unreached
after some investigation I found out that the call
ret = lzma_code(zs, LZMA_FINISH);
returns LZMA_OK (what is enumerated integer 0) sometimes.
again - this error will only show up under heavy load, for instance when syncing a lot of emails to a new mailbox with imapsync or dsync.
After patching the file ostream-lzma.c as follows, it seems to work now correctly.
Someone with more knowledge about the lzma library and that codepart should probably look over it, before merging it into the code.
I think your change is ok, but I did a bit more changes to make it work exactly the same as the example included in xz-utils, just in case something else might be still wrong. http://hg.dovecot.org/dovecot-2.2/rev/8e6d98d34dbf