-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Handle leak in parallel (nThread > 1) zstd decompression #633
Comments
Could you send a minimal, self-contained C program showing the leak? Also, if you can beat us and contribute a patch, that would be great. Thanks! |
Hi @FrancescAlted, Thank you very much for your fast reply! Please find below a simple vs 2022 C++ application showing up the resources leak. Hope this will help you. We also see the likelihood of a wrong API usage on our side. We’re mainly focused on C# Development and we do not have any experiences in this kind of “compression” domain. Best Regards, |
I have used your program (see contexts3.c.zip), but valgrind is not reporting any leak:
So, after 10 iterations there is no leak. There should be another thing going on in your application. I'm going to close this. In case you find another example showing the leak, please feel free to reopen. |
Hi, I'm not really familiar with valgrind. Does it also check if threads are correctly released/stopped after decompression? Maybe this is a windows specific Issue? |
Would like to reopen this issue. However, it seems that I do not have the appropriate permissions. |
Reopened by @jocbeh demand in #647. I am not sure why you are not able to re-open a ticket that was originally opened by yourself, but anyway. As said, I am not detecting any leak on Unix, and we lack windows boxes for development, so I am afraid that you (or others) will need to provide more hints on this one, or a possible fix (via a PR preferably). |
Hi @FrancescAlted, thank you for re-opening the issue. I'll try to find out more details about the root cause. |
Describe the bug
Resources leak has been observed in blosc2_decompress_ctx for zstd with nthreads > 1.
It seems that thread resources are not properly released when zstd is decompressed in parallel.
Though the leak of a single decompression is quite small and neglectable, it leads inevitable to unacceptable behavior in long running application with very frequent blosc2_decompress_ctx calls.
Bug was initially found in blosc2 version 2.14.4 and is still reproducible in blosc2 version 2.15.1.
To Reproduce
Use blosc2_decompress_ctx with nthreads > 1 and zstd. Decompress lots of objects and observe handle/thread consumption.
Expected behavior
Threads are released.
Logs
System information:
Additional context
The text was updated successfully, but these errors were encountered: