Bug 1260422 - Errors found on based image after block-stream
Errors found on based image after block-stream
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
x86_64 Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Ademar Reis
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-06 13:40 EDT by Xueqiang Wei
Modified: 2015-09-08 11:21 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-08 11:21:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Xueqiang Wei 2015-09-06 13:40:40 EDT
Description of problem:

Errors found on based image after block-stream
Hit this issue by autotest script. I tried 5 times manually, not hit this issue.

autotest script commandline and parameters:
python ConfigTest.py --testcase=block_stream.simple_test.start_stream --display=spice --mem=4096 --imageformat=qcow2 --driveformat=virtio_scsi --nicmodel=virtio_net --guestname=Win2012..r2  --clone=no --post_check=no --nrepeat=5

host: RHEL7.2
guest: win2012..r2
image format: qocw2
drive format: virtio_scsi
nic model: virtio_net
display: spice


Version-Release number of selected component (if applicable):
kernel-3.10.0-314.el7.x86_64
qemu-kvm-rhev-2.3.0-22.el7


How reproducible:
4/5


Steps to Reproduce:
1. start vm
   /usr/libexec/qemu-kvm \
    -name 'virt-tests-vm1'  \
    -sandbox off  \
    -M pc  \
    -nodefaults  \
    -vga qxl \
    -device intel-hda,bus=pci.0,addr=03 \
    -device hda-duplex  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20150904-092809-wtVL0unX,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=qmp_id_catch_monitor,path=/tmp/monitor-catch_monitor-20150904-092809-wtVL0unX,server,nowait \
    -mon chardev=qmp_id_catch_monitor,mode=control  \
    -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20150904-092809-wtVL0unX,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-20150904-092809-wtVL0unX,server,nowait \
    -device virtserialport,chardev=devvs,name=vs,id=vs,bus=virtio_serial_pci0.0  \
    -chardev socket,id=seabioslog_id_20150904-092809-wtVL0unX,path=/tmp/seabios-20150904-092809-wtVL0unX,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20150904-092809-wtVL0unX,iobase=0x402 \
    -device nec-usb-xhci,id=usb1,bus=pci.0,addr=05 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=06 \
    -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,format=qcow2,file=/home/staf-auto/autotest/client/tests/virt/shared/data/images/win2012-64r2-virtio-scsi.qcow2 \
    -device scsi-hd,id=image1,drive=drive_image1 \
    -device virtio-net-pci,mac=9a:33:34:35:36:37,id=id4d2fG8,vectors=4,netdev=idIQ0Wdu,bus=pci.0,addr=07  \
    -netdev tap,id=idIQ0Wdu,vhost=on \
    -m 4096  \
    -smp 2,maxcpus=2,cores=1,threads=1,sockets=2  \
    -cpu 'SandyBridge',+kvm_pv_unhalt,hv_spinlocks=0x1fff,hv_vapic,hv_time \
    -drive id=drive_cd1,if=none,snapshot=off,aio=native,media=cdrom,file=/home/staf-auto/autotest/client/tests/virt/shared/data/isos/windows/winutils.iso \
    -device ide-cd,id=cd1,drive=drive_cd1,bus=ide.0,unit=0 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -spice port=3000,disable-ticketing \
    -rtc base=localtime,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off,strict=off \
    -enable-kvm \
    -monitor stdio \
    -qmp tcp:0:6667,server,nowait \

2. verify the guest alive
  {"execute":"qmp_capabilities"}
  {"execute": "query-block"}

3. create live snapshots
  {"execute": "blockdev-snapshot-sync", "arguments": {"device": "drive_image1", "snapshot-file": "/home/staf-auto/autotest/client/tests/virt/shared/data/images/sn1", "format": "qcow2"}}

4. query block
 {"execute": "query-block"}

5. block stream job
 {"execute": "block-stream", "arguments": {"device": "drive_image1", "speed": 0}}

