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
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
FYI : a similar bug in RHEL6. bug 604210. ( including backtrace)
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.
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