Bug 971904 - libvirtd crashes on startup with udev_log="debug" in /etc/udev/udev.conf
Summary: libvirtd crashes on startup with udev_log="debug" in /etc/udev/udev.conf
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
Depends On: 969152
TreeView+ depends on / blocked
Reported: 2013-06-07 14:21 UTC by Ján Tomko
Modified: 2013-11-21 09:02 UTC (History)
6 users (show)

Fixed In Version: libvirt-0.10.2-19.el6
Doc Type: Bug Fix
Doc Text:
Cause: Libvirt's logging function that was passed to libudev didn't handle strings with multiple parameters correctly. Consequence: Libvirtd could crash when libudev logged a message. Fix: Handle multiple parameters correctly. Result: Libvirtd doesn't crash when libudev logs messages.
Clone Of: 969152
Last Closed: 2013-11-21 09:02:32 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1581 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2013-11-21 01:11:35 UTC

Description Ján Tomko 2013-06-07 14:21:59 UTC
+++ This bug was initially created as a clone of Bug #969152 +++

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.1.4
backtrace_rating: 4
cmdline:        /usr/sbin/libvirtd
crash_function: vasprintf
executable:     /usr/sbin/libvirtd
kernel:         3.9.4-200.fc18.x86_64
runlevel:       N 5
uid:            0

Truncated backtrace:
Thread no. 1 (10 frames)
 #2 vasprintf at /usr/include/bits/stdio2.h:210
 #3 virVasprintf at util/util.c:1984
 #4 virLogVMessage at util/logging.c:723
 #5 virLogMessage at util/logging.c:670
 #6 udev_log at src/libudev/libudev.c:64
 #7 udev_device_new_from_syspath at src/libudev/libudev-device.c:726
 #8 udevProcessDeviceListEntry at node_device/node_device_udev.c:1353
 #9 udevEnumerateDevices at node_device/node_device_udev.c:1386
 #10 udevDeviceMonitorStartup at node_device/node_device_udev.c:1704
 #11 virStateInitialize at libvirt.c:804

--- Additional comment from Ivan Makfinsky on 2013-06-06 19:17:05 EDT ---

Apparently I had udev_log="debug" in /etc/udev/udev.conf.

I set the log to info and libvirtd service starts up normally.

I found the solution here:


It shouldn't crash just because udev is logging debug messages.

--- Additional comment from Jan Tomko on 2013-06-07 09:48:10 EDT ---

Upstream patch proposed:

Comment 2 Ján Tomko 2013-06-14 12:24:15 UTC
Fix is now committed upstream:
commit f753dd62f951cc62e164421d0c6491f39e4c68ad
Author:     Ján Tomko <jtomko>
AuthorDate: 2013-06-07 11:55:27 +0200
Commit:     Ján Tomko <jtomko>
CommitDate: 2013-06-14 13:17:27 +0200

    udev: fix crash in libudev logging
    Call virLogVMessage instead of virLogMessage, since libudev
    called us with a va_list object, not a list of arguments.
    Honor message priority and strip the trailing newline.

git describe: v1.0.6-76-gf753dd6
And posted downstream:

Comment 9 zhenfeng wang 2013-07-09 07:55:57 UTC
Verify this bug on libvirt libvirt-0.10.2-19.el6.x86_64
1.set the udev_log="debug" in /etc/udev/udev.conf
2.restart the libvirtd service
#service libvirtd restart
3.check the service status
# virsh list
 Id    Name                           State
 1     rhelguest1                     running

# ps aux|grep libvirtd
root      3083  0.0  0.0 1037828 14780 ?       Sl   14:16   0:00 libvirtd --daemon
# service libvirtd status
libvirtd (pid  3083) is running...
4.set the udev_log="error","udev_log=info" , udev_log="warning" or udev_log=$invalid value in the /etc/udev/udev.conf,then do the step 2,we can get the same result with step 3

Also I can reproduce this bug on libvirt-0.10.2-18
1.set the udev_log="debug" in /etc/udev/udev.conf
2.restart the libvirtd service
3.check the service status
# ps aux|grep libvirtd
root      3675  0.0  0.0 103244   828 pts/0    S+   14:49   0:00 grep libvirtd
# service libvirtd status
libvirtd dead but pid file exists

Since this issue works well in libvirt 0.10.2-19, also i can reproduce it on libvirt-0.10.2-18, so mark this bug verified

Comment 11 errata-xmlrpc 2013-11-21 09:02:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.