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 873537 - virsh save will crash libvirtd sometimes
Summary: virsh save will crash libvirtd sometimes
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
medium
high
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-06 06:37 UTC by zhpeng
Modified: 2013-09-09 00:04 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.10.2-8.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:11:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libvirtd log (65.24 KB, text/plain)
2012-11-06 06:37 UTC, zhpeng
no flags Details
guest xml (1.96 KB, text/plain)
2012-11-06 06:38 UTC, zhpeng
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 zhpeng 2012-11-06 06:37:25 UTC
Description of problem:
virsh save will crash libvirtd sometimes

Version
libvirt-0.10.2-7.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.330.el6.x86_64

How reproducible:
20%


Steps to Reproduce:
# for i in {1..100}; do virsh save rail /tmp/rail.save; virsh restore /tmp/rail.save; done

Domain rail saved to /tmp/rail.save

Domain restored from /tmp/rail.save


Domain rail saved to /tmp/rail.save

Domain restored from /tmp/rail.save


Domain rail saved to /tmp/rail.save

Domain restored from /tmp/rail.save


Domain rail saved to /tmp/rail.save

Domain restored from /tmp/rail.save

error: Failed to save domain rail to /tmp/rail.save
error: End of file while reading data: Input/output error
error: Failed to reconnect to the hypervisor

error: Failed to reconnect to the hypervisor
error: no valid connection
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused


Actual results:
libvirtd crashed.

Expected results:
no crash.

Additional info:

Comment 1 zhpeng 2012-11-06 06:37:57 UTC
Created attachment 639136 [details]
libvirtd log

Comment 2 zhpeng 2012-11-06 06:38:17 UTC
Created attachment 639137 [details]
guest xml

Comment 4 Peter Krempa 2012-11-06 10:17:01 UTC
Fix sent upstream:
https://www.redhat.com/archives/libvir-list/2012-November/msg00277.html

Comment 7 Peter Krempa 2012-11-06 14:00:59 UTC
Fixed upstream:

commit fb58f8e2a4c4ab619eab3860b263110a5bd9010f
Author: Peter Krempa <pkrempa>
Date:   Tue Nov 6 10:55:26 2012 +0100

    qemu: Don't corrupt pointer in qemuDomainSaveMemory()
    
    The code that was split out into the qemuDomainSaveMemory expands the
    pointer containing the XML description of the domain that it gets from
    higher layers. If the pointer changes the old one is invalid and the
    upper layer function tries to free it causing an abort.
    
    This patch changes the expansion of the original string to a new
    allocation and copy of the contents.

Comment 10 zhpeng 2012-11-15 03:08:48 UTC
It's verified with:

libvirt-0.10.2-8.el6.x86_64

steps is:


for i in {1..100}; do virsh save aaa /tmp/aaa.save; virsh restore /tmp/aaa.save; done

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