Reading from data in load can lead to a data race due to a reordering with the check to determine whether the write position changed.
Expected result or behaviour:
No reordering happens.
Conditions where it occurred / Performed steps:
Data race in the CI. Hard to reproduce.
CI failure on aarch64
test spmc_unrestricted_atomic_load_store_works_concurrently ... FAILED
failures:
---- spmc_unrestricted_atomic_load_store_works_concurrently stdout ----
thread '<unnamed>' panicked at iceoryx2-bb/lock-free/tests/spmc_unrestricted_atomic_tests.rs:102:21:
assertion failed: expr: verify_no_data_race(&sut.load()) == true; value: false == true
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'spmc_unrestricted_atomic_load_store_works_concurrently' panicked at iceoryx2-bb/lock-free/tests/spmc_unrestricted_atomic_tests.rs:96:5:
a scoped thread panicked
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
failures:
spmc_unrestricted_atomic_load_store_works_concurrently
Required information
Operating system: all
Rust version: all
Cargo version: all
iceoryx2 version:
main
branchObserved result or behaviour:
Reading from
data
inload
can lead to a data race due to a reordering with the check to determine whether the write position changed.Expected result or behaviour:
No reordering happens.
Conditions where it occurred / Performed steps:
Data race in the CI. Hard to reproduce.
CI failure on aarch64