Bug 1678979
Summary: | qemu-img convert abort when converting image with unaligned size (qemu-img: block/io.c:2134: bdrv_co_block_status: Assertion `*pnum && (((*pnum) % (align)) == 0) && align > offset - aligned_offset\' failed) | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Tingting Mao <timao> |
Component: | qemu-kvm | Assignee: | Hanna Czenczek <hreitz> |
Status: | CLOSED ERRATA | QA Contact: | Tingting Mao <timao> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 8.1 | CC: | aefrat, areis, bugs, chayang, coli, ddepaula, ebenahar, eblake, eshames, jferlan, jsnow, juzhang, knoel, mtessun, nsoffer, rbalakri, timao, tnisan, virt-maint |
Target Milestone: | rc | Keywords: | Regression, Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-2.12.0-83.module+el8.1.0+3852+0ba8aef0 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1649788 | Environment: | |
Last Closed: | 2019-11-05 20:47:34 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: |
Description
Tingting Mao
2019-02-20 03:29:08 UTC
Simpler reproducer and further details are here: https://bugzilla.redhat.com/show_bug.cgi?id=1649788#c31 Upstream qemu 4.0 has patches to avoid the problem: https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg00136.html (In reply to Eric Blake from comment #4) > Upstream qemu 4.0 has patches to avoid the problem: > https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg00136.html Pick up fix via rebase. Reproduced this bug as below: Test with: Local file system - XFS qemu-kvm-3.1.0-20.module+el8+2904+e658c755 kernel-4.18.0-80.el8 Steps: # truncate -s 11136 test.img # qemu-io -c 'write -P 1 0 10K' test.img -f raw wrote 10240/10240 bytes at offset 0 10 KiB, 1 ops; 0.0313 sec (318.725 KiB/sec and 31.8725 ops/sec) # qemu-img info test.img image: test.img file format: raw virtual size: 11K (11264 bytes) disk size: 12K # df -T test.img Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/mapper/rhel_ibm--x3250m6--11-home xfs 913432768 22272620 891160148 3% /home # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc qemu-img: block/io.c:2158: bdrv_co_block_status: Assertion `*pnum && QEMU_IS_ALIGNED(*pnum, align) && align > offset - aligned_offset' failed. Aborted (core dumped) Tried to verify this bug as below, but still hit the bug. So will assign back, please check. Thanks. Tested with: qemu-kvm-4.0.0-3.module+el8.1.0+3265+26c4ed71 kernel-4.18.0-95.el8 Steps: # truncate -s 11136 test.img # qemu-io -c 'write -P 1 0 10K' test.img -f raw # qemu-img info test.img image: test.img file format: raw virtual size: 11K (11264 bytes) disk size: 12K # df -T test.img Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/mapper/rhel_lenovo--sr630--02-home xfs 514894144 3625496 511268648 1% /home # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc qemu-img: block/io.c:2123: bdrv_co_block_status: Assertion `*pnum && QEMU_IS_ALIGNED(*pnum, align) && align > offset - aligned_offset' failed. Aborted (core dumped) This I believe is (will be) fixed by bz 1588356 which it seems will be resolved using upstream commit: https://git.qemu.org/?p=qemu.git;a=commit;h=9c3db310ff0b7473272ae8dce5e04e2f8a825390 (In reply to John Ferlan from comment #10) > This I believe is (will be) fixed by bz 1588356 which it seems will be > resolved using upstream commit: > > https://git.qemu.org/?p=qemu.git;a=commit; > h=9c3db310ff0b7473272ae8dce5e04e2f8a825390 Correct; there have been two batches of patches related to the same assertion in bdrv_co_block_status. One batch related to the NBD drive (the patches mentioned in comment 4) in qemu 4.0; the other batch related to O_DIRECT (triggered by -T none; the patch mentioned in comment 10) in qemu 4.1. Still hit this issue in 8.1 slow train. Reopen this bug in rhel8.1 slow train. Please adjust if needed. Thanks. Tested with: qemu-kvm-2.12.0-81.module+el8.1.0+3619+dfe1ae01 kernel-4.18.0-112.el8 Steps: # truncate -s 11136 test.img # qemu-io -c 'write -P 1 0 10K' test.img -f raw # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc qemu-img: block/io.c:2134: bdrv_co_block_status: Assertion `*pnum && QEMU_IS_ALIGNED(*pnum, align) && align > offset - aligned_offset' failed. Aborted (core dumped) (gdb) bt #0 0x00007f5252f3e8af in raise () from /lib64/libc.so.6 #1 0x00007f5252f28cc5 in abort () from /lib64/libc.so.6 #2 0x00007f5252f28b99 in __assert_fail_base.cold.0 () from /lib64/libc.so.6 #3 0x00007f5252f36e66 in __assert_fail () from /lib64/libc.so.6 #4 0x00005583315c9292 in bdrv_co_block_status (bs=0x558333031c90, want_zero=want_zero@entry=true, offset=0, bytes=11264, pnum=pnum@entry=0x7ffe10791ea0, map=map@entry=0x7f52510a5ef0, file=0x7f52510a5ef8) at block/io.c:2133 #5 0x00005583315c9053 in bdrv_co_block_status (bs=bs@entry=0x55833302b740, want_zero=want_zero@entry=true, offset=offset@entry=0, bytes=bytes@entry=11264, pnum=pnum@entry=0x7ffe10791ea0, map=map@entry=0x0, file=0x0) at block/io.c:2145 #6 0x00005583315c937b in bdrv_co_block_status_above (file=0x0, map=0x0, pnum=0x7ffe10791ea0, bytes=11264, offset=0, want_zero=<optimized out>, base=0x0, bs=<optimized out>) at block/io.c:2223 #7 bdrv_block_status_above_co_entry (opaque=0x7ffe10791df0) at block/io.c:2253 #8 0x000055833163ea03 in coroutine_trampoline (i0=<optimized out>, i1=<optimized out>) at util/coroutine-ucontext.c:116 #9 0x00007f5252f54480 in ?? () from /lib64/libc.so.6 #10 0x00007ffe10791620 in ?? () #11 0x0000000000000000 in ?? () Verified this bug as below: Tested with: qemu-kvm-2.12.0-83.module+el8.1.0+3852+0ba8aef0 kernel-4.18.0-119.el8.x86_64 Steps: # truncate -s 11136 test.img # qemu-io -c 'write -P 1 0 10K' test.img -f raw # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc (100.00/100%) 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://access.redhat.com/errata/RHSA-2019:3345 |