Bug 2173357

Summary: qemu-7.2: virtio-blk-pci I/O errors with detect-zeroes=unmap
Product: [Fedora] Fedora Reporter: Felix Kaechele <felix>
Component: qemuAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: berrange, cfergeau, crobinso, lukas, mcascell, pbonzini, philmd, rjones, stefanha, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-7.2.0-7.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-27 21:19:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2173639    
Bug Blocks:    

Description Felix Kaechele 2023-02-26 00:24:28 UTC
This is a report of an upstream bug that can lead to a filesystem being marked read-only tue to I/O errors when a virtio block device is used with the detect-zeroes=unmap option.
Upstream report is this one: https://gitlab.com/qemu-project/qemu/-/issues/1404

Patches have already been applied to the QEMU master branch but haven't made it into a release yet.

Tested on Fedora 37 with package version qemu-kvm-7.2.0-6.fc37.x86_64 from the @virtmaint-sig/virt-preview COPR.

Comment 1 Richard W.M. Jones 2023-02-27 11:51:31 UTC
https://koji.fedoraproject.org/koji/taskinfo?taskID=98065780

Comment 2 Richard W.M. Jones 2023-02-27 13:03:05 UTC
Errors on x86-64:

214/658 qemu:unit / test-vmstate                                                  ERROR           0.22s   killed by signal 11 SIGSEGV
317/658 qemu:qtest+qtest-i386 / qtest-i386/rtl8139-test                           ERROR           0.28s   2 subtests passed
588/658 qemu:qtest+qtest-x86_64 / qtest-x86_64/rtl8139-test                       ERROR           0.45s   2 subtests passed

Errors on i686:

 32/658 qemu:qtest+qtest-aarch64 / qtest-aarch64/migration-test                   ERROR          155.61s   killed by signal 6 SIGABRT
 34/658 qemu:qtest+qtest-i386 / qtest-i386/migration-test                         ERROR          150.55s   killed by signal 6 SIGABRT
 37/658 qemu:qtest+qtest-x86_64 / qtest-x86_64/migration-test                     ERROR          162.64s   killed by signal 6 SIGABRT
124/658 qemu:unit / test-crypto-tlscredsx509                                      ERROR           1.87s   killed by signal 6 SIGABRT
125/658 qemu:unit / test-crypto-tlssession                                        ERROR           4.32s   killed by signal 6 SIGABRT
214/658 qemu:unit / test-vmstate                                                  ERROR           0.25s   killed by signal 11 SIGSEGV
202/658 qemu:unit / test-io-channel-tls                                           ERROR           3.02s   killed by signal 6 SIGABRT
317/658 qemu:qtest+qtest-i386 / qtest-i386/rtl8139-test                           ERROR           0.26s   2 subtests passed
588/658 qemu:qtest+qtest-x86_64 / qtest-x86_64/rtl8139-test                       ERROR           0.19s   2 subtests passed

Errors on aarch64:

214/658 qemu:unit / test-vmstate                                                  ERROR           0.25s   killed by signal 11 SIGSEGV
317/658 qemu:qtest+qtest-i386 / qtest-i386/rtl8139-test                           ERROR           0.24s   2 subtests passed
588/658 qemu:qtest+qtest-x86_64 / qtest-x86_64/rtl8139-test                       ERROR           0.19s   2 subtests passed

It seems unlikely these have been caused by the very trivial
backported patch.

To check if it is the patch, or if the current package is broken,
I removed the backported patch and started a scratch build (ie.
of the current qemu package in Rawhide):

https://koji.fedoraproject.org/koji/taskinfo?taskID=98067572

Comment 3 Richard W.M. Jones 2023-02-27 13:27:56 UTC
The unpatched scratch build failed in the same way so there is
a generic build problem with qemu in Rawhide at the moment.

Comment 4 Richard W.M. Jones 2023-02-27 15:07:44 UTC
I reproduced the build issue and have filed a new bug about it: bug 2173639

Comment 5 Fedora Update System 2023-02-27 21:03:23 UTC
FEDORA-2023-c3e82ef376 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-c3e82ef376

Comment 6 Fedora Update System 2023-02-27 21:19:30 UTC
FEDORA-2023-c3e82ef376 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.