You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TSan data race in mimalloc metadata allocator during BLS worker thread execution #7558
A ThreadSanitizer data race occurred during CI run 31211790533 (job 92978916567) in test_dash (bls_tests / bls_verify_contribution_shares_honest_tests).
Stack Trace
WARNING: ThreadSanitizer: data race (pid=52099)
Write of size 8 at 0xff6fa7424400 by thread T7:
#0 memcpy
#1 _mi_heap_init (test_dash+0x1e79fa0)
#2 operator() src/bls/bls_worker.cpp:103:37
Previous write of size 8 at 0xff6fa7424400 by thread T5:
#0 memset
#1 _mi_meta_zalloc (test_dash+0x1ebf378)
#2 operator() src/bls/bls_worker.cpp:91:41
Description
In src/dashbls/depends/mimalloc/src/arena-meta.c, _mi_meta_zalloc and _mi_meta_free use non-atomic _mi_memzero_aligned (memset) to zero out metadata blocks (mi_heap_t). When a block is freed or allocated by thread T5, it updates the atomic free bitmap blocks_free. Thread T7 immediately claims that metadata block via atomic operations and begins calling _mi_heap_init (memcpy) on the same memory address.
Because non-atomic memset in T5 and non-atomic memcpy in T7 target the exact same address across thread boundaries without TSan acquire-release synchronization annotations in mimalloc's custom metadata allocator, ThreadSanitizer reports a data race.
Activity
Merge dashpay#7559: test: suppress TSan data race in mimalloc metadat…
build: compile the dashbls sources added by the subtree update
build: compile the dashbls sources added by the subtree update