Bug 1101430
| Summary: | qemu-kvm get "Unknown error 1539571707" when execute block-stream | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | ShupingCui <scui> | ||||
| Component: | qemu-kvm | Assignee: | Jeff Cody <jcody> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.6 | CC: | bsarathy, chayang, jen, juzhang, michen, mkenneth, qzhang, rbalakri, shuang, shu, tlavigne, virt-maint, xuhan, xutian, xwei | ||||
| Target Milestone: | rc | Keywords: | Regression, TestBlocker | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | qemu-kvm-0.12.1.2-2.429.el6 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-10-14 07:00:21 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
not met this issue on qemu-kvm-rhev-0.12.1.2-2.426.el6, so it's a Regression bug. Reproduced manually:
CMD:
[root@localhost ~]# /usr/libexec/qemu-kvm -enable-kvm -M rhel6.5.0 -smp 4 -m 4G -name rhel6.3-64 -uuid 3f2ea5cd-3d29-48ff-aab2-23df1b6ae213 -drive file=/root/nfs/RHEL-Server-7.0-64-virtio.qcow2,cache=none,if=none,rerror=stop,werror=stop,id=drive-virtio-disk0,format=qcow2,aio=native -device virtio-blk-pci,drive=drive-virtio-disk0,id=device-virtio-disk0,bootindex=1 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0,mac=aa:54:00:11:22:33 -boot order=cd -monitor stdio -readconfig nfs/ich9-ehci-uhci.cfg -device usb-tablet,id=input0 -chardev socket,id=s1,path=/tmp/s1,server,nowait -device isa-serial,chardev=s1 -monitor tcp::1234,server,nowait -vga qxl -global qxl-vga.revision=3 -spice port=5920,disable-ticketing -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -vnc :10 -qmp tcp:0:5555,server,nowait
STEPS:
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-virtio-disk0",
"snapshot-file":
"/home/sn1",
"format": "qcow2" } }
{"return": {}}
{ "execute": "block-stream", "arguments": { "device": "drive-virtio-disk0" } }
{"return": {}}
{"timestamp": {"seconds": 1401183491, "microseconds": 439319}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drive-virtio-disk0", "len": 21474836480, "offset": 80543744, "speed": 0, "type": "stream", "error": "Unknown error 138870779"}}
This regression is caused by downstream commit 668be102d27fa47229431d3488021659d786135a: "qcow2: Ignore reserved bits in get_cluster_offset"
In that commit, qcow2_co_get_block_status is using an 'int' for a status return, where an 'int64_t' should be used instead:
static int64_t coroutine_fn qcow2_co_get_block_status(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum)
{
BDRVQcowState *s = bs->opaque;
uint64_t cluster_offset;
int index_in_cluster, ret;
int status = 0;
....
return status;
}
This looks to be the result of a backport mistake, which combined parts of 4bc74be99: "block: return get_block_status data and flags for formats" with parts of 68d000a3: "qcow2: Ignore reserved bits in get_cluster_offset"
Created attachment 907691 [details]
Script to reproduce the BZ
This script will reproduce the BZ - it may take a little time to run, as it fills data in the qcow2 file, and then streams the data.
Eventually, the script will output the results of the block stream.
While the bug is still present, this will be the output (timestamp will vary, of course):
{"timestamp": {"seconds": 1402499372, "microseconds": 811330}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drive-virtio-disk0", "len": 3221225472, "offset": 2146959360, "speed": 0, "type": "stream", "error": "Unknown error 2147483643"}}
Once the bug is fixed, the script will output:
{"timestamp": {"seconds": 1402499467, "microseconds": 828837}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drive-virtio-disk0", "len": 3221225472, "offset": 3221225472, "speed": 0, "type": "stream"}}
The script does not exit, so kill it with ^C when you are done. It also does not clean up the qcow2 files it creates, so you will want to clean those up manually after the script has completed.
*** Bug 1101445 has been marked as a duplicate of this bug. *** *** Bug 1101383 has been marked as a duplicate of this bug. *** Fix included in qemu-kvm-0.12.1.2-2.429.el6 https://virtlab.englab.nay.redhat.com/job/88684/details/ kernel-2.6.32-488.el6.x86_64 qemu-kvm-rhev-0.12.1.2-2.430.el6.x86_64 Verified on version as above, test steps provided by bz reporter, log as below 2014-07-16 18:31:21: {"execute": "blockdev-snapshot-sync", "arguments": {"device": "drive_image1", "snapshot-file": "/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/sn1", "format": "qcow2"}, "id": "9Nhjs3bG"} 2014-07-16 18:31:22: {"return": {}, "id": "9Nhjs3bG"} (In reply to Xiaoqing Wei from comment #13) > https://virtlab.englab.nay.redhat.com/job/88684/details/ > kernel-2.6.32-488.el6.x86_64 > qemu-kvm-rhev-0.12.1.2-2.430.el6.x86_64 > > Verified on version as above, test steps provided by bz reporter, > log as below > 2014-07-16 18:31:21: {"execute": "blockdev-snapshot-sync", "arguments": > {"device": "drive_image1", "snapshot-file": > "/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/ > sn1", "format": "qcow2"}, "id": "9Nhjs3bG"} > 2014-07-16 18:31:22: {"return": {}, "id": "9Nhjs3bG"} Missed the stream cmd: 2014-07-16 18:31:22: {"execute": "block-stream", "arguments": {"device": "drive_image1", "speed": 0}, "id": "hBmnUs51"} 2014-07-16 18:31:22: {"return": {}, "id": "hBmnUs51"} cmd finished successfully 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-2014-1490.html |
Description of problem: qemu-kvm get "Unknown error 1539571707" when execute block-stream Version-Release number of selected component (if applicable): 2.6.32-470.el6.x86_64 qemu-kvm-rhev-0.12.1.2-2.427.el6.x86_64 qemu-img-rhev-0.12.1.2-2.427.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. boot the guest /usr/bin/qemu-kvm \ -name 'virt-tests-vm1' \ -M rhel6.5.0 \ -nodefaults \ -vga qxl \ -global qxl-vga.vram_size=33554432 \ -device intel-hda,bus=pci.0,addr=03 \ -device hda-duplex \ -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20140526-224205-R8wnsDnX,server,nowait \ -mon chardev=qmp_id_qmpmonitor1,mode=control \ -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20140526-224205-R8wnsDnX,server,nowait \ -device isa-serial,chardev=serial_id_serial0 \ -device virtio-serial-pci,id=virtio_serial_pci0,bus=pci.0,addr=04 \ -chardev socket,id=devvs,path=/tmp/virtio_port-vs-20140526-224205-R8wnsDnX,server,nowait \ -device virtserialport,chardev=devvs,name=vs,id=vs,bus=virtio_serial_pci0.0 \ -chardev socket,id=seabioslog_id_20140526-224205-R8wnsDnX,path=/tmp/seabios-20140526-224205-R8wnsDnX,server,nowait \ -device isa-debugcon,chardev=seabioslog_id_20140526-224205-R8wnsDnX,iobase=0x402 \ -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=05 \ -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-6.5-64-virtio.qcow2 \ -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=06 \ -device virtio-net-pci,mac=9a:cb:cc:cd:ce:cf,id=idOGnn6a,vectors=4,netdev=idSqCMEx,bus=pci.0,addr=07 \ -netdev tap,id=idSqCMEx,vhost=on,vhostfd=23,fd=22 \ -m 4096 \ -smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \ -cpu 'SandyBridge' \ -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \ -spice port=3000,password=123456,addr=0,tls-port=3200,x509-dir=/tmp/spice_x509d,tls-channel=main,tls-channel=inputs,image-compression=auto_glz,zlib-glz-wan-compression=auto,streaming-video=all,agent-mouse=on,playback-compression=on,ipv4 \ -rtc base=utc,clock=host,driftfix=slew \ -boot order=cdn,once=c,menu=off \ -no-kvm-pit-reinjection \ -enable-kvm 2. do snapshot with command 'blockdev-snapshot-sync' {'execute': 'blockdev-snapshot-sync', 'arguments': {'device': u'drive_image1', 'snapshot-file': '/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/sn1', 'format': 'qcow2'}, 'id': 'R9xpnM5E'} 3. start to stream block device {'execute': 'block-stream', 'arguments': {'device': u'drive_image1', 'speed': 0}, 'id': 'rGa1CL0N'} Actual results: {"timestamp": {"seconds": 1401115329, "microseconds": 328551}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drive_image1", "len": 21474836480, "offset": 9699328, "speed": 0, "type": "stream", "error": "Unknown error 1539571707"}} Expected results: no error found Additional info: