Data race detection
summary
Explains concrete data-race detection for Go via the -race flag that compiles with ThreadSanitizer (LLVM) instrumentation, claiming no false positives but possible false negatives. Shows it finds real bugs (Chrome, Go) while costing ~2–20x runtime and ~5–10x memory and requiring 64-bit. Describes algorithms: vector-clock happens‑before, FastTrack optimization that stores a single writer, and a probabilistic shadow-table using 8-byte shadow words with a 4-entry per-chunk cache that evicts old records, improving speed at the cost of missed races in rare cases.
AI-written summary · about
chapters (11)
- 0:00Introduction and background
- 1:06What is a data race
- 3:18Real-world consequences
- 5:27Common mistakes in code
- 7:36Data race detection in Go
- 9:46How the algorithm works
- 13:47DDT+ algorithm details
- 16:21FastTrack improvement
- 17:45ThreadSanitizer overview
- 20:15Limitations and summary
- 20:37Q&A session
related talks
44m"go test -race" Under the Hood
07mRace Conditions in Details
19mRuntime Detection of Data Races in OCaml with ThreadSanitizer
01h 04mDebugging data races
24mRacerD - Compositional Static Race Detection
15mSound and partially-complete static analysis of data-races in GPU programs
23mDynamic Race Detection with O(1) Samples
18mSound Static Data Race Verification for C: Is the Race Lost?
