You need to sign in or sign up before continuing.
Another memory ordering issue in raiseAsync
While looking at #20093 (closed) I saw the following data race:
==================
WARNING: ThreadSanitizer: data race (pid=3725138)
Write of size 8 at 0x558000652c10 by thread T6:
#0 stg_upd_frame_info <null> (concprog001+0x7d19b6)
#1 scheduleWorker rts/Schedule.c:2668 (concprog001+0x791acf)
#2 workerStart rts/Task.c:445 (concprog001+0x799216)
#3 <null> <null> (libtsan.so.0+0x2e0b6)
Previous atomic write of size 8 at 0x558000652c10 by thread T5:
#0 __tsan_atomic64_store <null> (libtsan.so.0+0x67ffe)
#1 raiseAsync rts/RaiseAsync.c:879 (concprog001+0x7e6256)
#2 throwToMsg rts/RaiseAsync.c:417 (concprog001+0x7e6715)
#3 throwTo rts/RaiseAsync.c:213 (concprog001+0x7e6cc4)
#4 stg_killThreadzh <null> (concprog001+0x7ca3e5)
#5 scheduleWorker rts/Schedule.c:2668 (concprog001+0x791acf)
#6 workerStart rts/Task.c:445 (concprog001+0x799216)
#7 <null> <null> (libtsan.so.0+0x2e0b6)
Thread T6 (tid=3725148, running) created by thread T4 at:
#0 pthread_create <null> (libtsan.so.0+0x3055b)
#1 createOSThread rts/posix/OSThreads.c:166 (concprog001+0x7c82cf)
#2 startWorkerTask rts/Task.c:497 (concprog001+0x799c6a)
#3 releaseCapability_ rts/Capability.c:588 (concprog001+0x7806d7)
#4 suspendThread rts/Schedule.c:2502 (concprog001+0x791183)
#5 <null> <null> (concprog001+0x6e195a)
#6 scheduleWorker rts/Schedule.c:2668 (concprog001+0x791acf)
#7 workerStart rts/Task.c:445 (concprog001+0x799216)
#8 <null> <null> (libtsan.so.0+0x2e0b6)
Thread T5 (tid=3725147, running) created by thread T2 at:
#0 pthread_create <null> (libtsan.so.0+0x3055b)
#1 createOSThread rts/posix/OSThreads.c:166 (concprog001+0x7c82cf)
#2 startWorkerTask rts/Task.c:497 (concprog001+0x799c6a)
#3 releaseCapability_ rts/Capability.c:588 (concprog001+0x7806d7)
#4 suspendThread rts/Schedule.c:2502 (concprog001+0x791183)
#5 base_GHCziEventziEPoll_new10_info <null> (concprog001+0x6ceaef)
#6 scheduleWorker rts/Schedule.c:2668 (concprog001+0x791acf)
#7 workerStart rts/Task.c:445 (concprog001+0x799216)
#8 <null> <null> (libtsan.so.0+0x2e0b6)
SUMMARY: ThreadSanitizer: data race (/run/user/1000/ghctest-zx5jmx2r/test spaces/testsuite/tests/concurrent/prog001/concprog001.run/concprog001+0x7d19b6) in stg_upd_frame_info