mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-06-15 08:17:05 +00:00
test: suppress libzmq-induced thread-sanitizer false positives
- libzmq is not tsan-instrumented, so tsan cannot see the happens-before its queues establish between user threads and libzmq I/O threads, producing false-positive data races on message buffers - add test/thread_sanitizer_suppressions.txt and point TSAN_OPTIONS at it via the sanitizers job env so it reaches the tests and their device subprocesses - suppress: accesses made directly from libzmq, the zero-copy message deleters libzmq runs from msg_t::close, shmem receive-side metadata reads, and std::regex/locale lazy-init races in libstdc++
This commit is contained in:
committed by
Dennis Klein
parent
4b2c6cafac
commit
a0e8271aca
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -68,6 +68,8 @@ jobs:
|
|||||||
if: github.repository == 'FairRootGroup/FairMQ'
|
if: github.repository == 'FairRootGroup/FairMQ'
|
||||||
name: ${{ matrix.sanitizer.name }}
|
name: ${{ matrix.sanitizer.name }}
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
env:
|
||||||
|
TSAN_OPTIONS: suppressions=${{ github.workspace }}/test/thread_sanitizer_suppressions.txt
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|||||||
32
test/thread_sanitizer_suppressions.txt
Normal file
32
test/thread_sanitizer_suppressions.txt
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# ThreadSanitizer suppressions for FairMQ.
|
||||||
|
#
|
||||||
|
# libzmq is not built with -fsanitize=thread, so tsan cannot observe the
|
||||||
|
# happens-before that its inproc/socket queues establish between the user
|
||||||
|
# threads and libzmq's I/O threads. This produces false-positive data races
|
||||||
|
# on message buffers handed across that boundary. The proper fix is to build
|
||||||
|
# libzmq with tsan as well; until then these races are suppressed.
|
||||||
|
|
||||||
|
# Racy access made directly from libzmq (encoder/decoder memcpy,
|
||||||
|
# signaler/epoll, recv).
|
||||||
|
called_from_lib:libzmq.so
|
||||||
|
|
||||||
|
# Zero-copy message deleters that libzmq runs from msg_t::close once it is
|
||||||
|
# done with a buffer; the happens-before with the buffer's producer runs
|
||||||
|
# through libzmq's queue.
|
||||||
|
race:zmq::msg_t::close
|
||||||
|
race:fair::mq::TransportFactory::SimpleMsgCleanup
|
||||||
|
|
||||||
|
# shmem message metadata read on the user side after delivery through libzmq
|
||||||
|
# (the shmem transport ships its metadata over a zeromq channel).
|
||||||
|
race:fair::mq::shmem::Message::Message
|
||||||
|
race:fair::mq::shmem::Socket::Receive
|
||||||
|
race:fair::mq::shmem::ShmHeader
|
||||||
|
|
||||||
|
# Multipart message buffers written by the sending thread and read back by the
|
||||||
|
# receiving thread after delivery through libzmq's inproc queue; the
|
||||||
|
# happens-before runs through that non-instrumented queue.
|
||||||
|
race:RunMultiThreadedMultipart
|
||||||
|
|
||||||
|
# std::regex / std::locale facet lazy-init races inside libstdc++.
|
||||||
|
race:fair::mq::Channel::Validate
|
||||||
|
race:fair::mq::tools::ToString
|
||||||
Reference in New Issue
Block a user