Presentation is loading. Please wait.

Presentation is loading. Please wait.

Yuan Yu(MSR) Tom Rodeheffer(MSR) Wei Chen(UC Berkeley) SOSP 2005

Similar presentations


Presentation on theme: "Yuan Yu(MSR) Tom Rodeheffer(MSR) Wei Chen(UC Berkeley) SOSP 2005"— Presentation transcript:

1 Yuan Yu(MSR) Tom Rodeheffer(MSR) Wei Chen(UC Berkeley) SOSP 2005
RaceTrack: Efficient Detection of Data Race Conditions via Adaptive Tracking Yuan Yu(MSR) Tom Rodeheffer(MSR) Wei Chen(UC Berkeley) SOSP 2005

2 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

3 False positive using Lockset
Tracking accesses to X Inst State Lockset 1 Virgin { } 3 Exclusive:t 6 Shared Modified {a} 9 Report race

4 RaceTrack Notations Lt Cx Bu Sx ti Notation Meaning
Lockset of thread t Cx Lockset of memory x Bu Vector clock of thread u Sx Threadset of memory x ti Thread t at clock time i

5 RaceTrack Algorithm Lt Cx Bt Sx t1 Notation Meaning
Lockset of thread t Cx Lockset of memory x Bt Vector clock of thread t Sx Threadset of memory x t1 Thread t at clock time 1

6 Avoiding Lockset's false positive (1)
Inst Cx Sx Lt Bt Lu Bu All { } {t1} - 1 {t2} { t1,u1 } 2 {a} 3 4 5 6 {t2,u1} 7 8

7 Avoiding Lockset's false positive (2)
Inst Cx Sx Lt Bt Lv Bv 8 {a} {t2,u1} { } - 9 {t2} 10 {t3,u1} {t2,v1} 11 12 {t3} 13 14 15 {t3,v1} 16

8 RaceTrack's state machine

9 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

10 Microsoft CLR Implementation
.NET framework

11 RaceTrack Object Layout

12 RaceTrack Encodings

13 Evaluation CLR Regression tests Performance 2122 tests (0.5 MLOC)
48 warnings Performance 5 real world programs

14 Performance 3X slowdown on memory intensive programs 1.2X memory usage
< 2X on other programs 1.2X memory usage

15 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


Download ppt "Yuan Yu(MSR) Tom Rodeheffer(MSR) Wei Chen(UC Berkeley) SOSP 2005"

Similar presentations


Ads by Google