~/talk

Go Plays Nice With Your Computer - Race Detection and Freedom!

Talkat GopherCon 2025 · 2025-08-26..08-28· [go]
slides:none on file

Go guarantees data-race-free sequential consistency but races still happen, so the race detector instruments every memory access and uses vector clocks to detect unordered conflicting writes. Upgrading TSAN v2 to TSAN v3 removes the ~8,000 goroutine limit (tests spin up 10,000 goroutines), cuts race-check overhead about sixfold in a microbenchmark, and replaces a 60%-time spinlock with a lock-free compare-exchange path (runtime CPU share drops from ~98% to ~53%). Race detector still runs at runtime and can miss multiword-structure races.

AI-written summary · about

  1. 0:00Go and memory models
  2. 2:10Weak vs strong hardware models
  3. 4:43Go memory model guarantees
  4. 7:13Why data races break reasoning
  5. 8:18Happens-before in concurrency
  6. 10:46Vector clocks analogy
  7. 13:39Vector clocks detect events
  8. 16:31Go 1.19 race detector
  9. 17:36Demo goroutine limit test
  10. 19:45Benchmarking overhead
  11. 21:12TSAN v2 vs v3 profiling
  12. 24:25Race detection limits
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.