-
Notifications
You must be signed in to change notification settings - Fork 148
Open
Description
ThreadSanitizer reports a data race on AsyncEventsControl::exit between the async-events polling thread and the main thread during hsa_shut_down() teardown. It is observed during a TSAN-enabled build.
WARNING: ThreadSanitizer: data race (pid=1841796)
Read of size 1 at 0x725400001648 by thread T257:
#0 rocr::core::Runtime::AsyncEventsLoop(void*) runtime.cpp:1812
Previous write of size 1 at 0x725400001648 by main thread (mutexes: write M0):
#0 rocr::core::Runtime::AsyncEventsControl::Shutdown() runtime.cpp:2840
...
#6 rocr::core::Runtime::Unload() runtime.cpp:2469
#7 rocr::core::Runtime::Release() runtime.cpp:167
#8 rocr::HSA::hsa_shut_down() hsa.cpp:213
SUMMARY: ThreadSanitizer: data race runtime.cpp:1812 in
rocr::core::Runtime::AsyncEventsLoop(void*)The exit field is a plain bool that is written by the main thread in Shutdown() and read concurrently by the event-loop thread in AsyncEventsLoop() without synchronization. Per the C++ memory model this is undefined behavior.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels