zstd icon indicating copy to clipboard operation
zstd copied to clipboard

[contrib/pzstd] Prevent hangs when there are errors

Open yotann opened this issue 8 months ago • 0 comments

When two threads are using a WorkQueue and the reader thread exits due to an error, it must call WorkQueue::finish() to wake up the writer thread. Otherwise, if the queue is full and the writer thread is waiting for a free slot, it could hang forever.

This can happen in pratice when decompressing a large, corrupted file that does not contain pzstd skippable frames.

yotann avatar Jun 20 '24 21:06 yotann