Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 915468

Summary: libvirtd does not start after recent Linux update (applied on Feb 22nd)
Product: Red Hat Enterprise Linux 6 Reporter: zbao
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.5CC: acathrow, dallan, dyasny, dyuan, jdenemar, mzhan, rwu, ydu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-14 08:53:55 UTC Type: Bug
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 Flags
one of the log files I got earlier none

Description zbao 2013-02-25 20:10:27 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
reboot the linux 6 server 

Steps to Reproduce:
1.  Click Application --> System Tools --> Virtual Machine Manager
2.
3.
  
Actual results:

Details: 

Unable to open a connection to the libvirt management daemon.

Libvirt URI is: qemu:///system

Verify that:
 - The 'libvirtd' daemon has been started


Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 1154, in _open_thread
    self.vmm = self._try_open()
  File "/usr/share/virt-manager/virtManager/connection.py", line 1138, in _try_open
    flags)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 102, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused



Expected results:
virtual machine will run and console will show

Additional info:
This started to happen after applied Linux updates last Friday Feb 22nd.

Comment 2 zbao 2013-02-27 19:50:13 UTC
Anyone has any idea about this problem?   Thanks! 

OS I am running is -- 
root>  uname -r
2.6.32-358.0.1.el6.x86_64

And the libvirt I have is --
root>  rpm -qa | grep libvirt
libvirt-client-0.10.2-18.el6.x86_64
libvirt-python-0.10.2-18.el6.x86_64
libvirt-0.10.2-18.el6.x86_64
libvirt-client-0.10.2-18.el6.i686

Comment 3 Dave Allan 2013-02-27 21:32:21 UTC
Please attach the libvirtd logs to the BZ.

Comment 4 yanbing du 2013-03-07 10:32:39 UTC
BTW, what's your libvirt version before apply update?

I'm trying to reproduce your problem, after update libvirt, libvirtd still running:
libvirt-0.10.0-1.el6 -->libvirt-0.10.2-18.el6

Comment 5 zbao 2013-03-07 15:01:03 UTC
You can discard this request now, we have found a work around.   Just for your information here is what we found: 

First to answer your question -- I had libvirt-0.9.10 before. 

In my virtual machine configuration file <machine>.xml under /etc/libvirt/qemu/ there are some cpu features configuration that the old version put there when I originally created this vm,  and the new libvirt 0.10.2 does not like them.  

The work around was either remove those cpu features (pasted below) from the file or recreate the virtual machine (which resulted in a new file without those features).  We were able to use these work around and get over the problem.  

<!--
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='dtes64'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='lahf_lm'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='cx16'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='acpi'/>
  -->


Thanks, 
zbao

Comment 6 Dave Allan 2013-03-07 16:20:20 UTC
Yanbing, I'd be quite surprised if changing the guest XML made a difference, but can you reproduce what the reporter is describing?

Comment 8 Jiri Denemark 2013-03-07 20:26:55 UTC
Interesting. Could attach the original domain XML and debug logs from libvirtd (see http://wiki.libvirt.org/page/DebugLogs) generated while the host is booting and libvirtd fails to start?

Comment 9 yanbing du 2013-03-08 05:26:10 UTC
(In reply to comment #6)
> Yanbing, I'd be quite surprised if changing the guest XML made a difference,
> but can you reproduce what the reporter is describing?

Yes, no difference, after doing the XML change and update libvirt from libvirt-0.9.10-21.el6 to libvirt-0.10.2-18.el6, libvirtd still running.

Comment 10 Michal Privoznik 2013-03-08 12:19:44 UTC
zbao,

even if we had a bug in our XML parsing part, that should not prevent the daemon from starting up. Can you please provide debug logs as requested in comment #8?

Comment 11 zbao 2013-03-11 14:00:24 UTC
Created attachment 708391 [details]
one of the log files I got earlier

Hi,  

As you requested I am attaching one of the libvirt log I got earlier when the problem was still happening. Hope it helps. 

As you mentioned that you could not reproduce the problem on your side, so I went ahead added those <feature policy> lines into my xml file, and rebooted the box and everything still worked!   

It is bizarre,  looks like I won't be able to recreate the problem either.  

Thanks, 

zbao

Comment 12 Michal Privoznik 2013-03-11 16:58:15 UTC
From the debug logs I see libvirtd died due to SIGSEGV. So if you ever hit the problem - the core dump would be fine. Unfortunately, logs does not tell us where the NULL deref happened exactly. However it seems like you have an autostarted domain configured. So libvirt tries to start it up while doing its own initialization. So it might have accessed an yet uninitialized value, but this is just a rough guess.

Comment 13 zbao 2013-03-11 17:18:22 UTC
Glad you mentioned 'autostart',  yes on my host originally I had that option set, so was on my co-workers' host.  When he ran into the same problem on hist host,  he first unchecked that option,  and libvirtd did start fine, but his vm still had problem, so he then did some investigation and commented those policy features in his .xml file and everything started to work.   So I think your rough guess might be very close to what happened on hist host.  Next time if something like this happens I will try to get a core dump for you guys.  

Anyway,  everything is working for us now, if you guys want to close this request please go ahead.  And thanks for looking into this! 

zbao

Comment 14 Michal Privoznik 2013-06-14 08:53:55 UTC
We run coverity checks over libvirt periodically. So it is possible that this issue has been fixed already. Moreover, from comment 13 it looks like it is fixed. Therefore, I am closing this as UPSTREAM. If somebody thinks otherwise, please feel free to re-open.