Bug 609779

Summary: errors were found on image after cut off host power during iozone running in guest.
Product: Red Hat Enterprise Linux 6 Reporter: Miya Chen <michen>
Component: qemu-kvmAssignee: Kevin Wolf <kwolf>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: mkenneth, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-01 10:02:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miya Chen 2010-07-01 05:10:19 UTC
Description of problem:
errors were found on image after cut off host power during iozone running in guest.

Version-Release number of selected component (if applicable):
# uname -r
2.6.32-37.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.82.el6.x86_64


How reproducible:


Steps to Reproduce:
1. start guest by:
# /usr/libexec/qemu-kvm -usbdevice tablet -rtc-td-hack -uuid `uuidgen` -drive file=/home/win2008r2-64.qcow2,media=disk,if=none,format=qcow2,cache=none,werror=stop,rerror=stop,id=drive-ide0 -device ide-drive,drive=drive-ide0 -smp 2 -m 4G -cpu qemu64,+sse2,+x2apic -vnc :3 -monitor stdio -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,mac=20:20:78:6b:b1:99 -boot c -name win2008r2-64.qcow2

2. run iozone in guest:
iozone.exe -azR -i 0 -i 1 -i 2 -r 4k -n 1G -g 4G -M -f c:\testfile

3. cut off host power

4. power on host again, then check image.
  
Actual results:
1. # qemu-img check win2008r2-64.qcow2
ERROR: invalid cluster offset=0x2b4822000
ERROR: invalid cluster offset=0x2b4823000
ERROR: invalid cluster offset=0x2b4824000
ERROR: invalid cluster offset=0x2b4825000
ERROR: invalid cluster offset=0x2b4826000
ERROR: invalid cluster offset=0x2b4827000
ERROR: invalid cluster offset=0x2b4828000
ERROR: invalid cluster offset=0x2b4829000
ERROR: invalid cluster offset=0x2b482a000
ERROR: invalid cluster offset=0x2b482b000
ERROR: invalid cluster offset=0x2b482c000
ERROR: invalid cluster offset=0x2b482d000
ERROR: invalid cluster offset=0x2b482e000
ERROR: invalid cluster offset=0x2b482f000
ERROR: invalid cluster offset=0x2b4830000
ERROR: invalid cluster offset=0x2b4831000
ERROR: invalid cluster offset=0x2b4832000
ERROR: invalid cluster offset=0x2b4833000
ERROR: invalid cluster offset=0x2b4834000
ERROR: invalid cluster offset=0x2b4835000
ERROR: invalid cluster offset=0x2b4836000
ERROR: invalid cluster offset=0x2b4837000
ERROR: invalid cluster offset=0x2b4838000
ERROR: invalid cluster offset=0x2b4839000
ERROR: invalid cluster offset=0x2b483a000
ERROR: invalid cluster offset=0x2b483b000
ERROR: invalid cluster offset=0x2b483c000
ERROR: invalid cluster offset=0x2b483d000
ERROR: invalid cluster offset=0x2b483e000
ERROR: invalid cluster offset=0x2b483f000
ERROR: invalid cluster offset=0x2b4840000
ERROR: invalid cluster offset=0x2b4841000
32 errors were found on the image.

2. start guest with same cmd, it can boot up successfully.

Expected results:


Additional info:

Comment 2 RHEL Program Management 2010-07-01 05:23:18 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Kevin Wolf 2010-07-01 09:38:39 UTC
I've looked it up and this message just means that there are some clusters allocated that are after the end of the file. Probably harmless. This might happen when the clusters have been allocated, but not yet written to.

The errors start 11,618,361,344 bytes. To confirm my theory, could you please check if the image file size is just below this value? Also, if you write to the image (maybe you have already written enough by booting it - then the file size would differ, of course), do the qemu-img check errors disappear?

Comment 5 Miya Chen 2010-07-01 09:58:34 UTC
(In reply to comment #4)
> I've looked it up and this message just means that there are some clusters
> allocated that are after the end of the file. Probably harmless. This might
> happen when the clusters have been allocated, but not yet written to.
> 
> The errors start 11,618,361,344 bytes. To confirm my theory, could you please
> check if the image file size is just below this value? 

# qemu-img info win2008r2-64.qcow2
image: win2008r2-64.qcow2
file format: qcow2
virtual size: 15G (16106127360 bytes)
disk size: 11G
cluster_size: 4096

Also, if you write to
> the image (maybe you have already written enough by booting it - then the file
> size would differ, of course), do the qemu-img check errors disappear?    

yes, after boot it again, qemu-img check errors disappeared.

Comment 6 Kevin Wolf 2010-07-01 10:02:55 UTC
Great, so your image is fine. Closing as NOTABUG. I'll take care of this case when improving the qemu-img check messages.