Bug 837470 - libvirtd crash when virsh find-storage-pool-sources
libvirtd crash when virsh find-storage-pool-sources
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Peter Krempa
Virtualization Bugs
: Regression
Depends On:
Blocks: 840699
  Show dependency treegraph
 
Reported: 2012-07-03 23:24 EDT by Huang Wenlong
Modified: 2013-10-20 17:45 EDT (History)
8 users (show)

See Also:
Fixed In Version: libvirt-0.10.0-0rc0.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:18:28 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Huang Wenlong 2012-07-03 23:24:23 EDT
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 10:38:49 EDT
Crash fixed upstream with:
commit ab9c72ae9e55e7190f52ad1550624630a5c7f78b
Author: Peter Krempa <pkrempa@redhat.com>
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@redhat.com>
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 01:17:04 EDT
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 02:18:28 EST
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.