Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 606434 - [kvm] segmentation fault when running qemu-img check on faulty image
[kvm] segmentation fault when running qemu-img check on faulty image
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.5.z
All Linux
high Severity high
: rc
: ---
Assigned To: Kevin Wolf
Virtualization Bugs
: ZStream
Depends On:
Blocks: 610342
  Show dependency treegraph
 
Reported: 2010-06-21 11:38 EDT by Haim
Modified: 2014-01-12 19:46 EST (History)
14 users (show)

See Also:
Fixed In Version: kvm-83-192.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-13 18:36:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
faulty vm image file - use xunzip to uncompress it (2.33 MB, application/x-xz)
2010-06-21 11:41 EDT, Haim
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0028 normal SHIPPED_LIVE Low: kvm security and bug fix update 2011-01-13 06:03:39 EST

  None (edit)
Description Haim 2010-06-21 11:38:44 EDT
Description of problem:

running qemu-img check on faulty vm (possible corruption) ends with segmentation fault printed on screen (iscsi - block device).
attached also is the corrupted image (qcow2) - please use xunzip and run qemu-img check -f qcow2 on it.  

repro steps: 

1) run qemu-img check -f qcow2 <attached image>  

example: 
[root@red-vdsb ~]# qemu-img check -f qcow2 /rhev/data-center/a7edd3bc-d9cb-4e52-b319-2768775f7067/634b44af-0d7c-4d8b-8d35-6b295418f78b/images/6b618e7c-ab34-4ff9-a2a3-095422219dd4/e80849ae-e78c-415d-a4f4-45142795ae24
ERROR: invalid cluster offset=0x1100010000000000
Segmentation fault


Version-Release number of selected component (if applicable):

kvm-qemu-img-83-164.el5_5.12
kvm-83-164.el5_5.12
vdsm22-4.5-62.el5rhev

How reproducible: always. 


Steps to Reproduce (using rhev-m)(storage=iscsi): 

1) make sure to have 2 running hosts 
2) make sure that vm is running on non-spm machine 
3) make sure vm disk size is 30G virtIO thinly provisioned and it's bigger then 
   storage domain size (it seems that when space on storage is consumed during 
   lvextend retires are some corrupts qemu image). 
4) run vm (live cd) and start dd from the guest machine )dd if=/dev/zero of=/dev/vda bs=1M 

once vm is paused due to unknown storage error (EIO) and all it's space is consumed, check image legality. 

  
Actual results:

segfault running qemu-image check
Comment 1 Haim 2010-06-21 11:41:00 EDT
Created attachment 425675 [details]
faulty vm image file - use xunzip to uncompress it

faulty vm image file - use xunzip to uncompress it and see the seg fault
Comment 2 lihuang 2010-06-22 04:34:42 EDT
FYI : a similar bug in RHEL6. bug 604210. ( including backtrace)
Comment 8 Keqin Hong 2010-11-04 06:27:00 EDT
Verified on kvm-83-192.el5, PASS. (no segfault will appear, instead, more accurate prompts are provided.)
# qemu-img check 16g
ERROR refcount block 8191 is outside image
Leaked cluster 16380 refcount=1 reference=0
Leaked cluster 16381 refcount=1 reference=0
Leaked cluster 16382 refcount=1 reference=0
Leaked cluster 16383 refcount=1 reference=0
Leaked cluster 16384 refcount=1 reference=0
Leaked cluster 16385 refcount=1 reference=0
Leaked cluster 16386 refcount=1 reference=0
Leaked cluster 16387 refcount=1 reference=0
Leaked cluster 180222 refcount=1 reference=0
Leaked cluster 180223 refcount=1 reference=0
Leaked cluster 180224 refcount=1 reference=0
Leaked cluster 180225 refcount=1 reference=0
Leaked cluster 180226 refcount=1 reference=0
Leaked cluster 180227 refcount=1 reference=0
Leaked cluster 180228 refcount=1 reference=0
Leaked cluster 180229 refcount=1 reference=0
Leaked cluster 245754 refcount=1 reference=0
Leaked cluster 245755 refcount=1 reference=0
Leaked cluster 245756 refcount=1 reference=0
Leaked cluster 245757 refcount=1 reference=0
Leaked cluster 245758 refcount=1 reference=0
Leaked cluster 245759 refcount=1 reference=0

1 errors were found on the image.
Data may be corrupted, or further writes to the image may corrupt it.

22 leaked clusters were found on the image.
This means waste of disk space, but no harm to data.
Comment 11 errata-xmlrpc 2011-01-13 18:36:17 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0028.html

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