Bug 737010 - libvirtd crash when executing "virsh snapshot-create-as" command sometimes
Summary: libvirtd crash when executing "virsh snapshot-create-as" command sometimes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 733762
Blocks: 743047
TreeView+ depends on / blocked
 
Reported: 2011-09-09 11:02 UTC by Gunannan Ren
Modified: 2011-12-06 11:28 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.9.4-12.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:28:48 UTC


Attachments (Terms of Use)
libvirtd.log when the libvirtd crashed (64.38 KB, text/plain)
2011-09-13 07:23 UTC, dyuan
no flags Details
libvirtd.log when the libvirtd crashed on snapshot-delete (64.48 KB, text/plain)
2011-09-13 07:28 UTC, dyuan
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Gunannan Ren 2011-09-09 11:02:22 UTC
Description of problem:
When running "virsh snapshot-create-as" to create snapshot for a domain
it occasionally reports error like:

# virsh snapshot-create-as virtlab_test snap1
error: Cannot find 'p&' in path: No such file or directory

sometimes error like:
# virsh snapshot-create-as virtlab_test snap2
error: End of file while reading data: Input/output error

and libvirtd is crashed.


Version-Release number of selected component (if applicable):
libvirt-0.9.4-11.el6.x86_64
libvirt-client-0.9.4-11.el6.x86_64
qemu-kvm-0.12.1.2-2.183.el6.x86_64
qemu-kvm-tools-0.12.1.2-2.183.el6.x86_64
qemu-img-0.12.1.2-2.183.el6.x86_64

How reproducible:

%90

Steps to Reproduce:
1. virsh snapshot-create-as <domain> <snapshotname>
2. virsh snapshot-revert <domain> <snapshotname>
3.
  
Actual results:

errors occur and libvirtd crash.

Expected results:

creating and reverting snapshot success.

Additional info:

Comment 3 Gunannan Ren 2011-09-10 16:10:42 UTC
I proposed a fix for the bug
https://www.redhat.com/archives/libvir-list/2011-September/msg00436.html

Comment 5 dyuan 2011-09-13 07:23:12 UTC
Created attachment 522864 [details]
libvirtd.log when the libvirtd crashed

100% reproduced this bug with libvirt-0.9.4-11.el6.

# virsh snapshot-list rhel6q2
 Name                 Creation Time             State
------------------------------------------------------------
 
# for name in s1 s2 s3 s4; do virsh snapshot-create-as rhel6q2 $name; done
Domain snapshot s1 created
error: Cannot find 'P&' in path: No such file or directory

error: Failed to reconnect to the hypervisor
error: no valid connection
error: End of file while reading data: Input/output error

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

Comment 6 dyuan 2011-09-13 07:28:10 UTC
Created attachment 522865 [details]
libvirtd.log when the libvirtd crashed on snapshot-delete

The similar issue for snapshot-delete.

# virsh snapshot-list rhel6q2
 Name                 Creation Time             State
------------------------------------------------------------
 s1                   2011-09-13 15:12:21 +0800 shutoff
 s2                   2011-09-13 15:17:48 +0800 shutoff
 s3                   2011-09-13 15:18:08 +0800 shutoff
 s4                   2011-09-13 15:18:18 +0800 shutoff

[root@RHEL62-0719 home]# for name in s1 s2 s3 s4; do virsh snapshot-delete rhel6q2 $name; done
Domain snapshot s1 deleted

error: Failed to delete snapshot s2
error: End of file while reading data: Input/output error

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

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

Comment 8 Eric Blake 2011-09-13 12:47:30 UTC
Guannan's proposed patch at https://www.redhat.com/archives/libvir-list/2011-September/msg00437.html does indeed look like it will fix the root cause of this issue, and that it is indeed an unintentional regression in one of my snapshot patches.  I'll take care of pushing it through the process today.

Comment 12 Nan Zhang 2011-09-22 06:00:19 UTC
Test with libvirt-0.9.4-12.el6.x86_64, libvirtd don't crash anymore. move this to VERIFIED.

# for name in s1 s2 s3 s4; do virsh snapshot-create-as foo $name; done
Domain snapshot s1 created
Domain snapshot s2 created
Domain snapshot s3 created
Domain snapshot s4 created

# virsh snapshot-list foo
 Name                 Creation Time             State
------------------------------------------------------------
 s1                   2010-02-08 19:25:28 -0500 shutoff
 s2                   2010-02-08 19:25:34 -0500 shutoff
 s3                   2010-02-08 19:25:39 -0500 shutoff
 s4                   2010-02-08 19:25:45 -0500 shutoff

Comment 13 errata-xmlrpc 2011-12-06 11:28:48 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/RHBA-2011-1513.html


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