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 807898 - guest quit or device hot-unplug during streaming fails
Summary: guest quit or device hot-unplug during streaming fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 808004 (view as bug list)
Depends On:
Blocks: 806280
TreeView+ depends on / blocked
 
Reported: 2012-03-29 05:21 UTC by Shaolong Hu
Modified: 2013-01-10 00:49 UTC (History)
11 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.274.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Clone Of:
Environment:
Last Closed: 2012-06-20 11:45:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
guest screenshot after s4 (12.78 KB, image/png)
2012-03-29 05:21 UTC, Shaolong Hu
no flags Details
patch to fix the bug, RHEL version (2.68 KB, patch)
2012-03-29 15:57 UTC, Paolo Bonzini
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0746 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2012-06-19 19:31:48 UTC

Description Shaolong Hu 2012-03-29 05:21:10 UTC
Created attachment 573530 [details]
guest screenshot after s4

Description of problem:
------------------------
guest s4 + streaming fails


Version-Release number of selected component (if applicable):
-------------------------------------------------------------
qemu-kvm 267rhev
guest kernel 258


How reproducible:
------------------
2/2

Steps to Reproduce:
--------------------
1./usr/libexec/qemu-kvm -enable-kvm -M rhel6.3.0 -m 4G -name rhel6.3-64 -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -uuid 3f2ea5cd-3d29-48ff-aab2-23df1b6ae213 -drive file=/root/RHEL-Server-6.3-64-virtio.qcow2,cache=none,if=none,rerror=stop,werror=stop,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,drive=drive-virtio-disk0,id=device-virtio-disk0 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0 -boot order=cd -monitor stdio -usb -device usb-tablet,id=input0 -chardev socket,id=s1,path=/tmp/s1,server,nowait -device isa-serial,chardev=s1 -vnc :10 -monitor tcp::1234,server,nowait -smp 4 -qmp tcp:0:5555,server,nowait -chardev socket,id=qmp_monitor_id_qmpmonitor1,path=/tmp/qmp,server,nowait -mon chardev=qmp_monitor_id_qmpmonitor1,mode=control

2.in qemu monitor:
(qemu) snapshot_blkdev drive-virtio-disk0 /root/sn1 qcow2

3.in qemu monitor:
(qemu) block_stream drive-virtio-disk0

4.in guest, s4:
echo disk > /sys/power/state

  
Actual results:
----------------
s4 fails to end, guest hang, screenshot in attachment, boot guest with sn1, guest boots as normal instead of resuming from s4.


Additional info:
-----------------
find this problem with bug 807894, maybe the same one.

Comment 2 Dor Laor 2012-03-29 07:17:53 UTC
Does s4 work 100% reliable w/o streaming? Same question to streaming w/o s4
Let's close it as a duplicate of # 807894 for the time being

*** This bug has been marked as a duplicate of bug 807894 ***

Comment 3 Shaolong Hu 2012-03-29 07:23:23 UTC
(In reply to comment #2)
> Does s4 work 100% reliable w/o streaming? Same question to streaming w/o s4
> Let's close it as a duplicate of # 807894 for the time being
> 
> *** This bug has been marked as a duplicate of bug 807894 ***

Yes, s4 w/o streaming works fine(try 2 times, not sure 100% works), after s4, qemu-kvm quits, start qemu-kvm again, guest resumes from s4 correctly.

Comment 4 Paolo Bonzini 2012-03-29 14:17:12 UTC
This is related to shutdown while streaming (bug 807894 comment 9).

The following works:

1) start qemu-kvm with -no-shutdown
2) snapshot_blkdev virtio0 /home/pbonzini/snap.qcow2 qcow2
3) block_stream virtio0
4) ... echo disk > /sys/power/state

when it finishes:
5) block_job_cancel virtio0
6) quit
7) reboot with snap.qcow2

Comment 5 Paolo Bonzini 2012-03-29 15:48:19 UTC
This happens if streaming does an iteration while qcow2_cache_flush runs.  It can be fixed by adding a proper qemu_aio_wait.  Submitting patch upstream for comments.

Comment 6 Paolo Bonzini 2012-03-29 15:57:45 UTC
Created attachment 573721 [details]
patch to fix the bug, RHEL version

Comment 7 Paolo Bonzini 2012-03-30 07:52:07 UTC
device_del also needs to be tested.

Comment 8 Shaolong Hu 2012-03-30 08:04:52 UTC
(In reply to comment #7)
> device_del also needs to be tested.

sure, we have a case covering it.

Comment 9 Paolo Bonzini 2012-04-03 14:33:50 UTC
*** Bug 808004 has been marked as a duplicate of this bug. ***

Comment 12 daiwei 2012-04-19 12:36:00 UTC
Reproduced this issue with steps and environment as follows:

# uname -r; rpm -q qemu-kvm
2.6.32-262.el6.x86_64
qemu-kvm-0.12.1.2-2.267.el6ev.x86_64

1.boot guest 

2.in qemu monitor:
(qemu) snapshot_blkdev drive-virtio-disk0 /root/sn1 qcow2

s4 fails to end, guest hangs.boot guest with sn1,guest boots as normal instead of resuming from s4.

Verified this issue with steps and environment as follows:

# uname -r ;rpm -q qemu-kvm-rhev
2.6.32-262.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.278.el6.x86_64

1. boot guest

2.in qemu monitor:
(qemu) snapshot_blkdev drive-virtio-disk0 /root/sn1 qcow2

qemu-kvm quit normally. boot guest with sn1,guest resumes from s4 .

3.boot guest with a datadisk 
/usr/libexec/qemu-kvm -enable-kvm -M rhel6.3.0 -m 4G -name rhel6.3-64 -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -uuid 3f2ea5cd-3d29-48ff-aab2-23df1b6ae213 -drive file=/home/rhel6.3-64.qcow2,cache=none,if=none,rerror=stop,werror=stop,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,drive=drive-virtio-disk0,id=device-virtio-disk0 -netdev tap,script=/etc/qemu-ifup-switch,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0 -boot order=cd -monitor stdio -usb -device usb-tablet,id=input0 -chardev socket,id=s1,path=/tmp/s1,server,nowait -device isa-serial,chardev=s1 -vnc :10 -monitor tcp::1234,server,nowait -smp 4 -qmp tcp:0:5555,server,nowait -chardev socket,id=qmp_monitor_id_qmpmonitor1,path=/tmp/qmp,server,nowait -mon chardev=qmp_monitor_id_qmpmonitor1,mode=control -drive file=/home/datadisk.qcow2,cache=none,if=none,rerror=stop,werror=stop,id=disk1,format=qcow2 -device virtio-blk-pci,drive=disk1,id=datadisk1

4.in qemu monitor:
(qemu) snapshot_blkdev disk1 /root/sn2 qcow2
(qemu) block-stream disk1
(qemu) device_del datadisk1

block-job was canceled , and boot guest with sn2 works well.

So, this bug has been fixed.

Comment 15 Michal Novotny 2012-05-04 13:16:36 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
NEEDINFO

Comment 16 Paolo Bonzini 2012-05-04 13:44:47 UTC
New feature in 6.3, no documentation needed.

Comment 17 Paolo Bonzini 2012-05-04 13:44:47 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-NEEDINFO+No documentation needed.

Comment 18 errata-xmlrpc 2012-06-20 11:45:45 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-2012-0746.html


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