Hide Forgot
Description of problem: libvirtd crashes after an ancient qemu package is installed Version-Release number of selected component (if applicable): - kernel-2.6.32-94.el6.x86_64 - qemu-img-0.12.1.2-2.144.el6.x86_64 - qemu-kvm-0.12.1.2-2.144.el6.x86_64 - qemu-0.6.0-2.x86_64 - libvirt-0.8.7-5.el6.x86_64 How reproducible: always Steps to Reproduce: 1. Libvirtd is working well # virsh list --all Id Name State ---------------------------------- - rhel6 shut off # service libvirtd restart Stopping libvirtd daemon: [ OK ] Starting libvirtd daemon: [ OK ] # virsh list --all Id Name State ---------------------------------- - rhel6 shut off 2. Install a qemu package # rpm -ivh qemu-0.6.0-2.x86_64.rpm Preparing... ########################################### [100%] 1:qemu ########################################### [100%] 3. # virsh list --all Id Name State ---------------------------------- - rhel6 shut off 4. # service libvirtd restart Stopping libvirtd daemon: [ OK ] Starting libvirtd daemon: [ OK ] # service libvirtd restart Stopping libvirtd daemon: [FAILED] Starting libvirtd daemon: [ OK ] # service libvirtd status libvirtd dead but subsys locked # virsh list --all error: unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: No such file or directory error: failed to connect to the hypervisor 5. After remove qemu package and restart libvirtd service, it works well as before Actual results: Libvirtd crashes after qemu package is installed Expected results: Libvirtd should not crash after qemu package is installed Additional info:
It's caused by the ancient qemu doesn't support "qemu -M ?", which is used to probe the machine types to construct guest capabilities, and the failure to contruct the guest capabilities then cause qemu state driver initialization failed.
Is libvirt crashing or just exiting normally?
not crashing(no coredump), but exit alnormally, it didn't release subsys lock on shutdown event, useful logs pasted following: Feb 10 00:33:38 dhcp-65-132 libvirtd: 00:33:38.733: 5342: error : virStateInitialize:1022 : Initialization of QEMU state driver failed Feb 10 00:33:38 dhcp-65-132 kernel: lo: Disabled Privacy Extensions Feb 10 00:33:38 dhcp-65-132 libvirtd: 00:33:38.749: 5342: info : virDomainLoadAllConfigs:8248 : Scanning for configs in /etc/libvirt/lxc Feb 10 00:33:38 dhcp-65-132 libvirtd: 00:33:38.755: 5342: error : main:3305 : Driver state initialization failed Feb 10 00:33:38 dhcp-65-132 libvirtd: 00:33:38.756: 5343: warning : qemudDispatchSignalEvent:403 : Shutting down on signal 3
Sounds like we should simply be disabling the qemu driver. What do you think?
No, the QEMU driver is expected to successfully start regardless of what QEMU version is installed, or indeed even if no QEMU is installed yet. We need to fix the code which deals with 'qemu -M ?' since libvirt in general needs to support QEMUs without this feature.
Looks like this is a regression in commit 2211518: 2011-01-12 16:26 Eric Blake * qemu: convert capabilities to use virCommand Prior to that point, qemuCapsProbeMachineTypes silently ignored failure of 'qemu -M ?'; therefore, the obvious fix would be to pass a dummy status instead of NULL to virCommandRun.
Proposed upstream patch: https://www.redhat.com/archives/libvir-list/2011-February/msg00468.html
Moving to POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-February/msg00967.html
The bug is reproduced with libvirt-0.8.7-7.el6.x86_64 - kernel-2.6.32-113.el6.x86_64 - qemu-kvm-0.12.1.2-2.145.el6.x86_64 The same test step and actual result with Description
Additional patch needed to fix this issue was sent for review: http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-April/msg00082.html
Verified this bug pass with libvirt-0.8.7-16.el6.x86_64 1. # virsh list --all Id Name State ---------------------------------- - a10 shut off - a11 shut off - a12 shut off 2. # rpm -ivh qemu-0.6.0-2.x86_64.rpm Preparing... ########################################### [100%] 1:qemu ########################################### [100%] 3. # virsh list --all Id Name State ---------------------------------- - a10 shut off - a11 shut off - a12 shut off 4. # for i in {1..10}; do service libvirtd restart; done Stopping libvirtd daemon: [ OK ] Starting libvirtd daemon: [ OK ] Stopping libvirtd daemon: [ OK ] ... 5. # virsh list --all Id Name State ---------------------------------- - a10 shut off - a11 shut off - a12 shut off 6. # service libvirtd status libvirtd (pid 8332) is running...
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