| Summary: | race condition in libvirt could lead to crash on event handling | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Eric Blake <eblake> | |
| Component: | libvirt | Assignee: | Eric Blake <eblake> | |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 6.0 | CC: | dyuan, eblake, gren, mzhan, vbian, veillard, xen-maint | |
| Target Milestone: | rc | |||
| Target Release: | 6.1 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | libvirt-0.8.7-4.el6 | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 671569 (view as bug list) | Environment: | ||
| Last Closed: | 2011-05-19 13:26:07 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Bug Depends On: | ||||
| Bug Blocks: | 671569 | |||
|
Description
Eric Blake
2011-01-21 21:24:31 UTC
Patch posted for 6.1; should be a 6.0.z candidate as well: http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-January/msg01104.html Short of code inspection, I think the only way to verify this is with some intensive gdb manipulation to expose the race, as well as using MALLOC_PERTURB_ tuning to make realloc() overwrite just-freed data. It would involve writing a custom test scenario (although we could use tests/eventtest.c as a start) to set up just enough events where the next registration would trigger the realloc, then start the event loop, then register another event in the main thread. Then, in the debugger, you'd have to put a breakpoint in the main thread after the event loop is kicked off but before registering the next event, as well as an instruction level breakpoint at the point after the array base address has been read outside the lock, then resume the main thread to cause the array to be realloced, then back to the event thread to prove that stale memory was dereferenced. I haven't tried to set up such a scenario myself, because it seems like a lot of effort to set up such a test that will catch a window of only a few assembly instructions. Which unfortunately means that the best you may be able to do here is code inspection. According to Comment #4, Check in source packages that libvirt-event-fix-event-handling-data-race.patch has been included in libvirt-0.8.7-8.el6.src.rpm. So verify this bug as Passed with libvirt-0.8.7-8.el6.x86_64. checked with libvirt-0.8.7-18.el6.src.rpm libvirt-event-fix-event-handling-data-race.patch has been included So keep the VERIFIED status An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0596.html |