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 837470 - libvirtd crash when virsh find-storage-pool-sources
Summary: libvirtd crash when virsh find-storage-pool-sources
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 840699
TreeView+ depends on / blocked
 
Reported: 2012-07-04 03:24 UTC by Huang Wenlong
Modified: 2013-10-20 21:45 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.10.0-0rc0.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:18:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libvirtd gdb debug (10.57 KB, text/plain)
2012-07-04 03:24 UTC, Huang Wenlong
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description Huang Wenlong 2012-07-04 03:24:23 UTC
Created attachment 596130 [details]
libvirtd gdb debug

Description of problem:
libvirtd crash when  virsh find-storage-pool-sources

Version-Release number of selected component (if applicable):
libvirt-0.9.13-2.el6.x86_64

How reproducible:
100%

Steps to Reproduce:


1.[root@intel-q9400-4-1 tmp]# virsh  find-storage-pool-sources netfs /tmp/netfs.xml
error: Failed to find any netfs pool sources
error: End of file while reading data: Input/output error

2.[root@intel-q9400-4-1 tmp]# virsh list
error: Failed to reconnect to the hypervisor
error: no valid connection
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused

3.# /etc/init.d/libvirtd status
libvirtd dead but pid file exists


4.# cat netfs.xml
<source>
    <host name="10.66.90.121"/>
    <dir path="/vol/S3/libvirtauto"/>
    <format type="nfs"/>
</source>



Actual results:
as steps

Expected results:
libvirtd do not crash

Additional info:

Comment 3 Peter Krempa 2012-07-09 14:38:49 UTC
Crash fixed upstream with:
commit ab9c72ae9e55e7190f52ad1550624630a5c7f78b
Author: Peter Krempa <pkrempa>
Date:   Mon Jul 9 14:10:05 2012 +0200

    storage_backend_fs: Don't free a part of a structure on error


With this commit applied the command still regresses outputing an error every time. This regression is also now fixed upstream by:

commit 48b78519983d403f0c81b9abc37e9de773331aef
Author: Peter Krempa <pkrempa>
Date:   Mon Jul 9 14:37:01 2012 +0200

    storage_backend_fs: Allocate entry for host before accessing it
    
    Commit 122fa379de44a2fd0a6d5fbcb634535d647ada17 introduces option to
    store more than one host entry in a storage pool source definition. That
    commit causes a regression, where a check is added that only one host
    entry should be present (that actualy is not present as the source
    structure was just allocated and zeroed) instead of allocating memory
    for the host entry.

Moving to POST, as 6.4 will be picking this up in a rebase.

Comment 5 zhpeng 2012-08-06 05:17:04 UTC
Test it with libvirt-0.10.0-0rc0.el6:

# cat /tmp/netfs.xml 

<source>
    <host name="10.66.6.209"/>
            <format type="nfs"/>
</source>
# virsh find-storage-pool-sources netfs /tmp/netfs.xml 
<sources>
  <source>
    <host name='10.66.6.209'/>
    <dir path='/nfs'/>
    <format type='nfs'/>
  </source>
  <source>
    <host name='10.66.6.209'/>
    <dir path='/virt'/>
    <format type='nfs'/>
  </source>
</sources>

# service libvirtd status
libvirtd (pid  15155) is running...


Change this to verified

Comment 6 errata-xmlrpc 2013-02-21 07:18:28 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.

http://rhn.redhat.com/errata/RHSA-2013-0276.html


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