Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/tsan-suppressions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Crossbeam speculatively reads queue slots before atomically validating the
# steal. Reads invalidated by concurrent writes are discarded without using or
# dropping the task. The non-atomic volatile accesses still violate Rust's
# memory model; this suppression accepts that known dependency limitation.
# https://github.com/crossbeam-rs/crossbeam/issues/589#issuecomment-720972996
# Match only the queue buffer accesses, rather than all Crossbeam operations.
race:crossbeam_deque::deque::Buffer*::read
race:crossbeam_deque::deque::Buffer*::write
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,4 @@ jobs:
run: cargo test -Zbuild-std --target x86_64-unknown-linux-gnu --workspace --all-targets --locked -- --skip queue_publication_cannot_leave_a_worker_asleep
env:
RUSTFLAGS: -Zsanitizer=${{ matrix.sanitizer }}
TSAN_OPTIONS: suppressions=${{ github.workspace }}/.github/tsan-suppressions.txt
9 changes: 9 additions & 0 deletions context/implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,12 @@ and Tokio-only feature combinations. The same TCP/file consumers exercise both
implementations; Linux tests cover cancellation batches and shutdown races.
CI covers Linux, macOS, Windows and FreeBSD, with separate Linux io_uring and
sanitizer jobs; distinguish configured CI from executed results.

ThreadSanitizer loads `.github/tsan-suppressions.txt` to suppress Crossbeam's
internal queue `Buffer::read` and `Buffer::write` race reports. Crossbeam reads
slots speculatively and discards values when atomic validation fails. Its
non-atomic volatile accesses remain a known Rust memory-model limitation;
the suppression accepts that limitation rather than fixing it. See the
[upstream discussion](https://github.com/crossbeam-rs/crossbeam/issues/589#issuecomment-720972996).
Keep suppression patterns scoped to those buffer accesses and reassess them
when updating Crossbeam. Other race reports continue to fail the sanitizer job.
Loading