Bug 1033061
| Summary: | [abrt] libvirt-daemon-1.1.1-12.el7: xsltFreeExtDef: Process /usr/sbin/libvirtd was killed by signal 11 (SIGSEGV) | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Tomas Dolezal <todoleza> | ||||||||||||||||||||||
| Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> | ||||||||||||||||||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||||||||||||||||||
| Severity: | unspecified | Docs Contact: | |||||||||||||||||||||||
| Priority: | unspecified | ||||||||||||||||||||||||
| Version: | 7.0 | CC: | acathrow, dyuan, mprivozn, mzhan, todoleza, ydu, zhwang | ||||||||||||||||||||||
| Target Milestone: | rc | ||||||||||||||||||||||||
| Target Release: | --- | ||||||||||||||||||||||||
| Hardware: | x86_64 | ||||||||||||||||||||||||
| OS: | Unspecified | ||||||||||||||||||||||||
| Whiteboard: | abrt_hash:b60cc3ca4585400bb07667cd9b86aa38e74d8d0c | ||||||||||||||||||||||||
| Fixed In Version: | libvirt-1.1.1-14.el7 | Doc Type: | Bug Fix | ||||||||||||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||||||||||||
| Clone Of: | Environment: | ||||||||||||||||||||||||
| Last Closed: | 2014-06-13 12:15:11 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: | |||||||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||||
|
Description
Tomas Dolezal
2013-11-21 13:50:44 UTC
Created attachment 827186 [details]
File: backtrace
Created attachment 827187 [details]
File: cgroup
Created attachment 827188 [details]
File: core_backtrace
Created attachment 827189 [details]
File: dso_list
Created attachment 827190 [details]
File: environ
Created attachment 827191 [details]
File: limits
Created attachment 827194 [details]
File: maps
Created attachment 827197 [details]
File: open_fds
Created attachment 827199 [details]
File: proc_pid_status
Created attachment 827201 [details]
File: var_log_messages
Created attachment 827205 [details]
File: sosreport.tar.xz
Just for the record; it seems like we're hitting a gcc bug here. From the stack trace we can clearly see virObjectUnref() is called from two separate threads over the very same object (obj = 0x7f4968018260). Both threads got reference counter equal to zero and hence started executing destroy callback.
The code snippet that is responsible for atomic dec & test:
# define virAtomicIntDecAndTest(atomic) \
(__extension__ ({ \
(void)verify_true(sizeof(*(atomic)) == sizeof(int)); \
(void)(0 ? *(atomic) ^ *(atomic) : 0); \
__sync_fetch_and_sub((atomic), 1) == 1; \
}))
This function is supposed to return true if the callee held the last reference to an object. Otherwise, false is expected. However, it seems like __sync_fetch_and_sub() is not that atomic as one might think as it returned 1 in both threads. I'm investigating this further and I'll keep the BZ updated.
Tomas, can you please attach debug logs http://wiki.libvirt.org/page/DebugLogs and give me steps to reproduce? I'm unable to reproduce this myslef. I *think* this patch may help me to understand what's going on. I've built a scratch build for you to test (if you have some spare time): http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6664683 Please make sure you've got debug logs turned on when reproducing the bug: http://wiki.libvirt.org/page/DebugLogs Hi Michal, unfortunately this abrt-caught bug's reproducer is unknown to me. It happened just after restarting libvirtd.service. I did it because networking between host&guest was not working at all. Neither the restart helped as it usually does. All went running again after reboot. Nevermind. With couple of tries (and intentionally inserted sleep()-s into the right places) I was able to reproduce it. And I think I know what's going on. Unfortunatelly, I don't have a design how to fix it. Neiter has the upstream: http://www.redhat.com/archives/libvir-list/2013-October/msg00754.html I believe this patch solves the issue: https://www.redhat.com/archives/libvir-list/2013-December/msg00149.html Moving to POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2013-December/msg00032.html Thanks for @Michal's mail. Now, for libvirt-1.1.1-14.el7.x86_64, the logs look like good, it this OK to move this bug to VERIFIED? ... 2013-12-13 07:03:51.031+0000: 11933: debug : virObjectNew:199 : OBJECT_NEW: obj=0x7f0f340b8d50 classname=virNetcfDriverState 2013-12-13 07:03:51.456+0000: 11933: debug : virObjectRef:293 : OBJECT_REF: obj=0x7f0f340b8d50 2013-12-13 07:03:51.457+0000: 11933: debug : virObjectUnref:256 : OBJECT_UNREF: obj=0x7f0f340b8d50 2013-12-13 07:03:51.522+0000: 11933: debug : virObjectRef:293 : OBJECT_REF: obj=0x7f0f340b8d50 2013-12-13 07:03:51.522+0000: 11933: debug : virObjectUnref:256 : OBJECT_UNREF: obj=0x7f0f340b8d50 2013-12-13 07:03:51.522+0000: 11933: debug : virObjectRef:293 : OBJECT_REF: obj=0x7f0f340b8d50 2013-12-13 07:03:51.523+0000: 11933: debug : virObjectUnref:256 : OBJECT_UNREF: obj=0x7f0f340b8d50 2013-12-13 07:03:51.523+0000: 11933: debug : virObjectRef:293 : OBJECT_REF: obj=0x7f0f340b8d50 2013-12-13 07:03:51.524+0000: 11933: debug : virObjectUnref:256 : OBJECT_UNREF: obj=0x7f0f340b8d50 ... I rather see whole log before confirming for sure. The key point here is that an object is not used *after* it has been disposed. That is: 2013-12-13 07:03:51.031+0000: 11933: debug : virObjectNew:199 : OBJECT_NEW: obj=0x7f0f340b8d50 classname=virNetcfDriverState This creates a new object. Then we see a couple of refs and unrefs: 2013-12-13 07:03:51.456+0000: 11933: debug : virObjectRef:293 : OBJECT_REF: obj=0x7f0f340b8d50 2013-12-13 07:03:51.457+0000: 11933: debug : virObjectUnref:256 : OBJECT_UNREF: obj=0x7f0f340b8d50 So far so good. But what's missing is the last part, where the object is disposed, something like 2013-12-13 07:03:51.457+0000: 11933: debug : virObjectUnref:256 : OBJECT_DISPOSE: obj=0x7f0f340b8d50 and then we must not see any REF on obj=0x7f0f340b8d50. (In reply to Michal Privoznik from comment #22) > I rather see whole log before confirming for sure. The key point here is > that an object is not used *after* it has been disposed. That is: > > 2013-12-13 07:03:51.031+0000: 11933: debug : virObjectNew:199 : OBJECT_NEW: > obj=0x7f0f340b8d50 classname=virNetcfDriverState > > This creates a new object. Then we see a couple of refs and unrefs: > > 2013-12-13 07:03:51.456+0000: 11933: debug : virObjectRef:293 : OBJECT_REF: > obj=0x7f0f340b8d50 > 2013-12-13 07:03:51.457+0000: 11933: debug : virObjectUnref:256 : > OBJECT_UNREF: obj=0x7f0f340b8d50 > > So far so good. But what's missing is the last part, where the object is > disposed, something like Yes, i didn't restart ibvirtd before collect the logs, so missed the last part. Now the logs look like: 2013-12-13 08:23:52.830+0000: 12158: debug : virObjectNew:199 : OBJECT_NEW: obj=0x7f22780b8990 classname=virNetcfDriverState 2013-12-13 08:23:53.271+0000: 12158: debug : virObjectRef:293 : OBJECT_REF: obj=0x7f22780b8990 2013-12-13 08:23:53.272+0000: 12158: debug : virObjectUnref:256 : OBJECT_UNREF: obj=0x7f22780b8990 2013-12-13 08:23:53.330+0000: 12158: debug : virObjectRef:293 : OBJECT_REF: obj=0x7f22780b8990 2013-12-13 08:23:53.331+0000: 12158: debug : virObjectUnref:256 : OBJECT_UNREF: obj=0x7f22780b8990 2013-12-13 08:23:53.332+0000: 12158: debug : virObjectRef:293 : OBJECT_REF: obj=0x7f22780b8990 2013-12-13 08:23:53.332+0000: 12158: debug : virObjectUnref:256 : OBJECT_UNREF: obj=0x7f22780b8990 2013-12-13 08:23:53.333+0000: 12158: debug : virObjectRef:293 : OBJECT_REF: obj=0x7f22780b8990 2013-12-13 08:23:53.333+0000: 12158: debug : virObjectUnref:256 : OBJECT_UNREF: obj=0x7f22780b8990 2013-12-13 08:24:25.768+0000: 12147: debug : virObjectUnref:256 : OBJECT_UNREF: obj=0x7f22780b8990 2013-12-13 08:24:25.768+0000: 12147: debug : virObjectUnref:258 : OBJECT_DISPOSE: obj=0x7f22780b8990 After OBJECT_DISPOSE, there no ref to the object. > > 2013-12-13 07:03:51.457+0000: 11933: debug : virObjectUnref:256 : > OBJECT_DISPOSE: obj=0x7f0f340b8d50 > > and then we must not see any REF on obj=0x7f0f340b8d50. (In reply to yanbing du from comment #23) > > After OBJECT_DISPOSE, there no ref to the object. > Brilliant! The bug is fixed and can be moved to VERIFIED. (In reply to Michal Privoznik from comment #24) > (In reply to yanbing du from comment #23) > > > > > After OBJECT_DISPOSE, there no ref to the object. > > > > Brilliant! The bug is fixed and can be moved to VERIFIED. Thanks, move bug to VERIFIED. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. *** Bug 966449 has been marked as a duplicate of this bug. *** |