ci: enable TSan deadlock detection

ThreadSanitizer can report lock-order inversions when its deadlock detector is enabled. Turn that option on for the existing Linux and macOS TSan CI lanes so observed pthread lock cycles fail the relevant sanitizer jobs.

This only changes existing TSan runtime options. Kafka remains disabled in the current TSan lanes; adding Kafka-specific TSan coverage is left for a separate change.
This commit is contained in:
Rainer Gerhards 2026-05-31 16:16:06 +02:00
parent 8c27842493
commit 0fe2e9d8f5
2 changed files with 3 additions and 3 deletions

View File

@ -614,7 +614,7 @@ jobs:
export CFLAGS="-g -fstack-protector -D_FORTIFY_SOURCE=2 -fsanitize=thread \
-O0 -fno-omit-frame-pointer -fno-color-diagnostics"
# note: we need pathes in container, thus /rsyslog vs. $(pwd) in TSAN_OPTIONS
export TSAN_OPTIONS="halt_on_error=1 suppressions=/rsyslog/tests/tsan-rt.supp"
export TSAN_OPTIONS="halt_on_error=1:detect_deadlocks=1:suppressions=/rsyslog/tests/tsan-rt.supp"
export ABORT_ALL_ON_TEST_FAIL='YES'
;;
'wolfssl')
@ -1042,7 +1042,7 @@ jobs:
elif [ "${{ matrix.sanitizer }}" = "tsan" ]; then
echo "Configuring ThreadSanitizer options"
export TSAN_OPTIONS=":halt_on_error=1:\
history_size=7:suppressions=$PWD/tests/tsan-rt.supp"
detect_deadlocks=1:history_size=7:suppressions=$PWD/tests/tsan-rt.supp"
else
echo "Running without sanitizers"
fi

View File

@ -109,7 +109,7 @@ jobs:
detect_stack_use_after_return=1:print_stacktrace=1"
elif [ "${{ matrix.sanitizer }}" = "tsan" ]; then
export TSAN_OPTIONS=":halt_on_error=1:\
history_size=7:suppressions=$PWD/tests/tsan-rt.supp"
detect_deadlocks=1:history_size=7:suppressions=$PWD/tests/tsan-rt.supp"
fi
set +e
make -j8 check