1 / 125

Pacer: Proportional Detection of Data Races

Michael Bond Katherine Coons Kathryn McKinley University of Texas at Austin. Pacer: Proportional Detection of Data Races. Detecting data races in production. Number of threads. Problem today. Problem in future. Sampling rate. Sampling periods. Non-sampling periods.

chico
Download Presentation

Pacer: Proportional Detection of Data Races

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Michael Bond Katherine Coons Kathryn McKinley University ofTexas at Austin Pacer: Proportional Detection of Data Races

  2. Detecting data races in production

  3. Number of threads

  4. Problem today Problem in future

  5. Sampling rate

  6. Sampling periods Non-sampling periods

  7. Detect race  first access sampled

  8. Thread A Thread B Non-sampling period Sampling period Non-sampling period Sampling period Non-sampling period

  9. Thread A Thread B write x read y write y read x

  10. Insight #1: • Stop tracking variable after • non-sampled access

  11. Thread A write x unlock m Thread B

  12. Thread A write x unlock m Thread B lock m

  13. Thread A write x unlock m Thread B lock m write x

  14. Thread A write x unlock m read x Thread B lock m write x

  15. Thread A write x unlock m read x Thread B lock m write x Race!

  16. Thread A write x unlock m read x Thread B lock m write x Race!

  17. Thread A write x unlock m read x Thread B lock m write x A B A B Vector clocks 5 2 3 4

  18. Thread A write x unlock m read x Thread B lock m write x A B A B Vector clocks 5 2 3 4

  19. Thread A write x unlock m read x Thread B lock m write x A B A B Vector clocks 5 2 3 4

  20. Thread A write x unlock m read x Thread B lock m write x A B A B 5 2 3 4

  21. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 3 4

  22. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 3 4 5 2

  23. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 3 4 Increment clock 6 5 2 2

  24. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 3 5 4 4 Join clocks 6 5 2 2

  25. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 5 3 4 4 Happens before? 6 5 2 2

  26. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 5 3 4 4 5 6 2 2

  27. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 5 3 4 4 5 6 2 2

  28. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 5 3 4 4 5 6 2 2 No work performed

  29. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 5 3 4 4 5 6 2 2 Race uncaught

  30. Thread A write x unlock m read x Thread B lock m write x A B A B 5 2 3 5 4 4 6 5 2 2 4@B

  31. Thread A write x unlock m read x Thread B lock m write x A B A B 5 2 3 5 4 4 5 6 2 2 4@B Race! Happens before?

  32. Insight #2: We only care whether • “A happens before B” • if A is sampled

  33. Thread A Thread B Do these events happen before other events? We don’t care!

  34. Thread A Thread B Don’t increment clocks Increment clocks Do these events happen before other events? We don’t care! Don’t increment clocks Increment clocks Don’t increment clocks

  35. Thread A unlock m1 … unlock m2 Thread B lock m1 … lock m2 A B A B 5 2 3 4

  36. Thread A unlock m1 … unlock m2 Thread B lock m1 … lock m2 A B A B No clock increment 5 2 5 3 5 4 4 4 5 2

  37. Thread A unlock m1 … unlock m2 Thread B lock m1 … lock m2 A B A B 5 2 5 5 3 4 4 4 5 5 2 2

  38. Thread A unlock m1 … unlock m2 Thread B lock m1 … lock m2 A B A B 5 2 3 5 5 4 4 4 5 5 2 2 Unnecessary join

  39. Thread A unlock m1 … unlock m2 Thread B lock m1 … lock m2 A B A B 5 2 3 5 5 4 4 4 5 5 2 2 O(n) O(1)

  40. Implementation http://jikesrvm.org/Research+Archive

  41. Performance 1

  42. Performance Qualitative improvement in time & space

  43. Accuracy Probability (detecting any race) = r ?

  44. Per-Race Accuracy(eclipse, r = 1%)

  45. Related Work LiteRace[Marino et al. ’09] Cold-region hypothesis[Chilimbi & Hauswirth ’04] Full analysis at synchronization operations

  46. Deployable Race Detection Accuracy, time, space  sampling rate Detect race  first access sampled

  47. Deployable Race Detection Accuracy, time, space  sampling rate Detect race  first access sampled Qualitative improvement

  48. Deployable Race Detection Accuracy, time, space  sampling rate Detect race  first access sampled Qualitative improvement Help developers fix difficult-to-reproduce bugs

More Related