open-power-host-os / qemu

OpenPOWER Host OS qemu repository
Other
2 stars 3 forks source link

qemu crashes with bdrv_aligned_pwritev: Assertion `child->perm & BLK_PERM_WRITE' failed #21

Closed nasastry closed 6 years ago

nasastry commented 7 years ago
Mirrored with LTC bug https://bugzilla.linux.ibm.com/show_bug.cgi?id=160015 1. Get tests/qemu-iotests from the source tree of qemu configure, compile then 2. Point to the system supplied qemu binary export QEMU_PROG=/usr/bin/qemu-system-ppc64 3. Run test scenario from 195 \# cd qemu/tests/qemu-iotests \# ./check -qcow2 195 ``` 195 0s ... - output mismatch (see 195.out.bad) --- /home/nasastry/qemu/tests/qemu-iotests/195.out 2017-10-09 14:09:04.272726282 +0530 +++ /home/nasastry/qemu/tests/qemu-iotests/195.out.bad 2017-10-12 14:01:45.791109828 +0530 @@ -13,31 +13,16 @@ "return": { } } -{ - "return": { - } -} -{ - "return": { - } -} -{ - "timestamp": { - "seconds": TIMESTAMP, - "microseconds": TIMESTAMP - }, - "event": "SHUTDOWN", - "data": { - "guest": false - } -} +QEMU_PROG: block/io.c:1359: bdrv_aligned_pwritev: Assertion `child->perm & BLK_PERM_WRITE' failed. +./common.rc: Aborted ( if [ -n "${QEMU_NEED_PID}" ]; then + echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid"; +fi; exec "$QEMU_PROG" $QEMU_OPTIONS "$@" ) image: TEST_DIR/t.IMGFMT.mid file format: IMGFMT virtual size: 64M (67108864 bytes) cluster_size: 65536 -backing file: /dev/null -backing file format: IMGFMT +backing file: TEST_DIR/t.IMGFMT.base Change backing file of top (opened writable) ```
nasastry commented 7 years ago

from gdb

Core was generated by `/usr/bin/qemu-system-ppc64 -nodefaults -machine accel=qtest -nographic -qmp-pre'.
Program terminated with signal 6, Aborted.
#0  0x00007fffa27beff0 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install qemu-system-ppc-2.10.0-2.rel.gitc334a4e.el7.centos.ppc64le
(gdb) bt
#0  0x00007fffa27beff0 in raise () from /lib64/libc.so.6
#1  0x00007fffa27c136c in abort () from /lib64/libc.so.6
#2  0x00007fffa27b4c44 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007fffa27b4d34 in __assert_fail () from /lib64/libc.so.6
#4  0x0000000103c03acc in bdrv_aligned_pwritev.isra.10 ()
#5  0x0000000103c047cc in bdrv_co_pwritev ()
#6  0x0000000103c04f00 in bdrv_rw_co_entry ()
#7  0x0000000103ccb958 in coroutine_trampoline ()
#8  0x00007fffa27d2b9c in makecontext () from /lib64/libc.so.6
#9  0x0000000000000000 in ?? ()
cdeadmin commented 6 years ago

------- Comment From alexey@au1.ibm.com 2017-10-25 04:01:24 EDT------- Fixed in upstream: https://git.qemu.org/?p=qemu.git;a=commit;h=3045025991eb

cdeadmin commented 6 years ago

------- Comment From jamesspo@us.ibm.com 2017-11-15 15:19:51 EDT------- (In reply to comment #5) > Fixed in upstream: https://git.qemu.org/?p=qemu.git;a=commit;h=3045025991eb

Thanks Alexey. We'll just wait for 2.11 to get this in HostOS.

cdeadmin commented 6 years ago

------- Comment From bssrikanth@in.ibm.com 2017-12-20 02:26:52 EDT------- This is verified on release branch.

[root@ltczzj3 qemu-iotests]# ./check -qcow2 195 QEMU -- "/usr/bin/qemu-system-ppc64" -nodefaults -machine accel=qtest QEMU_IMG -- "/home/srikanth/qemu/build/qemu-img" QEMU_IO -- "/home/srikanth/qemu/build/qemu-io" --cache writeback -f qcow2 QEMU_NBD -- "/home/srikanth/qemu/build/qemu-nbd" IMGFMT -- qcow2 (compat=1.1) IMGPROTO -- file PLATFORM -- Linux/ppc64le ltczzj3 4.14.0-1.rel.git68b4afb.el7.centos.ppc64le TEST_DIR -- /home/srikanth/qemu/build/tests/qemu-iotests/scratch SOCKET_SCM_HELPER -- /home/srikanth/qemu/build/tests/qemu-iotests/socket_scm_helper

195
Passed all 1 tests [root@ltczzj3 qemu-iotests]# uname -r 4.14.0-1.rel.git68b4afb.el7.centos.ppc64le