Bug 1260580

Summary: Win7.64 guest image occured error in qemu-img check after doing system-reset for about 20 times
Product: Red Hat Enterprise Linux 7 Reporter: xiagao
Component: qemu-kvm-rhevAssignee: Kevin Wolf <kwolf>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: coli, hreitz, huding, juzhang, knoel, kwolf, pingl, shuang, virt-maint, xfu, xiagao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-04 08:10:34 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:

Description xiagao 2015-09-07 10:10:01 UTC
Description of problem:
Do system-reset for about 20 times and literation is set about 1-60 secs, then shutdown guest and check guest image,then error occures.

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

How reproducible:
100%

Steps to Reproduce:
1.Install win7.64 guest.

2.Check guest image.
# qemu-img info/check win7-64-sp1.qcow2
image: win7-64-sp1.qcow2
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 7.9G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
# qemu-img check win7-64-sp1.qcow2
No errors were found on the image.
128647/491520 = 26.17% allocated, 9.44% fragmented, 0.00% compressed clusters
Image end offset: 8432713728

3.Boot up win7.64 guest.

4.Do system-reset for about 20 times and literation is from 1 sec to 60 secs
{'execute': 'system_reset'}

5.Check guest image.


Actual results:
# qemu-img info win7-64-sp1.qcow2
image: win7-64-sp1.qcow2
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 8.6G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
# qemu-img check win7-64-sp1.qcow2
ERROR cluster 128801 refcount=1 reference=2
ERROR cluster 128802 refcount=1 reference=2
ERROR cluster 128803 refcount=1 reference=2

3 errors were found on the image.
Data may be corrupted, or further writes to the image may corrupt it.
140798/491520 = 28.65% allocated, 11.78% fragmented, 0.00% compressed clusters
Image end offset: 9229107200


Expected results:
no error about guest image

Additional info:
1.CLI
/usr/libexec/qemu-kvm \
    -S  \
    -name 'virt-tests-vm1'  \
    -sandbox off  \
    -machine pc  \
    -nodefaults  \
    -vga qxl  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-virt-tests-vm1-qmpmonitor1-20150905-191147-wLWyChwu,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=qmp_id_catch_monitor,path=/tmp/monitor-virt-tests-vm1-catch_monitor-20150905-191147-wLWyChwu,server,nowait \
    -mon chardev=qmp_id_catch_monitor,mode=control \
    -device pvpanic,ioport=0x505,id=idn5bp6E  \
    -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20150905-191147-wLWyChwu,server,nowait \
    -device isa-serial,chardev=serial_id_serial0  \
    -chardev socket,id=seabioslog_id_20150905-191147-wLWyChwu,path=/tmp/seabios-20150905-191147-wLWyChwu,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20150905-191147-wLWyChwu,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 \
    -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,format=qcow2,file=/home/my_auto/autotest-devel/client/tests/virt/shared/data/images/win7-64-sp1.qcow2 \
    -device ide-hd,id=image1,drive=drive_image1,bus=ide.0,unit=0 \
    -device rtl8139,mac=9a:31:32:33:34:35,id=idg1zt8p,netdev=idCPs410,bus=pci.0,addr=04  \
    -netdev tap,id=idCPs410,fd=26  \
    -m 16384  \
    -smp 16,maxcpus=16,cores=8,threads=1,sockets=2  \
    -cpu 'Westmere',hv_relaxed,+kvm_pv_unhalt,hv_spinlocks=0x1fff,hv_vapic,hv_time \
    -drive id=drive_cd1,if=none,snapshot=off,aio=native,media=cdrom,file=/home/my_auto/autotest-devel/client/tests/virt/shared/data/isos/windows/winutils.iso \
    -device ide-cd,id=cd1,drive=drive_cd1,bus=ide.0,unit=1 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -spice port=3001,password=123456,addr=0,image-compression=auto_glz,zlib-glz-wan-compression=auto,streaming-video=all,agent-mouse=on,playback-compression=on,ipv4  \
    -rtc base=localtime,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off,strict=off \
    -enable-kvm

2. host cpu info
processor	: 31
vendor_id	: GenuineIntel
cpu family	: 6
model		: 47
model name	: Intel(R) Xeon(R) CPU E7- 4830  @ 2.13GHz
stepping	: 2
microcode	: 0x37
cpu MHz		: 2129.000
cache size	: 24576 KB
physical id	: 3
siblings	: 16
core id		: 25
cpu cores	: 8
apicid		: 243
initial apicid	: 243
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes

Comment 2 Kevin Wolf 2015-09-08 16:28:12 UTC
I haven't been able to reproduce this yet.

What are you doing inside the guest before doing the reset? In particular, when
Windows asks whether to enter repair mode or continue normal startup, do you
select anything, do you get the default (repair) or is the reboot done while
Windows still displays the menu?

Also, what exactly do you mean by "literation"? The time between two reset
commands?

Comment 3 xiagao 2015-09-09 07:55:40 UTC
(In reply to Kevin Wolf from comment #2)
> I haven't been able to reproduce this yet.
> 
> What are you doing inside the guest before doing the reset? In particular,

Do nothing, just after installation guest, then do system-reset.

> when
> Windows asks whether to enter repair mode or continue normal startup, do you
> select anything, do you get the default (repair) or is the reboot done while
> Windows still displays the menu?

I select normal startup. what do you mean "or is the reboot done while
Windows still displays the menu?"

> 
> Also, what exactly do you mean by "literation"? The time between two reset
> commands?

Sorry,let you confused. I mean when i do system-reset for 20 times, the time interval of each action was about 2s,5s,10s,7s,30s,25s,8s ...

Comment 7 xiagao 2015-12-31 03:29:27 UTC
Hi all,
I have tried to reproduce this issue on RHEL7.2.z host, but can't reproduce. The details info are:

pkg version:
qemu-kvm-rhev-2.3.0-31.el7_2.5.x86_64
kernel-3.10.0-327.3.1.el7.x86_64

test steps:
1)install win7 guest
2)check guest image
3)do system_reset during booting for hundreds of times
4)check guest image

actual result:
the image is good.

So, what do you think about this bug? 

thanks,
xiaoling

Comment 8 Kevin Wolf 2016-07-04 08:10:34 UTC
Seems we can't reproduce this according comment 2 and comment 7. Closing for now.