qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tests/check-block: Skip iotests when sanitizers


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH] tests/check-block: Skip iotests when sanitizers are enabled
Date: Fri, 23 Aug 2019 11:35:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 8/23/19 11:04 AM, Peter Maydell wrote:
> On Fri, 23 Aug 2019 at 09:43, Thomas Huth <address@hidden> wrote:
>>
>> The sanitizers (especially the address sanitizer from Clang) are
>> sometimes printing out warnings or false positives - this spoils
>> the output of the iotests, causing some of the tests to fail.
>> Thus let's skip the automatic iotests during "make check" when the
>> user configured QEMU with --enable-sanitizers.
> 
> Do you have a log of what the sanitizer is saying?

https://patchew.org/logs/QEMU/testing.asan/?type=project

Example:

+Indirect leak of 4120 byte(s) in 1 object(s) allocated from:
+    #0 0x562a2ffc3c4e in calloc
(TEST_DIR/build/x86_64-softmmu/qemu-system-x86_64+0x1a16c4e)
+    #1 0x7fca6acf3cf0 in g_malloc0 (/lib64/libglib-2.0.so.0+0x55cf0)
+    #2 0x562a3200c3d0 in bdrv_refresh_filename TEST_DIR/src/block.c:6416:12
+    #3 0x562a3200b8f7 in bdrv_refresh_filename TEST_DIR/src/block.c:6388:9
+    #4 0x562a3200b8f7 in bdrv_refresh_filename TEST_DIR/src/block.c:6388:9
+    #5 0x562a31ffa461 in bdrv_backing_attach TEST_DIR/src/block.c:1064:5
+    #6 0x562a320212c6 in bdrv_replace_child_noperm
TEST_DIR/src/block.c:2283:13
+    #7 0x562a3201ed50 in bdrv_replace_node TEST_DIR/src/block.c:4210:9
+    #8 0x562a32021649 in bdrv_append TEST_DIR/src/block.c:4250:5
+    #9 0x562a3234e573 in commit_start TEST_DIR/src/block/commit.c:307:5
+    #10 0x562a30cc6cce in qmp_block_commit TEST_DIR/src/blockdev.c:3480:9
+    #11 0x562a31dceb33 in qmp_marshal_block_commit
TEST_DIR/build/qapi/qapi-commands-block-core.c:407:5
+    #12 0x562a3260be28 in do_qmp_dispatch
TEST_DIR/src/qapi/qmp-dispatch.c:131:5
+    #13 0x562a3260b105 in qmp_dispatch
TEST_DIR/src/qapi/qmp-dispatch.c:174:11
+    #14 0x562a31cd1b15 in monitor_qmp_dispatch
TEST_DIR/src/monitor/qmp.c:120:11
+    #15 0x562a31ccfd45 in monitor_qmp_bh_dispatcher
TEST_DIR/src/monitor/qmp.c:209:9
+    #16 0x562a327a91ea in aio_bh_call TEST_DIR/src/util/async.c:89:5
+    #17 0x562a327a9902 in aio_bh_poll TEST_DIR/src/util/async.c:117:13
+    #18 0x562a327cb590 in aio_dispatch TEST_DIR/src/util/aio-posix.c:459:5
+    #19 0x562a327ae933 in aio_ctx_dispatch TEST_DIR/src/util/async.c:260:5
+    #20 0x7fca6acededc in g_main_context_dispatch
(/lib64/libglib-2.0.so.0+0x4fedc)

Since there are also lots of these warnings in the output:

+==24683==WARNING: ASan doesn't fully support makecontext/swapcontext
functions and may produce false positives in some cases!

... I'm really not sure whether it makes sense to go bug hunting here.

> (There are quite a lot of sanitizer warnings on running
> the main build too -- at the moment we don't have anything
> in the CI that runs the sanitizers, except that patchew
> does for a limited (x86-targets-only) config, to defend
> the parts that we've managed to make warning-free. But
> I think that the warnings I've looked at are mostly for
> real-but-unimportant leaks, rather than false positives.)

OK. Anyway, since there are also these "WARNING: ASan doesn't fully
support ..." messages in the output, it simply does not make sense to
run the iotests automatically in this case, since the output of the
tests gets spoiled and thus the tests are failing.

 Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]