[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm ins
From: |
Max Reitz |
Subject: |
[Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install |
Date: |
Thu, 24 Oct 2019 14:20:00 -0000 |
I suppose that the problem described in bug 1846427 can also affect
guest data, so I think it makes sense to divide based on whether there
are only data corruptions or both data and metadata corruptions.
So far, I don’t know of a report of pure guest data corruptions (without
qcow2 metadata being affected) that didn’t happen on XFS, so I assume
there is an issue that affects both data and metadata on all filesystems
(described by 1846427; Kevin has sent a patch series upstream ot address
it), and another one that only affects guest data and only occurs on XFS
(this one).
Actually, there are two problems we know of on XFS:
The first one was a bug in qemu that has been fixed upstream by
b2c6f23f4a9f6d8f1b648705cd46d3713b78d6a2. People that don’t use master
but the 4.1 release instead are likely to hit that problem instead of
the other one.
The second one seems to be a kernel bug. When fallocating (writing zeroes in
our case) and writing to a file in parallel, the write is discarded if:
- The fallocated area begins at or after the EOF,
- The written area begins after the fallocated area,
- The write is submitted through the AIO interface (io_submit()),
- The write and the fallocate operation are submitted before either one
finishes (i.e. concurrently),
- The fallocate operation finishes after the write.
In qemu, this happens only with aio=native, and then most of the time
when an FALLOC_FL_ZERO_RANGE happens after the EOF while a write after
that range is ongoing.
Claus as the reporter didn’t use aio=native, so if he’s indeed on XFS, he can’t
have hit this second bug. If he’s on XFS, he will most likely have hit the
first one that’s already fixed in master.
Still, we need to fix the second bug. As for how… It looks to me like a
kernel bug, so in qemu we can’t do anything to fix it. But we should probably
work around it. Kevin has proposed making zero-writes on XFS serializing until
infinity, basically (i.e. UINT64_MAX in practice). That gives us some layering
problems (either the file-posix block driver needs access to the TrackedRequest
to extend its length, or the generic block layer needs to know whether a
file-posix node is on XFS), and it yields the question of how to detect whether
the bug has been fixed in the kernel.
Max
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1847793
Title:
qemu 4.1.0 - Corrupt guest filesystem after new vm install
Status in QEMU:
New
Bug description:
When I install a new vm with qemu 4.1.0 all the guest filesystems are
corrupt. The first boot from the install dvd iso is ok and the
installer work fine. But the guest system hangs after the installer
finishes and I reboot the guest. I can see the grub boot menue but the
system cannot load the initramfs.
Testet with:
- RedHat Enterprise Linux 7.5, 7.6 and 7.7 (RedHat uses xfs for the /boot and
/ partition)
Guided install with the graphical installer, no lvm selected.
- Debian Stable/Buster (Debian uses ext4 for / and /home partition)
Guidet install with the graphical installer and default options.
Used commandline to create the vm disk image:
qemu-img create -f qcow2 /volumes/disk2-part2/vmdisks/vmtest10-1.qcow2 20G
Used qemu commandline for vm installation:
#!/bin/sh
# vmtest10 Installation
#
/usr/bin/qemu-system-x86_64 -cpu SandyBridge-IBRS \
-soundhw hda \
-M q35 \
-k de \
-vga qxl \
-machine accel=kvm \
-m 4096 \
-display gtk \
-drive
file=/volumes/disk2-part2/images/debian-10.0.0-amd64-DVD-1.iso,if=ide,media=cdrom
\
-drive
file=/volumes/disk2-part2/images/vmtest10-1.qcow2,if=virtio,media=disk,cache=writeback
\
-boot once=d,menu=off \
-device virtio-net-pci,mac=52:54:00:2c:02:6c,netdev=vlan0 \
-netdev bridge,br=br0,id=vlan0 \
-rtc base=localtime \
-name "vmtest10" \
-usb -device usb-tablet \
-spice disable-ticketing \
-device virtio-serial-pci \
-device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
-chardev spicevmc,id=spicechannel0,name=vdagent $*
Host OS:
Archlinux (last updated at 10.10.2019)
Linux testing 5.3.5-arch1-1-ARCH #1 SMP PREEMPT Mon Oct 7 19:03:08 UTC 2019
x86_64 GNU/Linux
No libvirt in use.
With qemu 4.0.0 it works fine without any errors.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1847793/+subscriptions
- [Bug 1847793] [NEW] qemu 4.1.0 - Corrupt guest filesystem after new vm install, Claus Paetow, 2019/10/11
- [Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install, Dr. David Alan Gilbert, 2019/10/14
- [Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install, Claus Paetow, 2019/10/16
- [Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install, Dr. David Alan Gilbert, 2019/10/16
- [Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install, Max Reitz, 2019/10/16
- [Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install, psyhomb, 2019/10/16
- [Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install, Laszlo Ersek (Red Hat), 2019/10/17
- [Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install, Max Reitz, 2019/10/21
- [Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install, Simon John, 2019/10/21
- [Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install,
Max Reitz <=
- [Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install, Matti Hameister, 2019/10/30
- [Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install, Max Reitz, 2019/10/30
- [Bug 1847793] Re: qemu 4.1.0 - Corrupt guest filesystem after new vm install, Claus Paetow, 2019/10/31