cord collabora ve data race detec on
play

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


  1. CoRD: ¡Collabora,ve ¡ Data ¡Race ¡Detec,on ¡ Baris ¡Kasikci, ¡Cris,an ¡Zamfir, ¡and ¡George ¡Candea School ¡of ¡Computer ¡& ¡Communica3on ¡Sciences

  2. Data ¡Races 2

  3. Data ¡Races • Accesses ¡to ¡shared ¡memory ¡loca,on 2

  4. Data ¡Races • Accesses ¡to ¡shared ¡memory ¡loca,on • By ¡mul3ple ¡threads 2

  5. Data ¡Races • Accesses ¡to ¡shared ¡memory ¡loca,on • By ¡mul3ple ¡threads • At ¡least ¡one ¡of ¡the ¡accesses ¡is ¡a ¡write 2

  6. 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

  7. Data ¡Races 3

  8. Data ¡Races Races ¡are ¡numerous ¡in ¡modern ¡soDware 3

  9. Data ¡Races 1000 ¡Races Races ¡are ¡numerous ¡in ¡modern ¡soDware 3

  10. Data ¡races 4

  11. C/C ++ POSIX 4

  12. C/C ++ POSIX Compilers ¡can ¡arbitrarily ¡break ¡racy ¡programs 4

  13. How ¡to ¡Ensure ¡SoDware ¡is ¡ Race-­‑free? 5

  14. × How ¡to ¡Ensure ¡SoDware ¡is ¡ Race-­‑free? • Sta,c ¡race ¡detectors ¡ • Full ¡path ¡analysis ¡ ✔ • Fast ¡ ✔ • Few ¡false ¡nega3ves ¡ ✔ • Many ¡false ¡posi3ves 5

  15. × × × × 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

  16. × × × × 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

  17. 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

  18. CoRD • Collabora,ve ¡race ¡detec,on ¡ • Full ¡path ¡analysis ¡ ✔ • Fast ¡ ✔ • Few ¡false ¡nega3ves ¡ ✔ • Few ¡false ¡posi3ves ✔ 7

  19. CoRD Sta,cally ¡detect ¡ • Collabora,ve ¡race ¡detec,on ¡ poten,al ¡races ¡ • Full ¡path ¡analysis ¡ ✔ • Fast ¡ ✔ • Few ¡false ¡nega3ves ¡ ✔ • Few ¡false ¡posi3ves ✔ 7

  20. 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

  21. 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

  22. CoRD ¡Architecture CoRD ¡Architecture P P P P P P virtual Hive clearing house P P 8

  23. CoRD ¡Architecture CoRD ¡Architecture instances ¡of ¡ P program ¡P P P P P P virtual Hive clearing house P P 8

  24. 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

  25. 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

  26. 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

  27. 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/

  28. 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/

  29. 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/

  30. 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/

  31. 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/

  32. Sta,c ¡Race ¡Detec,on 10

  33. Sta,c ¡Race ¡Detec,on 10

  34. Sta,c ¡Race ¡Detec,on CFG ¡entry 10

  35. Sta,c ¡Race ¡Detec,on CFG ¡entry 10

  36. Sta,c ¡Race ¡Detec,on CFG ¡entry main() g() f() 10

  37. Sta,c ¡Race ¡Detec,on CFG ¡entry main() g() f() 10

  38. Sta,c ¡Race ¡Detec,on CFG ¡entry main() g() f() 10

  39. 11

  40. 11

  41. Sta,c ¡Race ¡Detec,on 12

  42. Sta,c ¡Race ¡Detec,on x = 0 12

  43. Sta,c ¡Race ¡Detec,on x = 0 Path ¡1 lock(l) x = 1 unlock(l) 12

  44. Sta,c ¡Race ¡Detec,on x = 0 Path ¡1 Path ¡2 lock(l) lock(k) x = 1 x = 2 unlock(l) unlock(k) 12

  45. 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

  46. Sta,c ¡Race ¡Detec,on x = 1 x = 2 LS 1 = {l} LS 1 = {k} 13

  47. Sta,c ¡Race ¡Detec,on x = 1 x = 2 ∩ = ¡{} LS 1 = {l} LS 1 = {k} 13

  48. Sta,c ¡Race ¡Detec,on x = 1 x = 2 ∩ = ¡{} LS 1 = {l} LS 1 = {k} => x = 1 and x = 2 are ¡RACING! 13

  49. 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

  50. Dynamic ¡Race ¡Valida,on x = 1 x = 1 Hive x = 2 x = 2 14

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend