CoRD: Collabora,ve Data Race Detec,on Baris Kasikci, - PowerPoint PPT Presentation
CoRD: Collabora,ve Data Race Detec,on Baris Kasikci, Cris,an Zamfir, and George Candea School of Computer & Communica3on Sciences Data Races 2 Data Races
CoRD: ¡Collabora,ve ¡ Data ¡Race ¡Detec,on ¡ Baris ¡Kasikci, ¡Cris,an ¡Zamfir, ¡and ¡George ¡Candea School ¡of ¡Computer ¡& ¡Communica3on ¡Sciences
Data ¡Races 2
Data ¡Races • Accesses ¡to ¡shared ¡memory ¡loca,on 2
Data ¡Races • Accesses ¡to ¡shared ¡memory ¡loca,on • By ¡mul3ple ¡threads 2
Data ¡Races • Accesses ¡to ¡shared ¡memory ¡loca,on • By ¡mul3ple ¡threads • At ¡least ¡one ¡of ¡the ¡accesses ¡is ¡a ¡write 2
Data ¡Races • Accesses ¡to ¡shared ¡memory ¡loca,on • By ¡mul3ple ¡threads • At ¡least ¡one ¡of ¡the ¡accesses ¡is ¡a ¡write • The ¡accesses ¡can ¡happen ¡simultaneously 2
Data ¡Races 3
Data ¡Races Races ¡are ¡numerous ¡in ¡modern ¡soDware 3
Data ¡Races 1000 ¡Races Races ¡are ¡numerous ¡in ¡modern ¡soDware 3
Data ¡races 4
C/C ++ POSIX 4
C/C ++ POSIX Compilers ¡can ¡arbitrarily ¡break ¡racy ¡programs 4
How ¡to ¡Ensure ¡SoDware ¡is ¡ Race-‑free? 5
× How ¡to ¡Ensure ¡SoDware ¡is ¡ Race-‑free? • Sta,c ¡race ¡detectors ¡ • Full ¡path ¡analysis ¡ ✔ • Fast ¡ ✔ • Few ¡false ¡nega3ves ¡ ✔ • Many ¡false ¡posi3ves 5
× × × × How ¡to ¡Ensure ¡SoDware ¡is ¡ Race-‑free? • Sta,c ¡race ¡detectors ¡ • Dynamic ¡race ¡detectors ¡ ¡ • Full ¡path ¡analysis ¡ • Per-‑run ¡analysis ¡ ✔ • Fast ¡ • Slow ¡ ✔ • Few ¡false ¡nega3ves ¡ • Many ¡false ¡nega3ves ¡ ✔ • Many ¡false ¡posi3ves • Few ¡false ¡posi3ves ✔ 5
× × × × How ¡to ¡Ensure ¡SoDware ¡is ¡ Race-‑free? • Sta,c ¡race ¡detectors ¡ • Dynamic ¡race ¡detectors ¡ ¡ • Full ¡path ¡analysis ¡ • Per-‑run ¡analysis ¡ ✔ • Fast ¡ • Slow ¡ ✔ • Few ¡false ¡nega3ves ¡ • Many ¡false ¡nega3ves ¡ ✔ • Many ¡false ¡posi3ves • Few ¡false ¡posi3ves ✔ Exis,ng ¡detectors ¡have ¡important ¡limita,ons 5
How ¡to ¡Ensure ¡SoDware ¡is ¡ Race-‑free? • Sta,c ¡race ¡detectors ¡ • Dynamic ¡race ¡detectors ¡ ¡ • Full ¡path ¡analysis ¡ ✔ • Fast ¡ ✔ • Few ¡false ¡nega3ves ✔ • Few ¡false ¡posi3ves ¡ ✔ 6
CoRD • Collabora,ve ¡race ¡detec,on ¡ • Full ¡path ¡analysis ¡ ✔ • Fast ¡ ✔ • Few ¡false ¡nega3ves ¡ ✔ • Few ¡false ¡posi3ves ✔ 7
CoRD Sta,cally ¡detect ¡ • Collabora,ve ¡race ¡detec,on ¡ poten,al ¡races ¡ • Full ¡path ¡analysis ¡ ✔ • Fast ¡ ✔ • Few ¡false ¡nega3ves ¡ ✔ • Few ¡false ¡posi3ves ✔ 7
CoRD Sta,cally ¡detect ¡ • Collabora,ve ¡race ¡detec,on ¡ poten,al ¡races ¡ • Full ¡path ¡analysis ¡ ✔ Dynamically ¡validate ¡ • Fast ¡ ✔ detected ¡races • Few ¡false ¡nega3ves ¡ ✔ • Few ¡false ¡posi3ves ✔ 7
CoRD Sta,cally ¡detect ¡ • Collabora,ve ¡race ¡detec,on ¡ poten,al ¡races ¡ • Full ¡path ¡analysis ¡ ✔ Dynamically ¡validate ¡ • Fast ¡ ✔ detected ¡races • Few ¡false ¡nega3ves ¡ ✔ • Few ¡false ¡posi3ves ✔ Effec,vely ¡detected ¡8 ¡real ¡races ¡in ¡two ¡ real ¡programs ¡with ¡1% ¡overhead 7
CoRD ¡Architecture CoRD ¡Architecture P P P P P P virtual Hive clearing house P P 8
CoRD ¡Architecture CoRD ¡Architecture instances ¡of ¡ P program ¡P P P P P P virtual Hive clearing house P P 8
CoRD ¡Architecture CoRD ¡Architecture instances ¡of ¡ P program ¡P P P P P P virtual Hive clearing house P P Sta,cally ¡detect ¡ poten,al ¡races ¡in ¡P 8
CoRD ¡Architecture CoRD ¡Architecture instances ¡of ¡ P program ¡P P P P P P pods virtual Hive clearing house P P Sta,cally ¡detect ¡ poten,al ¡races ¡in ¡P 8
CoRD ¡Architecture CoRD ¡Architecture instances ¡of ¡ P program ¡P P Dynamically ¡ validate ¡races P P P P pods virtual Hive clearing house P P Sta,cally ¡detect ¡ poten,al ¡races ¡in ¡P 8
P clearing house virtual P P P 1 ¡ Google ¡chrome ¡blog. ¡hFp://chrome.blogspot. ¡ch/2012_06_01_archive.html ¡ ¡ 2 ¡hFps://plus.google.com/114250946512808775436/posts/VaQu9sNxJuY, ¡2012 ¡ 3 ¡R. ¡Cozza ¡et ¡al, ¡Market ¡Share: ¡Mobile ¡Devices ¡by ¡Region ¡and ¡Country, ¡Gartner, ¡Feb ¡2012 ¡ 9 4 ¡ hFp://arstechnica.com/informa3on-‑technology/2009/10/windows-‑7-‑had-‑8-‑million-‑testers-‑biggest-‑beta-‑ever/
running ¡Chrome ¡ 1 computers ¡ 300 ¡Million P clearing house virtual P P P 1 ¡ Google ¡chrome ¡blog. ¡hFp://chrome.blogspot. ¡ch/2012_06_01_archive.html ¡ ¡ 2 ¡hFps://plus.google.com/114250946512808775436/posts/VaQu9sNxJuY, ¡2012 ¡ 3 ¡R. ¡Cozza ¡et ¡al, ¡Market ¡Share: ¡Mobile ¡Devices ¡by ¡Region ¡and ¡Country, ¡Gartner, ¡Feb ¡2012 ¡ 9 4 ¡ hFp://arstechnica.com/informa3on-‑technology/2009/10/windows-‑7-‑had-‑8-‑million-‑testers-‑biggest-‑beta-‑ever/
running ¡Chrome ¡ 1 computers ¡ 300 ¡Million servers ¡owned ¡ P by ¡Google ¡ 2 1.8 ¡Million clearing house virtual P P P 1 ¡ Google ¡chrome ¡blog. ¡hFp://chrome.blogspot. ¡ch/2012_06_01_archive.html ¡ ¡ 2 ¡hFps://plus.google.com/114250946512808775436/posts/VaQu9sNxJuY, ¡2012 ¡ 3 ¡R. ¡Cozza ¡et ¡al, ¡Market ¡Share: ¡Mobile ¡Devices ¡by ¡Region ¡and ¡Country, ¡Gartner, ¡Feb ¡2012 ¡ 9 4 ¡ hFp://arstechnica.com/informa3on-‑technology/2009/10/windows-‑7-‑had-‑8-‑million-‑testers-‑biggest-‑beta-‑ever/
running ¡Chrome ¡ 1 computers ¡ 300 ¡Million servers ¡owned ¡ P by ¡Google ¡ 2 1.8 ¡Million clearing house virtual P P P ¡bought ¡in ¡2011 ¡ 3 mobile ¡devices 1.8 ¡Billion 1 ¡ Google ¡chrome ¡blog. ¡hFp://chrome.blogspot. ¡ch/2012_06_01_archive.html ¡ ¡ 2 ¡hFps://plus.google.com/114250946512808775436/posts/VaQu9sNxJuY, ¡2012 ¡ 3 ¡R. ¡Cozza ¡et ¡al, ¡Market ¡Share: ¡Mobile ¡Devices ¡by ¡Region ¡and ¡Country, ¡Gartner, ¡Feb ¡2012 ¡ 9 4 ¡ hFp://arstechnica.com/informa3on-‑technology/2009/10/windows-‑7-‑had-‑8-‑million-‑testers-‑biggest-‑beta-‑ever/
running ¡Chrome ¡ 1 computers ¡ 300 ¡Million servers ¡owned ¡ P by ¡Google ¡ 2 1.8 ¡Million clearing house virtual P beta ¡testers 4 Windows ¡7 ¡ ¡ 8 ¡Million P P ¡bought ¡in ¡2011 ¡ 3 mobile ¡devices 1.8 ¡Billion 1 ¡ Google ¡chrome ¡blog. ¡hFp://chrome.blogspot. ¡ch/2012_06_01_archive.html ¡ ¡ 2 ¡hFps://plus.google.com/114250946512808775436/posts/VaQu9sNxJuY, ¡2012 ¡ 3 ¡R. ¡Cozza ¡et ¡al, ¡Market ¡Share: ¡Mobile ¡Devices ¡by ¡Region ¡and ¡Country, ¡Gartner, ¡Feb ¡2012 ¡ 9 4 ¡ hFp://arstechnica.com/informa3on-‑technology/2009/10/windows-‑7-‑had-‑8-‑million-‑testers-‑biggest-‑beta-‑ever/
Sta,c ¡Race ¡Detec,on 10
Sta,c ¡Race ¡Detec,on 10
Sta,c ¡Race ¡Detec,on CFG ¡entry 10
Sta,c ¡Race ¡Detec,on CFG ¡entry 10
Sta,c ¡Race ¡Detec,on CFG ¡entry main() g() f() 10
Sta,c ¡Race ¡Detec,on CFG ¡entry main() g() f() 10
Sta,c ¡Race ¡Detec,on CFG ¡entry main() g() f() 10
11
11
Sta,c ¡Race ¡Detec,on 12
Sta,c ¡Race ¡Detec,on x = 0 12
Sta,c ¡Race ¡Detec,on x = 0 Path ¡1 lock(l) x = 1 unlock(l) 12
Sta,c ¡Race ¡Detec,on x = 0 Path ¡1 Path ¡2 lock(l) lock(k) x = 1 x = 2 unlock(l) unlock(k) 12
Sta,c ¡Race ¡Detec,on x = 0 Path ¡1 Path ¡2 lock(l) lock(k) x = 1 x = 2 LS 1 = {l} LS 1 = {k} unlock(l) unlock(k) 12
Sta,c ¡Race ¡Detec,on x = 1 x = 2 LS 1 = {l} LS 1 = {k} 13
Sta,c ¡Race ¡Detec,on x = 1 x = 2 ∩ = ¡{} LS 1 = {l} LS 1 = {k} 13
Sta,c ¡Race ¡Detec,on x = 1 x = 2 ∩ = ¡{} LS 1 = {l} LS 1 = {k} => x = 1 and x = 2 are ¡RACING! 13
Sta,c ¡Race ¡Detec,on x = 1 x = 2 ∩ = ¡{} LS 1 = {l} LS 1 = {k} => x = 1 and x = 2 are ¡RACING! Top-‑down, ¡flow ¡sensi,ve, ¡interprocedural, ¡lockset-‑based 13
Dynamic ¡Race ¡Valida,on x = 1 x = 1 Hive x = 2 x = 2 14
Recommend
More recommend
Explore More Topics
Stay informed with curated content and fresh updates.