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 1367731 - Other operations(snapshot/hot-unplug) to the block are not forbidden after image streaming starts, which cause qemu and guest hang until streaming completes.
Summary: Other operations(snapshot/hot-unplug) to the block are not forbidden after im...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: All
OS: Linux
high
urgent
Target Milestone: rc
: ---
Assignee: John Snow
QA Contact: Qianqian Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-17 10:33 UTC by Qianqian Zhu
Modified: 2017-08-02 03:29 UTC (History)
7 users (show)

Fixed In Version: qemu-kvm-rhev-2.9.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 23:34:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2392 0 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2017-08-01 20:04:36 UTC

Description Qianqian Zhu 2016-08-17 10:33:03 UTC
Description of problem:
Other operations(snapshot/hot-unplug) to the block are not forbidden after image streaming starts, which cause qemu and guest hang until streaming completes, although such operation(snapshot/hot-unplug) will be executed when streaming completes.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.6.0-20.el7.x86_64
kernel-3.10.0-491.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Launch guest with two disks:
 /usr/libexec/qemu-kvm -name linux -cpu SandyBridge -m 2048 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 7bef3814-631a-48bb-bae8-2b1de75f7a13 -nodefaults -monitor stdio -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot order=c,menu=on -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive file=/home/RHEL-Server-7.3-64-virtio.qcow2,if=none,cache=none,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -msg timestamp=on -spice port=5901,disable-ticketing -vga qxl -global qxl-vga.revision=3 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=3C:D9:2B:09:AB:44,bus=pci.0,addr=0x3 -qmp tcp::5555,server,nowait -drive file=/home/datedisk.qcow2,if=none,cache=none,id=drive-virtio-disk1,format=qcow2 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1,bootindex=1

2.Snapshot for the none-system disk.
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-virtio-disk1","snapshot-file": "/home/sn1", "format": "qcow2", "mode": "absolute-paths" } }

3.Block stream:
{ "execute": "block-stream", "arguments": { "device": "drive-virtio-disk1", "speed":1000000000, "on-error": "report"}}

4.Snapshot/Hot-unplug the disk right after block stream.
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-virtio-disk1","snapshot-file": "/home/sn2", "format": "qcow2", "mode": "absolute-paths" } }
Or: {"execute":"device_del","arguments":{"id":"virtio-disk1"}}

Actual results:
Both qemu and guest hang during streaming.

Expected results:
Such operation should be forbidden, or it will be fluently executed one by one. There should not exit any hang.

Additional info:

Comment 2 Qianqian Zhu 2017-05-05 09:27:07 UTC
Test on qemu-kvm-rhev-2.9.0-2.el7.x86_64, This issue is gone.

Result:
Snapshot is forbidden when streaming not finished.
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-virtio-blk0","snapshot-file": "/home/sn2", "format": "qcow2", "mode": "absolute-paths" } }
{"error": {"class": "GenericError", "desc": "Node 'drive-virtio-blk0' is busy: block device is in use by block job: stream"}}
And job will be cancelled if hot unplug device in use:
{"execute":"device_del","arguments":{"id":"virtio-blk-0"}}
{"return": {}}
{"timestamp": {"seconds": 1493976284, "microseconds": 98220}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/virtio-blk-0/virtio-backend"}}
{"timestamp": {"seconds": 1493976284, "microseconds": 98314}, "event": "DEVICE_DELETED", "data": {"device": "virtio-blk-0", "path": "/machine/peripheral/virtio-blk-0"}}
{"timestamp": {"seconds": 1493976284, "microseconds": 121775}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "drive-virtio-blk0", "len": 21474836480, "offset": 3551920128, "speed": 1000000000, "type": "stream"}}

Comment 3 John Snow 2017-05-05 16:34:23 UTC
Thanks for updating the BZ, this was first on my list for today -- what a pleasant surprise!

Thank you very much.

Mirek, marking as post to indicate this was fixed via the 2.9.0 rebase.

Comment 5 Qianqian Zhu 2017-05-17 01:53:41 UTC
Per comment 2, moving to VERIFIED.

Comment 7 errata-xmlrpc 2017-08-01 23:34:44 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://access.redhat.com/errata/RHSA-2017:2392

Comment 8 errata-xmlrpc 2017-08-02 01:12:22 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://access.redhat.com/errata/RHSA-2017:2392

Comment 9 errata-xmlrpc 2017-08-02 02:04:21 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://access.redhat.com/errata/RHSA-2017:2392

Comment 10 errata-xmlrpc 2017-08-02 02:45:08 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://access.redhat.com/errata/RHSA-2017:2392

Comment 11 errata-xmlrpc 2017-08-02 03:09:50 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://access.redhat.com/errata/RHSA-2017:2392

Comment 12 errata-xmlrpc 2017-08-02 03:29:59 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://access.redhat.com/errata/RHSA-2017:2392


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