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 1260422 - Errors found on based image after block-stream
Summary: Errors found on based image after block-stream
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.2
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Ademar Reis
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-06 17:40 UTC by Xueqiang Wei
Modified: 2015-09-08 15:21 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-08 15:21:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xueqiang Wei 2015-09-06 17:40:40 UTC
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 06:56:17 UTC
Install a flash image and re-test around 15 times, could not reproduce this issue

Comment 3 Ademar Reis 2015-09-08 15:21:09 UTC
(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.