Bug 1768541 - Corruption and data loss with qemu and compressed qcow2
Summary: Corruption and data loss with qemu and compressed qcow2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: 31
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1765210 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-04 16:51 UTC by cody6730
Modified: 2019-11-15 03:01 UTC (History)
10 users (show)

Fixed In Version: qemu-4.1.0-6.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-15 03:01:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description cody6730 2019-11-04 16:51:34 UTC
Description of problem: Corruption and data loss occur when using a VM with a compressed qcow2 disk image


Version-Release number of selected component (if applicable): QEMU emulator version 4.1.0 (qemu-4.1.0-5.fc31)


How reproducible: Always


Steps to Reproduce:
1. Create a fresh VM with a qcow2 backing image
2. Use qemu-img convert to compress the image (qemu-img convert -c -O qcow2 <original>.qcow2 <copy>.qcow2
3. Switch the VM backing disk to the newly created compressed image
4. Perform some read/write intensive operations (such as applying updates)
5. Reboot

Actual results: Either during disk writes or after rebooting the VM, the OS will complain of failed IO requests and other errors. Depending upon the situation, some may be repaired using filesystem repair utilities, but the errors will continue until the VM is eventually rendered unrecoverable.


Expected results: VM operates normally after enabling qcow2 compression


Additional info: After the upgrade to Fedora 31, this has caused me to lose every VM running on the machine. qemu-img check can sometimes help to get things going again, but unfortunately, the problem keeps recurring until eventually there has been so much data loss that the VM cannot be recovered. This issue does not seem to happen unless the qcow2 image has compression enabled. This has been tested with guest operating systems such as Windows 10, Fedora 30, Fedora 31, and Kali.

Comment 1 Richard W.M. Jones 2019-11-04 17:01:19 UTC
Is this different from https://bugzilla.redhat.com/show_bug.cgi?id=1763519 ?

Comment 2 Richard W.M. Jones 2019-11-04 17:02:46 UTC
To answer my own question, it seems so.  See also:
https://bugs.launchpad.net/qemu/+bug/1850000

Comment 3 cody6730 2019-11-04 17:18:46 UTC
Unfortunately, the issue mentioned here seems to indicate that the errors are bogus, whereas in my case, I'm experiencing unrecoverable data loss

Comment 4 cody6730 2019-11-04 17:22:01 UTC
The symptoms do seem to be very similar to 1763519

Comment 5 cody6730 2019-11-04 19:24:46 UTC
It is worth noting, though, that the problem persists even with qemu-4.1.0-5.fc31, which, as mentioned in 1763519, was pushed to stable.

Comment 6 Cole Robinson 2019-11-11 14:30:54 UTC
The launchpad bug mentions this patch, I will do a build: https://lists.gnu.org/archive/html/qemu-devel/2019-10/msg07718.html

Comment 7 Fedora Update System 2019-11-11 18:32:50 UTC
FEDORA-2019-f6e252df86 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-f6e252df86

Comment 8 cody6730 2019-11-11 20:22:44 UTC
As soon as it is pushed to testing, I'll give it a try and share the results.

Comment 9 Cole Robinson 2019-11-12 14:26:12 UTC
*** Bug 1765210 has been marked as a duplicate of this bug. ***

Comment 10 Marc Muehlfeld 2019-11-12 16:23:05 UTC
qemu-img-4.1.0-6.fc31.x86_64.rpm fixes the bug with compression I reported in BZ#1765210 (flagged as a duplicate of this ticket).

Comment 11 Fedora Update System 2019-11-13 04:56:46 UTC
qemu-4.1.0-6.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-f6e252df86

Comment 12 cody6730 2019-11-14 20:13:37 UTC
This seems to have fixed the issue for me as well.

Comment 13 Fedora Update System 2019-11-15 03:01:47 UTC
qemu-4.1.0-6.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.


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