Hi all, I've got a codebase using coroutines on th...
# coroutines
a
Hi all, I've got a codebase using coroutines on the JVM (it's a CLI tool), and it got flagged by TSAN (https://wiki.openjdk.java.net/display/tsan/Main) as having a read-after-write race. The code isn't flaky, and it has decent fuzz tests, and TSAN flags the race in
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.trySteal()Lkotlinx/coroutines/scheduling/Task
every time, which leads me to believe there's either a race in the coroutines library that's not affecting my code, or TSAN is unaware of some invariants in coroutines. Does anyone else have experience with TSAN and Kotlin Coroutines? Any idea if this is a bug or a config issue? I'm happy to share the trace if that'd help.
v
Please share the trace (wild guess: it’s line 983 🙂)
a
Not so bad!
106 lines. DM'd you