2

building QEMU with TSAN did not get any problem but it get FATAL during start up

ThreadSanitizer: can't find longjmp buf
FATAL: ThreadSanitizer CHECK failed: ../../../../src/libsanitizer/tsan/tsan_interceptors.cc:544 "((0)) != (0)" (0x0, 0x0)
    #0 <null> <null> (libtsan.so.0+0x891b4)
    #1 <null> <null> (libtsan.so.0+0xa74ae)
    #2 <null> <null> (libtsan.so.0+0x2b0b2)
    #3 siglongjmp <null> (libtsan.so.0+0x2cb64)
    #4 qemu_coroutine_switch util/coroutine-ucontext.c:221 (qemu-system-x86_64+0xc0bcbd)
    #5 qemu_aio_coroutine_enter util/qemu-coroutine.c:147 (qemu-system-x86_64+0xc089c7)
    #6 qemu_coroutine_enter util/qemu-coroutine.c:170 (qemu-system-x86_64+0xc08b5a)
...
    #23 main /root/qemu-4.2.0/vl.c:4436 (qemu-system-x86_64+0x5c92ec)
    #24 __libc_start_main <null> (libc.so.6+0x271e2)
    #25 _start <null> (qemu-system-x86_64+0x2c6b9d)

it looks like the known issue for TSAN, and --with-coroutine=gthread seems work in the past

but it was removed (https://patchwork.kernel.org/patch/9704545/)

i tried all ucontext and sigaltstack backend, but failed

my question is, does TSAN still work for current version ? (qemu 4.2.0)

wmliang
  • 21
  • 2

1 Answers1

2

There is work in progress to add TSan support to QEMU, and it is not in any release yet.

Our work in progress branch is here: https://github.com/rf972/qemu/tree/tsan_v0.

It is worth mentioning that our WIP branch contains several important patches that we picked up from Emilio Cota in this branch.

This patch seems related to your issue. It modifies the same area you referenced above and brings in the support for fiber annotations for coroutine-ucontext.