170 likes | 226 Views
Yuan Yu(MSR) Tom Rodeheffer(MSR) Wei Chen(UC Berkeley) SOSP 2005. RaceTrack: Efficient Detection of Data Race Conditions via Adaptive Tracking. Dynamic Data Race Detection. Lockset: verify locking discipline for shared memory Detect race regardless of thread scheduling
E N D
Yuan Yu(MSR) Tom Rodeheffer(MSR) Wei Chen(UC Berkeley) SOSP 2005 RaceTrack: Efficient Detection of Data Race Conditions via Adaptive Tracking
Dynamic Data Race Detection • Lockset: verify locking discipline for shared memory • Detect race regardless of thread scheduling • False positives because other synchronization primitives (fork/join, signal/wait) not supported • Happens-before: track partial order of program events • Supports general synchronization primitives • Higher overhead compared to lockset • False negatives due to sensitivity to thread scheduling RaceTrack = Lockset + Happens-before
False positive using Lockset Tracking accesses to X
Additional ideas from paper • Accuracy vs performance & scalability tradeoff • Object granularity tracking • Track subset of (array) objects • Prune vector clock • Annotations to eliminate false positives • Warnings report analysis • Ranking and classification • Multiple stack traces
.NET framework Microsoft CLR Implementation
Evaluation • CLR Regression tests • 2122 tests (0.5 MLOC) • 48 warnings • Performance • 5 real world programs
Performance • 3X slowdown on memory intensive programs • < 2X on other programs • 1.2X memory usage
Conclusions • Eliminate Lockset false positives using happens-before • Refine state machine based on common coding style • Trade off accuracy for performance/scalability • Improved warnings reports