-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible concurrency issue during deflate on libflate 0.1.25 #41
Comments
Thank you for reporting this issue. |
Address Sanitizer and/or Thread Sanitizer could be used to pinpoint the memory safety issue, see https://github.com/japaric/rust-san I'm not sure if they work on Windows, though. |
Sure, this is the (rather admittedly terrible as I am quite new to rust) project I'm starting https://github.com/mjc/mame_coalesce. I can try and isolate it a bit more if you want. I can try and reproduce it on Linux also if need be. |
Trying ASan, MemorySanitizer, and ThreadSan now. EDIT: none of the sanitizers detected anything, sadly. |
@mjc Thank you for your information! I will try to reproduce it on my local machine. |
|
excellent I'll retry today. also finally have a fast linux box to try this on too |
On both Linux and windows I don't experience this bug with the new zip crate update that doesn't use this library. |
I'm using
zip-rs
with rayon to zip many files concurrently (I think 16x? Whatever rayon ends up using on this machine) This works fine with compression level store, and with bzip2. (Bzip2 is also way, way faster, 150+MB/s instead of 10MB/s, but that is.... another issue.)All of the actual zipping is happening inside each loop iteration that is parallelized: open the source and destination files, io::copy, close the file when done.
When not using
par_iter
it completes successfully (but takes 14 hours to do so on a small test dataset of 283GB.)With deflate (which uses this library,) I run into the below stack trace eventually, on win64.
It takes about an hour or so to run into the issue and doesn't seem to be on the same file every time, so reducing this test case seems difficult.
I've also gotten an illegal instruction once or twice which makes me think there is undefined behavior somewhere in this lib.
The text was updated successfully, but these errors were encountered: