qemu-io-test 147 segfaults when configured with gcov
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Murilo Opsfelder Araújo |
Bug Description
Head is at 3d7196d43bfe12e
Steps to re-produce:
1. git clone
./configure --enable-gcov --target-
make
cd tests/qemu-iotests
2. export qemu binary, in my environment
export QEMU_PROG=
3. Run test 147 with format qcow2
./check -qcow2 147
QEMU -- "/home/
QEMU_IMG -- "/home/
QEMU_IO -- "/home/
QEMU_NBD -- "/home/
IMGFMT -- qcow2 (compat=1.1)
IMGPROTO -- file
PLATFORM -- Linux/ppc64le zzfp365-lp1 4.13.0-
TEST_DIR -- /home/nasastry/
SOCKET_SCM_HELPER -- /home/nasastry/
147 0s ... [failed, exit status 1] - output mismatch (see 147.out.bad)
--- /home/nasastry/
+++ /home/nasastry/
@@ -1,5 +1,95 @@
-......
+WARNING:qemu:qemu received signal -11: /home/nasastry/
+WARNING:qemu:qemu received signal -11: /home/nasastry/
+WARNING:qemu:qemu received signal -11: /home/nasastry/
+WARNING:qemu:qemu received signal -11: /home/nasastry/
+WARNING:qemu:qemu received signal -11: /home/nasastry/
+WARNING:qemu:qemu received signal -11: /home/nasastry/
+FFFFFF
+======
+FAIL: test_fd (__main_
+------
+Traceback (most recent call last):
+ File "147", line 203, in test_fd
+ self.client_
+ File "147", line 55, in client_test
+ self.assert_
+ File "/home/
+ result = self.dictpath(d, path)
+ File "/home/
+ self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "None"
+
+======
+FAIL: test_inet (__main_
+------
+Traceback (most recent call last):
+ File "147", line 146, in test_inet
+ flatten_
+ File "147", line 55, in client_test
+ self.assert_
+ File "/home/
+ result = self.dictpath(d, path)
+ File "/home/
+ self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "None"
+
+======
+FAIL: test_inet6 (__main_
+------
+Traceback (most recent call last):
+ File "147", line 171, in test_inet6
+ self.client_
+ File "147", line 55, in client_test
+ self.assert_
+ File "/home/
+ result = self.dictpath(d, path)
+ File "/home/
+ self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "None"
+
+======
+FAIL: test_unix (__main_
+------
+Traceback (most recent call last):
+ File "147", line 179, in test_unix
+ flatten_
+ File "147", line 55, in client_test
+ self.assert_
+ File "/home/
+ result = self.dictpath(d, path)
+ File "/home/
+ self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "None"
+
+======
+FAIL: test_inet (__main__.QemuNBD)
+------
+Traceback (most recent call last):
+ File "147", line 96, in test_inet
+ flatten_
+ File "147", line 55, in client_test
+ self.assert_
+ File "/home/
+ result = self.dictpath(d, path)
+ File "/home/
+ self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "None"
+
+======
+FAIL: test_unix (__main__.QemuNBD)
+------
+Traceback (most recent call last):
+ File "147", line 103, in test_unix
+ flatten_
+ File "147", line 55, in client_test
+ self.assert_
+ File "/home/
+ result = self.dictpath(d, path)
+ File "/home/
+ self.fail('failed path traversal for "%s" in "%s"' % (path, str(d)))
+AssertionError: failed path traversal for "return" in "None"
+
------
Ran 6 tests
-OK
+FAILED (failures=6)
Failures: 147
Failed 1 of 1 tests
With out gcov configured, the above test get pass.
export QEMU_PROG=
./check -qcow2 147
QEMU -- "/home/
QEMU_IMG -- "/home/
QEMU_IO -- "/home/
QEMU_NBD -- "/home/
IMGFMT -- qcow2 (compat=1.1)
IMGPROTO -- file
PLATFORM -- Linux/ppc64le zzfp365-lp1 4.13.0-
TEST_DIR -- /home/nasastry/
SOCKET_SCM_HELPER -- /home/nasastry/
147
Passed all 1 tests
Changed in qemu: | |
status: | Fix Committed → Fix Released |
from dmesg: ppc[28640] : unhandled signal 11 at 0000000000000004 nip 00007fff9f82f7d4 lr 0000000010e182fc code 30001 ppc[28651] : unhandled signal 11 at 0000000000000004 nip 00007fffbd94f7d4 lr 0000000010e182fc code 30001 ppc[28660] : unhandled signal 11 at 0000000000000004 nip 00007fff8c1ff7d4 lr 0000000010e182fc code 30001 ppc[28669] : unhandled signal 11 at 0000000000000004 nip 00007fffa6f1f7d4 lr 0000000010e182fc code 30001 ppc[28678] : unhandled signal 11 at 0000000000000004 nip 00007fffb9abf7d4 lr 0000000010e182fc code 30001 ppc[28687] : unhandled signal 11 at 0000000000000004 nip 00007fff8dccf7d4 lr 0000000010e182fc code 30001
[81791.481930] qemu-system-
[81791.649081] qemu-system-
[81791.817591] qemu-system-
[81791.994442] qemu-system-
[81792.121339] qemu-system-
[81792.205728] qemu-system-
from gdb: option. c:166 absorb_ qdict (opts=0x3e25b1c0, qdict=0x3e0bbd40, errp=0x7fffd055 c678) at util/qemu- option. c:1026 c760) at block/nbd.c:406 c930) at block.c:1135 c930) at block.c:1395 0x11004bd8 <child_file>, errp=0x7fffd055 cb30) at block.c:2615 0x11005870 "file", parent=0x3dfc4be0, child_role= 0x11004bd8 <child_file>, allow_none=true, errp=0x7fffd055 cb30) at block.c:2314 cd48) at block.c:2566 cd48) at block.c:2697 0x3e261380, errp=0x7fffd055 cd48) at blockdev.c:652 0x7fffd055cd58, errp=0x7fffd055 cd48) at blockdev.c:3920 blockdev_ add (args=0x3e25e320, ret=0x7fffd055cec0, errp=0x7fffd055 ceb8) at qmp-marshal.c:616 cf30) at qapi/qmp- dispatch. c:104 dispatch. c:131 qemu/monitor. c:3854 process_ token (lexer=0x3dfd3358, input=0x3dfbdc80, type=JSON_RCURLY, x=273, y=0) at qobject/ json-streamer. c:105
(gdb) bt
#0 0x00007fffa4a3f7d4 in __strcmp_power9 () from /lib64/libc.so.6
#1 0x0000000010e182fc in find_desc_by_name (desc=0x11304690, name=0x3dfce1b0 "server.str") at util/qemu-
#2 0x0000000010e1d814 in qemu_opts_
#3 0x0000000010c5b2d0 in nbd_open (bs=0x3dfcaee0, options=0x3e0bbd40, flags=24578, errp=0x7fffd055
#4 0x0000000010b454d4 in bdrv_open_driver (bs=0x3dfcaee0, drv=0x11305010 <bdrv_nbd_unix>, node_name=0x0, options=0x3e0bbd40, open_flags=24578, errp=0x7fffd055
#5 0x0000000010b46af0 in bdrv_open_common (bs=0x3dfcaee0, file=0x0, options=0x3e0bbd40, errp=0x7fffd055
#6 0x0000000010b4ced4 in bdrv_open_inherit (filename=0x0, reference=0x0, options=0x3e0bbd40, flags=40962, parent=0x3dfc4be0, child_role=
#7 0x0000000010b4b60c in bdrv_open_child_bs (filename=0x0, options=0x3dfc8ea0, bdref_key=
#8 0x0000000010b4c9ac in bdrv_open_inherit (filename=0x0, reference=0x0, options=0x3dfc8ea0, flags=8194, parent=0x0, child_role=0x0, errp=0x7fffd055
#9 0x0000000010b4d6f8 in bdrv_open (filename=0x0, reference=0x0, options=0x3e261380, flags=0, errp=0x7fffd055
#10 0x00000000105a4684 in bds_tree_init (bs_opts=
#11 0x00000000105b5c9c in qmp_blockdev_add (options=
#12 0x00000000105eea88 in qmp_marshal_
#13 0x0000000010db4de0 in do_qmp_dispatch (cmds=0x1136b198 <qmp_commands>, request=0x3e25d300, errp=0x7fffd055
#14 0x0000000010db518c in qmp_dispatch (cmds=0x1136b198 <qmp_commands>, request=0x3e25d300) at qapi/qmp-
#15 0x00000000100c9470 in handle_qmp_command (parser=0x3dfd3350, tokens=0x3dfbef40) at /home/nasastry/
#16 0x0000000010dc8bcc in json_message_
#17 0x0000000010e3dc98 in json_lexer_f...