Bug 854694

Summary: libvirt unit virsystemd test crashing on factory
Product: [openSUSE] openSUSE Tumbleweed Reporter: Cédric Bosdonnat <cbosdonnat>
Component: BasesystemAssignee: Cédric Bosdonnat <cbosdonnat>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: jdouglas, jfehlig
Version: 13.2 Milestone 0   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: crash backtrace
A patch to if-zero a stub that interposes dbus' threading initialization.

Description Cédric Bosdonnat 2013-12-10 10:54:56 UTC
Created attachment 571084 [details]
crash backtrace

Steps to reproduce:
  * git clone git://libvirt.org/libvirt.git
  * zypper si -d libvirt
  * zypper in make gcc
  * cd libvirt
  * ./autogen.sh
  * make check

During make check tests/virsystemd will crash on factory (not on 13.1). The backtrace is attached to this bug.
Comment 1 Fridrich Strba 2013-12-17 08:55:52 UTC
OK, so this is libvirt problem here. Dbus, since 1.7.6 initializes the threading any time a lock is requested and the threading is not initialized. This initialization is done in the last resort by dbus_threads_init_default() call, which normally takes care of the initialization. However, in the virtsystemdtest, namely in tests/virsystemdmock.c:34, the symbol is interposed by a stub that does nothing, but returns TRUE. Dbus thinks that the threading is now initialized and dereferences a NULL pointer with obvious result.
I if-zeroed the stub in the test and the tests now pass just fine. I am attaching the trivial patch to do it.
Comment 2 Fridrich Strba 2013-12-17 08:57:22 UTC
Created attachment 572073 [details]
A patch to if-zero a stub that interposes dbus' threading initialization.
Comment 3 Fridrich Strba 2013-12-17 08:59:52 UTC
BTW, the tests/virsystemdmock has some more dbus stubs. Maybe people that know why they are there should have a look and re-evaluate their usefulness.
Comment 4 Cédric Bosdonnat 2013-12-17 09:59:14 UTC
Reopening and taking it to fix the bug on the libvirt side.
Comment 5 Cédric Bosdonnat 2014-01-14 07:51:08 UTC
Fixed both upstream and in Factory