6. repeat execute the "query-block-jobs", util {"return": []}
 {"execute": "query-block-jobs"}

7. Compare image size
 /bin/qemu-img info /home/staf-auto/autotest/client/tests/virt/shared/data/images/sn1

/bin/qemu-img info /home/staf-auto/autotest/client/tests/virt/shared/data/images/win2012-64r2-virtio-scsi.qcow2

8. verify guest alive, then shutting down

9. start vm again
 /bin/qemu-kvm \
    -name 'virt-tests-vm1'  \
    -sandbox off  \
    -M pc  \
    -nodefaults  \
    -vga qxl  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20150906-231519-8a4V2GKd,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=qmp_id_catch_monitor,path=/tmp/monitor-catch_monitor-20150906-231519-8a4V2GKd,server,nowait \
    -mon chardev=qmp_id_catch_monitor,mode=control  \
    -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20150906-231519-8a4V2GKd,server,nowait \
    -device isa-serial,chardev=serial_id_serial0  \
    -chardev socket,id=seabioslog_id_20150906-231519-8a4V2GKd,path=/tmp/seabios-20150906-231519-8a4V2GKd,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20150906-231519-8a4V2GKd,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=04 \
    -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,format=qcow2,file=/home/staf-auto/autotest/client/tests/virt/shared/data/images/win2012-64r2-virtio-scsi.qcow2 \
    -device scsi-hd,id=image1,drive=drive_image1 \
    -device virtio-net-pci,mac=9a:38:39:3a:3b:3c,id=idHfZfJd,vectors=4,netdev=idiv8a4U,bus=pci.0,addr=05  \
    -netdev tap,id=idiv8a4U,vhost=on \
    -m 4096  \
    -smp 2,maxcpus=2,cores=1,threads=1,sockets=2  \
    -cpu 'SandyBridge',+kvm_pv_unhalt,hv_spinlocks=0x1fff,hv_vapic,hv_time \
    -drive id=drive_cd1,if=none,snapshot=off,aio=native,media=cdrom,file=/home/staf-auto/autotest/client/tests/virt/shared/data/isos/windows/winutils.iso \
    -device scsi-cd,id=cd1,drive=drive_cd1 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -spice port=3000,disable-ticketing \
    -rtc base=localtime,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off,strict=off \
    -enable-kvm \
    -monitor stdio \

10. verify guest alive, then shutting down

11. remove snapshot
  rm -f /home/staf-auto/autotest/client/tests/virt/shared/data/images/sn1

12. Check image file
  /bin/qemu-img info /home/staf-auto/autotest/client/tests/virt/shared/data/images/win2012-64r2-virtio-scsi.qcow2
  
  /bin/qemu-img check /home/staf-auto/autotest/client/tests/virt/shared/data/images/win2012-64r2-virtio-scsi.qcow2


Actual results:
after step 12,
979 errors were found on the image.
Data may be corrupted, or further writes to the image may corrupt it.
3685 leaked clusters were found on the image.
This means waste of disk space, but no harm to data.
134023/491520 = 27.27% allocated, 29.33% fragmented, 0.00% compressed clusters
Image end offset: 8962703360
ERROR cluster 131377 refcount=1 reference=2
ERROR cluster 131378 refcount=1 reference=2
ERROR cluster 131379 refcount=1 reference=2
...

Expected results:
after step 12, No errors were found on the image.
137795/491520 = 28.03% allocated, 27.42% fragmented, 0.00% compressed clusters
Image end offset: 9031581696

Additional info:
Comment 2 Xueqiang Wei 2015-09-08 02:56:17 EDT
Install a flash image and re-test around 15 times, could not reproduce this issue
Comment 3 Ademar Reis 2015-09-08 11:21:09 EDT
(In reply to Xueqiang Wei from comment #2)
> Install a flash image and re-test around 15 times, could not reproduce this
> issue

So I'm assuming there was something wrong with the test setup and closing this BZ. Please reopen if you can consistently reproduce it.

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