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 837544

Summary: snapshot-list return core dumped
Product: Red Hat Enterprise Linux 6 Reporter: yanbing du <ydu>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: acathrow, dallan, dyasny, dyuan, eblake, jyang, mzhan, pkrempa, rwu, whuang, zhpeng
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.10.2-5.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 07:18:43 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:
Bug Depends On:    
Bug Blocks: 807545, 840699    

Description yanbing du 2012-07-04 08:14:31 UTC
Description of problem:
the output of virsh snapshot-list is:
Segmentation fault (core dumped)


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

How reproducible:
100%

Steps to Reproduce:
1. Prepare a domain
2. List snapshots for the domain
# virsh snapshot-list test
Segmentation fault (core dumped)

3.
  
Actual results:
# virsh snapshot-list test
Segmentation fault (core dumped)

Expected results:
# virsh snapshot-list test
 Name                 Creation Time             State
------------------------------------------------------------


Additional info:
only one error message in libvirtd.log
#cat /var/log/libvirt/libvirtd.log
2012-07-04 07:46:16.537+0000: 24031: error : virNetSocketReadWire:1003 : End of file while reading data: Input/output error

Comment 2 Eric Blake 2012-07-04 10:55:13 UTC
Can you please provide a stacktrace of virsh when it crashes?  How did you prepare the domain?  Is this a case where it has no snapshots at all?

Comment 3 Peter Krempa 2012-07-04 12:11:56 UTC
Segfault fixed upstream with commit:

commit d59e10338d97bd7e842c83551067aa26d685bdc9
Author: Peter Krempa <pkrempa>
Date:   Wed Jul 4 10:58:39 2012 +0200

    remote: Fill remote parameters in remoteDomainListAllSnapshots()

after this commit is applied I've got a division by zero error that was caused by incorrect order of arguments for vshCalloc. This problem is solved by commit:

commit 3cdb3b4e648c6690fba3647da88d73f99367b8be
Author: Peter Krempa <pkrempa>
Date:   Wed Jul 4 12:15:19 2012 +0200

    virsh: Fix ordering of arguments when calling vshCalloc.

Moving to POST.

Comment 4 yanbing du 2012-07-05 02:32:38 UTC
(In reply to comment #2)
> Can you please provide a stacktrace of virsh when it crashes?  How did you
> prepare the domain?  Is this a case where it has no snapshots at all?
It occurred no matter snapshots exist or not, and the domain it normally installed via virt-manager with no special setting.
Anyway, it already fixed upstream.

Comment 7 Huang Wenlong 2012-08-06 06:11:36 UTC
Verify this bug with :
libvirt-0.10.0-0rc0.el6.x86_64


# virsh snapshot-list ga
 Name                 Creation Time             State
------------------------------------------------------------

Comment 8 Osier Yang 2012-10-22 15:27:35 UTC
One followup patch to fix one possible segfault of snapshot-list:

# virsh snapshot-list test1 --descendants --current --tree (Reported by Kyla)

http://post-office.corp.redhat.com/archives/rhvirt-patches/2012-October/msg01086.html.

Move the bug to POST for further testing.

Comment 10 Huang Wenlong 2012-10-24 06:30:06 UTC
Verify this bug :
libvirt-0.10.2-5.el6.x86_64

#  virsh snapshot-list test  
 Name                 Creation Time             State
------------------------------------------------------------
 s-new                2012-10-24 14:17:15 +0800 running
 s-new-disk           2012-10-24 14:17:28 +0800 disk-snapshot
 s1                   2012-10-09 14:03:54 +0800 disk-snapshot
 ss1                  2012-10-24 14:22:58 +0800 disk-snapshot
 ss2                  2012-10-24 14:25:03 +0800 disk-snapshot

#  virsh snapshot-list test --descendants --current --tree
ss2


there is not core dumped

Comment 11 errata-xmlrpc 2013-02-21 07:18:43 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