~/talk

"go test -race" Under the Hood

Talkat Strange Loop 2016 · 2016-09-16..09-17· [go, testing]
links:none on file
slides:none on file

The go race detector claims to find real data races by having the compiler insert calls around memory and sync operations and by delegating detection to ThreadSanitizer (tsan) which implements a happens-before check using vector clocks. Instrumentation adds race_read/race_write calls and the runtime keeps compact shadow state — only 4 shadow cells per 8-byte application word and scalar clocks — so reports have no false positives but can miss races on unobserved executions and impose significant runtime and memory overhead, so it’s mainly for tests and staging.

AI-written summary · about

  1. 0:00Intro
  2. 1:26data races
  3. 5:18race detectors
  4. 6:27go race detector
  5. 7:58concurrency in go
  6. 14:41vector clocks
  7. 20:00go run -race
  8. 25:24threadsanitizer
  9. 27:01shadow state
  10. 29:33race detection
  11. 32:55evaluation
  12. 36:31Optimization 1
  13. 38:17alternatives
~/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.