Bug 1254927 - qemu-img shows Input/output error when compressing guest image
Summary: qemu-img shows Input/output error when compressing guest image
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Hanna Czenczek
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-19 09:13 UTC by FuXiangChun
Modified: 2015-12-04 16:53 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-rhev-2.3.0-23.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-04 16:53:55 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2546 0 normal SHIPPED_LIVE qemu-kvm-rhev bug fix and enhancement update 2015-12-04 21:11:56 UTC

Description FuXiangChun 2015-08-19 09:13:33 UTC
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 23:36:42 UTC
Can you please grant access to the affected image? (or upload an image we can use to reproduce it).

Comment 4 Hanna Czenczek 2015-08-24 20:52:33 UTC
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 20:44:35 UTC
Fixed upstream, patch is simple, impact on customers is real.

Comment 6 Miroslav Rezanina 2015-09-15 10:50:40 UTC
Fix included in qemu-kvm-rhev-2.3.0-23.el7

Comment 7 Qian Guo 2015-09-21 02:35:04 UTC
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 05:20:59 UTC
According to comment7, set this issue as verified.

Comment 10 errata-xmlrpc 2015-12-04 16:53:55 UTC
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.