[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 14/19] util/async: Fixed tsan warnings
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH 14/19] util/async: Fixed tsan warnings |
Date: |
Tue, 26 May 2020 11:32:18 +0100 |
On Fri, May 22, 2020 at 12:07:50PM -0400, Robert Foley wrote:
> For example:
> Atomic write of size 8 at 0x7b4800113c28 by main thread (mutexes: write
> M30):
> #0 __tsan_atomic64_exchange <null> (qemu-system-aarch64+0x386f85)
> #1 aio_bh_poll util/async.c:146:5 (qemu-system-aarch64+0xcd1f61)
> #2 aio_dispatch util/aio-posix.c:380:5 (qemu-system-aarch64+0xcd8abb)
> #3 aio_ctx_dispatch util/async.c:298:5 (qemu-system-aarch64+0xcd31b0)
> #4 g_main_context_dispatch <null> (libglib-2.0.so.0+0x4c416)
> #5 qemu_main_loop softmmu/vl.c:1664:9 (qemu-system-aarch64+0x5cc6d6)
> #6 main softmmu/main.c:49:5 (qemu-system-aarch64+0xc62857)
>
> Previous read of size 8 at 0x7b4800113c28 by thread T3 (mutexes: write M81):
> #0 aio_bh_enqueue util/async.c:81:9 (qemu-system-aarch64+0xcd2267)
> #1 qemu_bh_schedule util/async.c:181:5 (qemu-system-aarch64+0xcd2267)
> #2 worker_thread util/thread-pool.c:113:9 (qemu-system-aarch64+0xcd473c)
> #3 qemu_thread_start util/qemu-thread-posix.c:519:9
> (qemu-system-aarch64+0xcde280)
>
> Cc: Stefan Hajnoczi <address@hidden>
> Cc: Fam Zheng <address@hidden>
> Signed-off-by: Robert Foley <address@hidden>
> ---
> util/async.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
Please explain why these warnings should be ignored in the commit
description. I have been CCed on this patch, am unfamiliar with TSAN
annotations, and now need to figure out:
1. Is ignoring the warning safe or should async.c be fixed somehow?
2. How do the annotation macros work and are they being used correectly?
It's likely that people coming across this commit in the future would
also benefit from information in the commit description that makes these
things clear.
Thanks,
Stefan
signature.asc
Description: PGP signature
- Re: [PATCH 12/19] configure: added tsan support for blacklist., (continued)
- [PATCH 13/19] accel/tcg: Fixed tsan warnings., Robert Foley, 2020/05/22
- [PATCH 05/19] qht: call qemu_spin_destroy for head buckets, Robert Foley, 2020/05/22
- [PATCH 14/19] util/async: Fixed tsan warnings, Robert Foley, 2020/05/22
- [PATCH 15/19] qht: Fix tsan warnings., Robert Foley, 2020/05/22
- [PATCH 16/19] util: fixed tsan warnings in thread_pool.c, Robert Foley, 2020/05/22
- [PATCH 17/19] util: Added tsan annotate for thread name., Robert Foley, 2020/05/22
- [PATCH 18/19] target/arm: Fix tsan warning in cpu.c, Robert Foley, 2020/05/22