![Page 1: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/1.jpg)
1
SigRace: Signature-Based Data Race Detection
Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas
Computer Science DepartmentUniversity of Illinois at Urbana-Champaign
http://iacoma.cs.uiuc.edu
*Universidad de Zaragoza, Spain
![Page 2: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/2.jpg)
2
Debugging Multithreaded Programs
“Debugging a multithreaded program has a lot in
common with medieval torture methods”
-- Random quote found via Google search
![Page 3: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/3.jpg)
3
Data Race
• Two threads access the same variable without intervening synchronization and at least one is a write
T1 T2
lock L
unlock Lx++
x++
• Hard to detect and reproduce
• Common bug
![Page 4: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/4.jpg)
4
Dynamic Data Race Detection
• Mainly two approaches
![Page 5: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/5.jpg)
5
Dynamic Data Race Detection
• Mainly two approaches– Lockset: Finds violation of locking discipline
![Page 6: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/6.jpg)
6
Dynamic Data Race Detection
• Mainly two approaches– Lockset: Finds violation of locking discipline
– Happened-Before: Finds concurrent conflicting accesses
![Page 7: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/7.jpg)
7
Happened-Before Approach
![Page 8: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/8.jpg)
8
Happened-Before Approach
[0, 0] [0, 0]
Thread 0 Thread 1
![Page 9: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/9.jpg)
9
Happened-Before Approach
Lock L
[0, 0]
[1, 0]
[0, 0]
Thread 0 Thread 1
![Page 10: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/10.jpg)
10
Happened-Before Approach
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
![Page 11: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/11.jpg)
11
Happened-Before Approach
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
![Page 12: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/12.jpg)
12
Happened-Before Approach
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
Lock L
![Page 13: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/13.jpg)
13
Happened-Before Approach
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
Lock L
[0, 1]
![Page 14: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/14.jpg)
14
Happened-Before Approach
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
Lock L
[2, 1]
+
[0, 1]
![Page 15: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/15.jpg)
15
Happened-Before Approach
• Epoch : sync to sync
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
Lock L
[2, 1]
![Page 16: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/16.jpg)
16
Happened-Before Approach
• Epoch : sync to sync
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
Lock L
[2, 1]
a
b
c
d
e
![Page 17: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/17.jpg)
17
Happened-Before Approach
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
Lock L
[2, 1]
a
b
c
d
e
• Epoch : sync to sync
![Page 18: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/18.jpg)
18
Happened-Before Approach
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
Lock L
[2, 1]
a
b
c
d
e
• Epoch : sync to sync
![Page 19: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/19.jpg)
19
Happened-Before Approach
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
Lock L
[2, 1]
a
b
c
d
e
• Epoch : sync to sync
![Page 20: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/20.jpg)
20
Happened-Before Approach
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
Lock L
[2, 1]
a
b
c
d
e
• Epoch : sync to sync
• a, b happened before e
![Page 21: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/21.jpg)
21
Happened-Before Approach
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
Lock L
[2, 1]
a
b
c
d
e
• Epoch : sync to sync
• a, b happened before e
![Page 22: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/22.jpg)
22
Happened-Before Approach
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
Lock L
[2, 1]
a
b
c
d
e
• Epoch : sync to sync
• a, b happened before e
• c, d unordered
![Page 23: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/23.jpg)
23
Happened-Before Approach
Lock L
Unlock L
[0, 0]
[1, 0]
[2, 0]
[0, 0]
Thread 0 Thread 1
Lock L
[2, 1]
a
b
c
d
e
• Epoch : sync to sync
• a, b happened before e
• c, d unordered
= x
x =
Data Race
![Page 24: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/24.jpg)
24
Software Implementation
• Need to instrument every memory access– 10x – 50x slowdown
– Not suitable for production runs
![Page 25: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/25.jpg)
25
Hardware Implementation
![Page 26: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/26.jpg)
26
Hardware Implementation
P1 P2
… …C1 C2
![Page 27: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/27.jpg)
27
Hardware Implementation
P1 P2
… …TS TS
C1 C2
![Page 28: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/28.jpg)
28
Hardware Implementation
P1 P2
… …xts1
TS TS
C1 C2
![Page 29: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/29.jpg)
29
Hardware Implementation
P1 P2
… …x xts1 ts2
ts2 …TS TS
C1 C2
WR
![Page 30: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/30.jpg)
30
Hardware Implementation
P1 P2
… …x xts1 ts2
ts2 …
ts2
check
TS TS
C1 C2
WR
![Page 31: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/31.jpg)
31
Limitations of HW Approaches
![Page 32: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/32.jpg)
32
Limitations of HW Approaches
P1 P2
… ……
C1 C2
• Modify cache and coherence protocol
![Page 33: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/33.jpg)
33
Limitations of HW Approaches
P1 P2
… ……
C1 C2
• Modify cache and coherence protocol
• Perform checking at least on every coherence transaction
ts1ts2
ts2
check
![Page 34: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/34.jpg)
34
Limitations of HW Approaches
P1 P2
… …C1 C2
• Modify cache and coherence protocol
• Perform checking at least on every coherence transaction
• Lose detection ability when cache line is displaced or invalidated
![Page 35: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/35.jpg)
35
Our Contributions
• SigRace: Novel HW mechanism for race detection based on signatures– Simple HW
• Cache and coherence protocol are unchanged– Higher coverage than existing HW schemes
• Detect races even if the line is displaced/invalidated
• SigRace finds 150% more injected races than a state-of-the-art HW proposal
– Usable on-the-fly in production runs
![Page 36: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/36.jpg)
36
Outline
• Motivation• Main Idea• Implementation• Results• Conclusions
![Page 37: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/37.jpg)
37
Main Idea
Address Signature + Happened-before
![Page 38: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/38.jpg)
38
Hardware Address Signatures
[Ceze et al, ISCA06]
…P
erm
ute
…
ROB
addressld/st
![Page 39: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/39.jpg)
39
Hardware Address Signatures
![Page 40: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/40.jpg)
40
Hardware Address Signatures
• Logical AND for intersection
• Has false positives but not false negatives
![Page 41: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/41.jpg)
41
Using Signatures for Race Detection
sync
sync
Epoch
![Page 42: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/42.jpg)
42
Using Signatures for Race Detection
sync
sync
Epoch SigTS
![Page 43: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/43.jpg)
43
Using Signatures for Race Detection
Block
• Block is a fixed number of dynamic instructions (not a cache block or basic block or atomic block)
sync
sync
Epoch Sig1TS1
![Page 44: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/44.jpg)
44
Using Signatures for Race Detection
Block
sync
sync
Epoch
Race Detection Module
Sig1TS1
![Page 45: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/45.jpg)
45
Using Signatures for Race Detection
Block
sync
sync
Epoch ØTS1
Race Detection Module
![Page 46: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/46.jpg)
46
Using Signatures for Race Detection
Block
sync
sync
Epoch
Sig2TS1
Race Detection Module
![Page 47: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/47.jpg)
47
Using Signatures for Race Detection
Block
sync
sync
Epoch
Sig2TS1
Race Detection Module
![Page 48: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/48.jpg)
48
Using Signatures for Race Detection
Block
sync
sync
Epoch
ØTS1
Race Detection Module
![Page 49: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/49.jpg)
49
Using Signatures for Race Detection
Block
sync
sync
Epoch
Sig3TS2
Race Detection Module
![Page 50: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/50.jpg)
50
Using Signatures for Race Detection
Block
sync
sync
Epoch
Sig3TS2
Race Detection Module
![Page 51: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/51.jpg)
51
Using Signatures for Race Detection
Block
sync
sync
Epoch
Sig3TS2
Race Detection Module
![Page 52: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/52.jpg)
52
Using Signatures for Race Detection
Block
sync
sync
Epoch
Sig3TS2 Sig Ո Sig
Race Detection Module
![Page 53: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/53.jpg)
53
On Chip Race Detection Module (RDM)
![Page 54: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/54.jpg)
54
On Chip Race Detection Module (RDM)
P1 P2
Q1 Q2
Chip
RDM
![Page 55: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/55.jpg)
55
On Chip Race Detection Module (RDM)
P1 P2
T1 R1 W1
Q1 Q2
Chip
RDM
![Page 56: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/56.jpg)
56
On Chip Race Detection Module (RDM)
P1 P2
T1 R1 W1
Q1 Q2
Chip
RDM
![Page 57: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/57.jpg)
57
On Chip Race Detection Module (RDM)
P1 P2
T1 R1 W1
Q1 Q2
Chip
RDM
![Page 58: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/58.jpg)
58
On Chip Race Detection Module (RDM)
P1 P2
T2 R2 W2
Q1 Q2
T1 R1 W1
Chip
RDM
![Page 59: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/59.jpg)
59
On Chip Race Detection Module (RDM)
P1 P2
T2 R2 W2
Q1 Q2
T1 R1 W1
Chip
RDM
![Page 60: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/60.jpg)
60
On Chip Race Detection Module (RDM)
P1 P2
Q1 Q2
T2 R2 W2T1 R1 W1
Chip
RDM
![Page 61: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/61.jpg)
61
On Chip Race Detection Module (RDM)
P1 P2
Q1 Q2
T2 R2 W2T1 R1 W1
TJ RJ WJ
If T2 & TJ unordered
R2 WJՈ
W2 WJՈ
W2 RJՈ
Else stop
Chip
RDM
![Page 62: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/62.jpg)
62
On Chip Race Detection Module (RDM)
P1 P2
Q1 Q2
T2 R2 W2T1 R1 W1 TJ` RJ` WJ`
If T2 & TJ` unordered
R2 WJ`Ո
W2 WJ`Ո
W2 RJ`Ո
Else stop
Chip
RDM
![Page 63: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/63.jpg)
63
On Chip Race Detection Module (RDM)
P1 P2
Q1 Q2
T2 R2 W2T1 R1 W1
TJ” RJ” WJ”
If T2 & TJ” unordered
R2 WJ”Ո
W2 WJ”Ո
W2 RJ”Ո
Else stop
Chip
RDM
![Page 64: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/64.jpg)
64
On Chip Race Detection Module (RDM)
P1 P2
Q1 Q2
T2 R2 W2T1 R1 W1
TJ”` RJ”` WJ”`
If T2 & TJ”` unordered
R2 WJ”`Ո
W2 WJ”`Ո
W2 RJ”`Ո
Else stop
Chip
RDM
![Page 65: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/65.jpg)
65
On Chip Race Detection Module (RDM)
P1 P2
Q1 Q2
T2 R2 W2T1 R1 W1
TJ”` RJ”` WJ”`
If T2 & TJ”` unordered
R2 WJ”`Ո
W2 WJ”`Ո
W2 RJ”`Ո
Else stop
Chip
RDM
Done in Background
![Page 66: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/66.jpg)
66
On Chip Race Detection Module (RDM)
P1 P2
Q1 Q2
T2 R2 W2T1 R1 W1
TJ”` RJ”` WJ”`
If T2 & TJ”` unordered
R2 WJ”`Ո
W2 WJ”`Ո
W2 RJ”`Ո
Else stop
Chip
RDM
False Positives
![Page 67: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/67.jpg)
67
Re-execution
• Needed for
– Discard if a false positive
– Identify the accesses involved
![Page 68: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/68.jpg)
68
Support for Re-execution
• Save synchronization history in TS Log
– Timestamp at sync points
• Log inputs (interrupts, sys calls, etc)
• Take periodic checkpoints: ReVive [Prvulovic et al, ISCA02]
![Page 69: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/69.jpg)
69
Modes of Operation
• Normal Execution
• Re-Execution: Bring the program to just before the race
• Race Analysis: Pinpoint the racy accesses or discarding the false positive
![Page 70: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/70.jpg)
70
SigRace Re-execution Mode
• Can be done in another machine
![Page 71: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/71.jpg)
71
SigRace Re-execution Mode
• Can be done in another machine
• Periodic checkpoint of memory state
sync
sync
sync
sync
sync
checkpointT0 T1 T2
![Page 72: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/72.jpg)
72
SigRace Re-execution Mode
• Can be done in another machine
• Periodic checkpoint of memory state
sync
sync
sync
sync
sync
checkpoint
s1
s2Data Race
T0 T1 T2
![Page 73: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/73.jpg)
73
SigRace Re-execution Mode
• Can be done in another machine
• Periodic checkpoint of memory state
sync
sync
sync
sync
sync
checkpoint
s1
s2Data Race
Ո
Conflict Sig Conflict Sig
T0 T1 T2
![Page 74: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/74.jpg)
74
SigRace Re-execution Mode
• Can be done in another machine
• Periodic checkpoint of memory state
sync
sync
sync
sync
sync
checkpoint
s1
s2Data Race
Ո
Conflict Sig Conflict Sig
checkpointT0 T1 T2 T0 T1 T2
![Page 75: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/75.jpg)
75
SigRace Re-execution Mode
• Can be done in another machine
• Periodic checkpoint of memory state
sync
sync
sync
sync
sync
checkpoint
s1
s2Data Race
Ո
Conflict Sig Conflict Sig
sync
sync
sync
sync
sync
checkpointT0 T1 T2 T0 T1 T2
Use the TS Log
![Page 76: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/76.jpg)
76
SigRace Analysis Mode
sync
sync
sync
sync
sync
checkpointT0 T1 T2
![Page 77: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/77.jpg)
77
SigRace Analysis Mode
sync
sync
sync
sync
sync
checkpointT0 T1 T2
![Page 78: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/78.jpg)
78
SigRace Analysis Mode
sync
sync
sync
sync
sync
checkpointT0 T1 T2
Conflict SigConflict Sig
ldՈ
![Page 79: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/79.jpg)
79
SigRace Analysis Mode
sync
sync
sync
sync
sync
checkpointT0 T1 T2
Conflict SigConflict Sig
ldlog
Ո
![Page 80: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/80.jpg)
80
SigRace Analysis Mode
sync
sync
sync
sync
sync
checkpointT0 T1 T2
Conflict SigConflict Sig
ldlog
sync sync
Ո
![Page 81: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/81.jpg)
81
SigRace Analysis Mode
sync
sync
sync
sync
sync
checkpointT0 T1 T2
log
sync sync
log
![Page 82: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/82.jpg)
82
SigRace Analysis Mode
sync
sync
sync
sync
sync
checkpointT0 T1 T2
log
sync sync
log
• Pinpoints racy addresses or,
• Identifies and discards false positives
![Page 83: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/83.jpg)
83
Outline
• Motivation• Main Idea• Implementation• Results• Conclusions
![Page 84: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/84.jpg)
84
New Instructions
• collect_on– Enable R and W address collection in current thread
![Page 85: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/85.jpg)
85
New Instructions
• collect_on– Enable R and W address collection in current thread
• collect_off– Disable R and W address collection in current thread
![Page 86: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/86.jpg)
86
New Instructions
• sync_reached
![Page 87: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/87.jpg)
87
New Instructions
• sync_reached– Dump TS, R and W
P
RDM
Network
TS R W
![Page 88: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/88.jpg)
88
New Instructions
• sync_reached– Dump TS, R and W
– Clear signatures
P
RDM
Network
TS Ø Ø
![Page 89: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/89.jpg)
89
New Instructions
• sync_reached– Dump TS, R and W
– Clear signatures
– Update TS
P
RDM
Network
TS` Ø Ø
![Page 90: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/90.jpg)
90
Modifications in Sync Libraries
![Page 91: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/91.jpg)
91
Modifications in Sync Libraries
• Synchronization objectvariable timestamp
![Page 92: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/92.jpg)
92
Modifications in Sync Libraries
• Synchronization object
• Unlock macro
variable timestamp
UNLOCK (‘{
}’)
unlock($1.lock)
![Page 93: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/93.jpg)
93
Modifications in Sync Libraries
• Synchronization object
• Unlock macro
variable timestamp
UNLOCK (‘{
}’)
unlock($1.lock)
sync_reached
RDM
Network
TS R WP
![Page 94: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/94.jpg)
94
Modifications in Sync Libraries
• Synchronization object
• Unlock macro
variable timestamp
UNLOCK (‘{
}’)
unlock($1.lock)
sync_reached
RDM
Network
TS Ø ØP
![Page 95: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/95.jpg)
95
Modifications in Sync Libraries
• Synchronization object
• Unlock macro
variable timestamp
UNLOCK (‘{
}’)
unlock($1.lock)
sync_reached
RDM
Network
TS Ø ØP
![Page 96: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/96.jpg)
96
Modifications in Sync Libraries
• Synchronization object
• Unlock macro
variable timestamp
UNLOCK (‘{
}’)
unlock($1.lock)
sync_reached$1.timestamp = TS lock TS
![Page 97: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/97.jpg)
97
Modifications in Sync Libraries
• Synchronization object
• Unlock macro
variable timestamp
UNLOCK (‘{
}’)
unlock($1.lock)
sync_reached$1.timestamp = TS
![Page 98: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/98.jpg)
98
Modifications in Sync Libraries
• Synchronization object
• Unlock macro
variable timestamp
UNLOCK (‘{
}’)
unlock($1.lock)
sync_reached$1.timestamp = TS
AppendtoTSLog(TS) TS LogTS
![Page 99: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/99.jpg)
99
Modifications in Sync Libraries
• Synchronization object
• Lock macro
variable timestamp
LOCK (‘{
}’)
lock($1.lock)
…
…
![Page 100: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/100.jpg)
100
Modifications in Sync Libraries
• Synchronization object
• Lock macro
variable timestamp
LOCK (‘{
}’)
lock($1.lock)
…
TS = GenerateTS (TS,$1.timestamp)
lock timestamp
…
![Page 101: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/101.jpg)
101
Modifications in Sync Libraries
• Synchronization object
• Lock macro
variable timestamp
LOCK (‘{
}’)
lock($1.lock)
…
TS = GenerateTS (TS,$1.timestamp)
lock timestamp
…
Transparent to Application Code
![Page 102: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/102.jpg)
102
Other Topics in Paper
• Easy to virtualize
• Queue Overflow
• Detailed HW structures
![Page 103: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/103.jpg)
103
Outline
• Motivation• Main Idea• Implementation• Results• Conclusions
![Page 104: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/104.jpg)
104
Experimental Setup
• PIN – Binary Instrumention Tool• Default parameters
• Benchmarks: SPLASH2, PARSEC
– # of proc: 8
– Signature size: 2 Kbits
– Block size: 2,000 ins
– Queue size: 16 entries
– Checkpoint interval: 1 Million ins
![Page 105: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/105.jpg)
105
Race Detection Ability
• Three configurations
– SigRace Default
– SigRace Ideal : Stores every signature between 2 checkpoints
– ReEnact [Prvulovic et al, ISCA03]: Cache based approach with timestamp per word
![Page 106: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/106.jpg)
106
Race Detection Ability
App Ideal
SigRace
Default SigRce
ReEnact
Cholesky 16 16 16Barnes 11 11 6Volrend 27 27 18Ocean 1 1 1Radiosity 15 15 12Raytrace 4 4 3Water-sp 8 4 2Streamcluster
13 12 13
Total 95 90 70
![Page 107: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/107.jpg)
107
Race Detection Ability
• More coverage than ReEnact
App Ideal
SigRace
Default SigRce
ReEnact
Cholesky 16 16 16Barnes 11 11 6Volrend 27 27 18Ocean 1 1 1Radiosity 15 15 12Raytrace 4 4 3Water-sp 8 4 2Streamcluster
13 12 13
Total 95 90 70
![Page 108: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/108.jpg)
108
Race Detection Ability
• More coverage than ReEnact
• Coverage comparable to ideal configuration
App Ideal
SigRace
Default SigRce
ReEnact
Cholesky 16 16 16Barnes 11 11 6Volrend 27 27 18Ocean 1 1 1Radiosity 15 15 12Raytrace 4 4 3Water-sp 8 4 2Streamcluster
13 12 13
Total 95 90 70
![Page 109: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/109.jpg)
109
Injected Races
• Removed one dynamic sync per run• Each application runs 25 times with diff sync
elimination
![Page 110: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/110.jpg)
110
Injected Races
![Page 111: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/111.jpg)
111
Injected Races
• More overall coverage than ReEnact
![Page 112: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/112.jpg)
112
Injected Races
• More overall coverage than ReEnact– 150% more coverage
![Page 113: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/113.jpg)
113
Injected Races
• More overall coverage than ReEnact– 150% more coverage
![Page 114: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/114.jpg)
114
Conclusions
• Proposed SigRace: – Simple HW
• Cache and coherence protocol are unchanged– Higher coverage than existing HW schemes
• Detect races even if the line is displaced/invalidated
– Usable on-the-fly in production runs
• SigRace finds 150% more injected races than word-based ReEnact
![Page 115: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/115.jpg)
115
SigRace: Signature-Based Data Race Detection
Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas
Computer Science DepartmentUniversity of Illinois at Urbana-Champaign
http://iacoma.cs.uiuc.edu
*Universidad de Zaragoza, Spain
![Page 116: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/116.jpg)
116
Back Up Slides
![Page 117: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/117.jpg)
117
Execution Overhead
• No overhead in generating signatures (HW)• Additional instructions are negligible• Main overheads
– Checkpointing (ReVive – 6.3%)
– Network traffic (63 bytes per 1000 ins - compressed)
– Re-execution (depends on false positives & race position)• Can be done offline
![Page 118: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/118.jpg)
118
Network Traffic Overhead
63
[ 1 cache line
![Page 119: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/119.jpg)
119
Re-execution Overhead
• Instructions re-executed until the first true data race is analyzed are shown as overhead
• In this process, it may also encounter many false positive races
• Instructions re-executed to analyze only the true race are shown as true overhead
• Instructions re-executed to filter out the false positives are shown as false overhead
![Page 120: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/120.jpg)
120
Re-execution Overhead
22%
Modest overhead
![Page 121: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/121.jpg)
121
False Positives
• Parallel bloom filters with H3 hash function
1.57%
Low False Positive
![Page 122: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/122.jpg)
122
Virtualization
![Page 123: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/123.jpg)
123
Virtualization
• RDM uses as many queues as the number of threads
• Timestamp is accessed by thread id
• Thread id remains same even after migration
• Timestamps, flags, conflict signature are saved and restored at context switch
• RDM intersects incoming signatures against all other threads’(even inactive ones) signatures
• Threads can be re-executed without any scheduling constraints
![Page 124: 1 SigRace: Signature-Based Data Race Detection Abdullah Muzahid, Dario Suarez*, Shanxiang Qi & Josep Torrellas Computer Science Department University of](https://reader030.vdocuments.site/reader030/viewer/2022032522/56649d615503460f94a437a4/html5/thumbnails/124.jpg)
124
Scalability
• For small # of proc., scalability is not a problem
• The operation of RDM can be pipelined– Simple repetitive operation
• Network traffic (compressed message) around 63Bytes/thousand ins
• Checkpoint is an issue.