MaTSa: Race Detection in Java
summary
MaTSa is an OpenJDK-integrated dynamic race detector that implements a FastTrack-like algorithm with embedded vector clocks in object headers and a per-thread stack event buffer to reconstruct stale stack traces. It instruments heap field reads/writes and custom sync, ignores volatile-as-sync (accepting some false positives), and handles JIT and GC. Evaluation finds races in Renaissance and Quarkus (some fixed upstream), scales to large heaps, uses up to ~4× memory, and runs about 15x faster than Java TSan.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 1:52Existing race detection challenges
- 3:21Objectives for Java detector
- 4:49MaTSa tool and FastTrack
- 6:41FastTrack and happens-before
- 9:33Races via happens-before
- 10:57Optimizing shadow memory
- 12:45Garbage collection design
- 14:51Vector clocks in headers
- 15:12Efficient stack reconstruction
- 16:57Grouping by source lines
- 17:43OpenJDK instrumentation
- 18:25SIMD for speed
- 19:30Java memory model nuances
- 20:55Volatile fields and races
- 21:57Performance measurements
- 23:46Custom sync limitations
- 24:30Conclusion and future
- 25:17Q&A
related talks
30mThread Sanitizing for Java
48mThreadSanitizer and Heap Sampling
44m"go test -race" Under the Hood
22mData race detection
24mRacerD - Compositional Static Race Detection
15mSound and partially-complete static analysis of data-races in GPU programs
19mRuntime Detection of Data Races in OCaml with ThreadSanitizer
55mJava PathFinder: going to Mars without bugs and deadlocks
