Skip to content

Commit bab7798

Browse files
authored
Fix TSan data race with FFI tests (#7244)
Mute TSan data race in oneshot as it's a false positive Signed-off-by: Mikhail Kot <to@myrrc.dev>
1 parent 24736e1 commit bab7798

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ jobs:
404404
ASAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer"
405405
MSAN_OPTIONS: "symbolize=1"
406406
MSAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer"
407-
TSAN_OPTIONS: "symbolize=1"
407+
TSAN_OPTIONS: "symbolize=1:suppressions=${{ github.workspace }}/vortex-ffi/tsan_suppressions.txt"
408408
TSAN_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer"
409409
VORTEX_SKIP_SLOW_TESTS: "1"
410410
# -Cunsafe-allow-abi-mismatch=sanitizer: libraries like compiler_builtins

vortex-ffi/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ cargo +nightly test -Zbuild-std \
7676
ThreadSanitizer:
7777

7878
```sh
79+
TSAN_OPTIONS="suppressions=$HOME/vortex/vortex-ffi/tsan_suppressions.txt" \
7980
RUSTFLAGS="-Z sanitizer=thread -Cunsafe-allow-abi-mismatch=sanitizer" \
8081
cargo +nightly test -Zbuild-std \
8182
--no-default-features --target <target triple> \

vortex-ffi/tsan_suppressions.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: Copyright the Vortex contributors
3+
4+
# https://github.com/vortex-data/vortex/pull/7244
5+
# This is likely a false positive in TSan for oneshot::channel and kanal
6+
# where ordering is correct but uses an explicit fence and not relaxed load
7+
race:oneshot-*/src/channel.rs

0 commit comments

Comments
 (0)