Bug 1254927 - qemu-img shows Input/output error when compressing guest image
qemu-img shows Input/output error when compressing guest image
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Max Reitz
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-19 05:13 EDT by FuXiangChun
Modified: 2015-12-04 11:53 EST (History)
10 users (show)

See Also:
Fixed In Version: qemu-kvm-rhev-2.3.0-23.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-04 11:53:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description FuXiangChun 2015-08-19 05:13:33 EDT
Description of problem:
qemu-img-rhev-2.3.0-18.el7.x86_64 and qemu-img-rhev-2.3.0-1.el7.x86_64, Both hit this issue.

e.g
# qemu-img convert -c -f qcow2 -O qcow2 /home/win7-64-bak.qcow2 /home/win7-64-bak-compress.qcow2
qemu-img: error while compressing sector 9263232: Input/output error

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

How reproducible:
100%

Steps to Reproduce:
1.# qemu-img info /home/win7-64-bak.qcow2
image: /home/win7-64-bak.qcow2
file format: qcow2
virtual size: 40G (42949672960 bytes)
disk size: 26G
cluster_size: 65536
Format specific information:
    compat: 0.10
    refcount bits: 16

2.# qemu-img convert -c -f qcow2 -O qcow2 /home/win7-64-bak.qcow2 /home/win7-64-bak-compress.qcow2
qemu-img: error while compressing sector 9263232: Input/output error

3.# qemu-img info /home/win7-64-bak-compress.qcow2
image: /home/win7-64-bak-compress.qcow2
file format: qcow2
virtual size: 40G (42949672960 bytes)
disk size: 2.0G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

4.# qemu-img check /home/win7-64-bak-compress.qcow2
No errors were found on the image.
70497/655360 = 10.76% allocated, 98.46% fragmented, 97.99% compressed clusters
Image end offset: 2147614720

Actual results:


Expected results:


Additional info:
Comment 2 Ademar Reis 2015-08-19 19:36:42 EDT
Can you please grant access to the affected image? (or upload an image we can use to reproduce it).
Comment 4 Max Reitz 2015-08-24 16:52:33 EDT
Fixed upstream with 3e5feb6202149e8a963a33b911216e40d790f1d7, we'll see whether a backport for rhev-7.3.0 is needed or whether that commit will be included by rebase.
Comment 5 Ademar Reis 2015-09-08 16:44:35 EDT
Fixed upstream, patch is simple, impact on customers is real.
Comment 6 Miroslav Rezanina 2015-09-15 06:50:40 EDT
Fix included in qemu-kvm-rhev-2.3.0-23.el7
Comment 7 Qian Guo 2015-09-20 22:35:04 EDT
Reproduced with qemu-kvm-rhev-2.3.0-15.el7.x86_64/
Steps:
# qemu-img info win7-64-sp1-virtio.qcow2 
image: win7-64-sp1-virtio.qcow2
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 7.8G
cluster_size: 65536
Format specific information:
    compat: 0.10
    refcount bits: 16
# qemu-img convert -c -f qcow2 -O qcow2 /home/win7-64-sp1-virtio.qcow2 /home/win7-64-bak-compress.qcow2
qemu-img: error while compressing sector 9418752: Input/output error

# qemu-img info win7-64-bak-compress.qcow2 
image: win7-64-bak-compress.qcow2
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 2.0G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false



So this bug is reproduced.

Verify this bug with qemu-kvm-rhev-2.3.0-24.el7.x86_64

Steps as above:
# qemu-img convert -c -f qcow2 -O qcow2 /home/win7-64-sp1-virtio.qcow2 /home/win7-64-bak-compress1.qcow2 -p
    (100.00/100%)

# qemu-img info win7-64-bak-compress1.qcow2 
image: win7-64-bak-compress1.qcow2
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 3.5G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false


No error occurs, so this bug is fixed.
Comment 8 juzhang 2015-09-21 01:20:59 EDT
According to comment7, set this issue as verified.
Comment 10 errata-xmlrpc 2015-12-04 11:53:55 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2546.html

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