Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 873537 - virsh save will crash libvirtd sometimes
virsh save will crash libvirtd sometimes
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
x86_64 Linux
medium Severity high
: rc
: ---
Assigned To: Peter Krempa
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-06 01:37 EST by zhpeng
Modified: 2013-09-08 20:04 EDT (History)
8 users (show)

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


Attachments (Terms of Use)
libvirtd log (65.24 KB, text/plain)
2012-11-06 01:37 EST, zhpeng
no flags Details
guest xml (1.96 KB, text/plain)
2012-11-06 01:38 EST, zhpeng
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 16:18:26 EST

  None (edit)
Description zhpeng 2012-11-06 01:37:25 EST
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 01:37:57 EST
Created attachment 639136 [details]
libvirtd log
Comment 2 zhpeng 2012-11-06 01:38:17 EST
Created attachment 639137 [details]
guest xml
Comment 4 Peter Krempa 2012-11-06 05:17:01 EST
Fix sent upstream:
https://www.redhat.com/archives/libvir-list/2012-November/msg00277.html
Comment 7 Peter Krempa 2012-11-06 09:00:59 EST
Fixed upstream:

commit fb58f8e2a4c4ab619eab3860b263110a5bd9010f
Author: Peter Krempa <pkrempa@redhat.com>
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-14 22:08:48 EST
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 02:11:33 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.