170 likes | 230 Views
RaceTrack is an efficient data race detection tool that combines Lockset and Happens-before techniques to detect data race conditions regardless of thread scheduling, with false positives minimized by tracking partial order of program events. The algorithm avoids Lockset's false positives and supports general synchronization primitives, although it may have higher overhead compared to Lockset and occasional false negatives due to thread scheduling. The tool includes additional ideas such as object granularity tracking, pruning vector clocks, annotations to eliminate false positives, warning reports analysis, and ranking/classification of issues. Evaluation on the .NET framework's Microsoft CLR Implementation shows promising results with a slight slowdown on memory-intensive programs and improved warning reports.
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