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 1079162 - The guest will be destroyed abnormally while revert the guest's snapshot which took in "pmsuspended" status
Summary: The guest will be destroyed abnormally while revert the guest's snapshot whic...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1079163 1134154 1143900
TreeView+ depends on / blocked
 
Reported: 2014-03-21 05:56 UTC by zhenfeng wang
Modified: 2015-03-05 07:33 UTC (History)
11 users (show)

Fixed In Version: libvirt-1.2.7-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1079163 (view as bug list)
Environment:
Last Closed: 2015-03-05 07:33:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description zhenfeng wang 2014-03-21 05:56:10 UTC
Description of problem:
The guest will be destroyed abnormally while revert the guest's snapshot which took in "pmsuspended" status

Version-Release number of selected component (if applicable):
kernel-3.10.0-112.el7.x86_64
libvirt-1.1.1-28.el7.x86_64
qemu-kvm-rhev-1.5.3-53.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a running guest with qemu-guest-agent installed
# virsh list
 Id    Name                           State
----------------------------------------------------
 2     rhel7                         running

2.Do S3 with the guest
# virsh dompmsuspend rhel7 --target mem
Domain rhel7 successfully suspended
[root@rhel6 ~]# virsh list
 Id    Name                           State
----------------------------------------------------
 2     rhel7                        pmsuspended

3.Take the internal snapshot for the guest
#virsh snapshot-create-as rhel7 sp1
Domain snapshot sp1 created

# virsh snapshot-list rhel7
 Name                 Creation Time             State
------------------------------------------------------------
 sp1                  2014-03-18 22:10:19 -0400 pmsuspended

4.Wakeup the guest
#virsh dompmwakeup rhel7
Domain rhel7 successfully woken up
# virsh list
 Id    Name                           State
----------------------------------------------------
 2     rhel7                         running

5.Revert the snapshot for the guest
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     rhel7                          shut off

# ps aux|grep qemu
root     25663  0.0  0.0 103252   840 pts/0    S+   22:45   0:00 grep qemu

6.Both rhel7 and rhel6 can hit this issue
  
Actual results:
The guest was destroyed abnormally while revert the guest's snapshot which took in "pmsuspended" status

Expected results:
If we support take and revert snapshot while guest in pmsuspend status, the guest should be in "pmsuspended" status
in step 5 and shouldn't be destroyed abnormally. if we didn't support take and revert snapshot while guest in pmsuspended
status, it should give a clear error

Additional info:

Comment 3 Peter Krempa 2014-07-22 08:57:30 UTC
Snapshots of guests in S3 state don't work well with qemu currently. I've pushed patch to forbid them:

commit 1e833899ce07ac02dadbde75ee0e6747eca1068c
Author: Peter Krempa <pkrempa>
Date:   Mon Jul 21 15:48:35 2014 +0200

    qemu: snapshot: Forbid taking/reverting snapshots in PMSUSPENDED state
    
    Qemu doesn't currently support them and behaves strangely. Just forbid
    them.
    
v1.2.6-220-g1e83389

This makes libvirt report an error instead of killing the guest.

Comment 5 Eric Blake 2014-08-27 03:14:16 UTC
The fix for this bug introduced a locking error, tracked in bug 1134154

Comment 6 Yang Yang 2014-12-05 02:33:58 UTC
I can reproduce it with libvirt-1.1.1-28.el7.x86_64

Verify it using the following component
libvirt-1.2.8-10.el7.x86_64
qemu-kvm-rhev-2.1.2-15.el7.x86_64
kernel-3.10.0-212.el7.x86_64

# virsh dompmsuspend vm2 --target mem
Domain vm2 successfully suspended

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 6     vm2                            pmsuspended

# virsh snapshot-create-as vm2 sn1
error: Operation not supported: qemu doesn't support taking snapshots of PMSUSPENDED guests

I can get the same result using qemu-kvm-1.5.3-83.el7.x86_64.

So mark it as verified.

Comment 8 errata-xmlrpc 2015-03-05 07:33:06 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.

https://rhn.redhat.com/errata/RHSA-2015-0323.html


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