Bug 604806
Summary: | Double free in libblkid | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jerry James <loganjerry> |
Component: | util-linux-ng | Assignee: | Karel Zak <kzak> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 13 | CC: | kzak |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-07-20 07:50:59 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jerry James
2010-06-16 18:47:16 UTC
Jerry, run the application with BLKID_DEBUG= env. variable, for example: BLKID_DEBUG=0xffff /the/application and send my the debug output. Please. It hasn't happened again yet. However, I did trigger a segfault in libblkid while trying to catch the double free. I'll file a separate bug report on that one. Meanwhile, I'll keep trying to catch this with BLKID_DEBUG on. Wait, maybe the problem is that I'm an idiot. Is libblkid thread safe? I just noticed that 2 different threads can call into it concurrently. I'll just wrap those calls with a mutex and see if it starts behaving better. The library should be thread safe if you don't share the same blkid_cache or blkid_probe handlers between more threads. If you use mutex to access the cache or if you have cache per thread then there should not be a problem. Unfortunately, BLKID_DEBUG is probably not thread safe. There is strerror() used in the debug messages... I'll fix it ASAP. There's the problem then: the blkid_cache is shared by the two threads. I now have it protected with a mutex. Hopefully that will resolve the issue. Thanks for your help! Closing, problem resolved (comment #5). |