Hide Forgot
Description of problem: # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc qemu-img: block/io.c:1871: bdrv_co_write_req_prepare: Assertion `end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE' failed. Aborted (core dumped) Version-Release number of selected component (if applicable): kernel-4.18.0-194.el8.x86_64 qemu-kvm-4.2.0-19.module+el8.3.0+6478+69f490bb qemu-img-4.2.0-19.module+el8.3.0+6478+69f490bb How reproducible: 100% Steps to Reproduce: 1. # mount -t nfs -o soft,vers=4.2 10.66.61.132:/home/nfs_server/ /home/kvm_autotest_root/images/ 2. # cd /home/kvm_autotest_root/images/ 3. # truncate -s 11136 test.img 4. # qemu-io -c 'write -P 1 0 10K' test.img -f raw 5. # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc Actual results: after step5: # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc qemu-img: block/io.c:1871: bdrv_co_write_req_prepare: Assertion `end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE' failed. Aborted (core dumped) Expected results: # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc (100.00/100%) Additional info: It works well on rhel8.1.0 slow train and rhel8.1.0 fast train. It doesn't work on rhel.2.0 slow train and rhel8.2.0 fast train. Details: 1. according to https://bugzilla.redhat.com/show_bug.cgi?id=1678979#c19, it had been fixed on rhel8.1.0 slow train. Tested with qemu-kvm-2.12.0-83.module+el8.1.0+3852+0ba8aef0, it works well. # 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.0346 sec (288.218 KiB/sec and 28.8218 ops/sec) # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc (100.00/100%) 2. according to https://bugzilla.redhat.com/show_bug.cgi?id=1588356#c16, it had been fixed on rhel8.1.0 fast train. Tested with qemu-kvm-4.0.0-5.module+el8.1.0+3622+5812d9bf, it works well. # 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.0278 sec (359.557 KiB/sec and 35.9557 ops/sec) # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc (100.00/100%) 3. Tested on rhel8.2.0 slow train, it doesn't work. Tested with qemu-kvm-2.12.0-99.module+el8.2.0+5827+8c39933c, qemu core dumped. # 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.0453 sec (220.386 KiB/sec and 22.0386 ops/sec) # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc qemu-img: block/io.c:1646: bdrv_aligned_pwritev: Assertion `end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE' failed. Aborted (core dumped) 4. Tested on rhel8.2.0 fast train, it doesn't work. Tested with qemu-kvm-4.2.0-19.module+el8.2.0+6296+6b821950, qemu core dumped # 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; 00.04 sec (236.864 KiB/sec and 23.6864 ops/sec) # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc qemu-img: block/io.c:1871: bdrv_co_write_req_prepare: Assertion `end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE' failed. Aborted (core dumped)
core dumped log: http://fileshare.englab.nay.redhat.com/pub/section2/images_backup/bug1834281/gdb.txt core dumped file: http://fileshare.englab.nay.redhat.com/pub/section2/images_backup/bug1834281/core.qemu-img.0.5b438c5e682d41f9ab1da8d09025a9eb.135324.1589199068000000.lz4
Adjusting dependency order - fix goes into RHEL AV first, then RHEL.
Assigned to Ademar for initial triage per bz process and age of bug created or assigned to virt-maint without triage. Not sure if this would be Kevin or Max. If bug 1834646 makes it into RHEL AV 8.2.1, then this bug would pick up change when rebase occurs
Tested it on rhel8.4 slow train, hit this issue. Versions: kernel-4.18.0-277.el8.x86_64 qemu-kvm-4.2.0-41.module+el8.4.0+9504+ab2393e6 steps: 1. # mkdir -p /home/kvm_autotest_root/images/ # mount -t nfs -o soft,vers=4.2 10.66.61.132:/home/nfs_server/ /home/kvm_autotest_root/images/ 2. # cd /home/kvm_autotest_root/images/ 3. # truncate -s 11136 test.img 4. # qemu-io -c 'write -P 1 0 10K' test.img -f raw wrote 10240/10240 bytes at offset 0 10 KiB, 1 ops; 00.04 sec (247.197 KiB/sec and 24.7197 ops/sec) 5. # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc qemu-img: block/io.c:1871: bdrv_co_write_req_prepare: Assertion `end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE' failed. Aborted (core dumped)
Tested it with qemu-kvm-4.2.0-44.module+el8.4.0+9776+c5744f20, not hit this issue. Versions: kernel-4.18.0-280.el8.x86_64 qemu-kvm-4.2.0-44.module+el8.4.0+9776+c5744f20 steps: 1. # mkdir -p /home/kvm_autotest_root/images/ # mount -t nfs -o soft,vers=4.2 10.66.61.132:/home/nfs_server/ /home/kvm_autotest_root/images/ 2. # cd /home/kvm_autotest_root/images/ 3. # truncate -s 11136 test.img 4. # qemu-io -c 'write -P 1 0 10K' test.img -f raw wrote 10240/10240 bytes at offset 0 10 KiB, 1 ops; 00.03 sec (293.422 KiB/sec and 29.3422 ops/sec) 5. # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=falloc (100.00/100%) # echo $? 0 # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=full (100.00/100%) # echo $? 0 # qemu-img convert -f raw -O raw -p -t none -T none test.img tgt.img -o preallocation=off (100.00/100%) # echo $? 0
Hi Danilo, Shall we add this bug to errata and change it to ON_QA status? Thanks.
According to Comment 15, set status to VERIFIED. Thanks.
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 (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), 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-2021:1762