skip to main content
research-article
Open Access

Dependence-aware, unbounded sound predictive race detection

Published:10 October 2019Publication History
Skip Editorial Notes Section

Editorial Notes

A corrigendum was issued for this paper on June 10, 2021. You can download the corrigendum from the supplemental material section of this citation page.

Skip Abstract Section

Abstract

Data races are a real problem for parallel software, yet hard to detect. Sound predictive analysis observes a program execution and detects data races that exist in some other, unobserved execution. However, existing predictive analyses miss races because they do not scale to full program executions or do not precisely incorporate data and control dependence.

This paper introduces two novel, sound predictive approaches that incorporate data and control dependence and handle full program executions. An evaluation using real, large Java programs shows that these approaches detect more data races than the closest related approaches, thus advancing the state of the art in sound predictive race detection.

Skip Supplemental Material Section

Supplemental Material

a179-genc

Presentation at OOPSLA '19

References

  1. Martín Abadi, Cormac Flanagan, and Stephen N. Freund. 2006. Types for Safe Locking: Static Race Detection for Java. TOPLAS 28, 2 (2006), 207–255.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Sarita V. Adve and Hans-J. Boehm. 2010. Memory Models: A Case for Rethinking Parallel Languages and Hardware. CACM 53 (2010), 90–101. Issue 8.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. W. Ahn, S. Qi, M. Nicolaides, J. Torrellas, J.-W. Lee, X. Fang, S. Midkiff, and D. Wong. 2009. BulkCompiler: High-Performance Sequential Consistency through Cooperative Compiler and Hardware Support. In MICRO. 133–144.Google ScholarGoogle Scholar
  4. Swarnendu Biswas, Man Cao, Minjia Zhang, Michael D. Bond, and Benjamin P. Wood. 2017. Lightweight Data Race Detection for Production Runs. In CC. 11–21.Google ScholarGoogle Scholar
  5. Swarnendu Biswas, Minjia Zhang, Michael D. Bond, and Brandon Lucia. 2015. Valor: Efficient, Software-Only Region Conflict Exceptions. In OOPSLA. 241–259.Google ScholarGoogle Scholar
  6. S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. 2006. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In OOPSLA . 169–190.Google ScholarGoogle Scholar
  7. Robert L. Bocchino, Jr., Vikram S. Adve, Sarita V. Adve, and Marc Snir. 2009. Parallel Programming Must Be Deterministic by Default. In HotPar. 4–9.Google ScholarGoogle Scholar
  8. Hans-J. Boehm. 2011. How to miscompile programs with “benign” data races. In HotPar. 6.Google ScholarGoogle Scholar
  9. Hans-J. Boehm. 2012. Position paper: Nondeterminism is Unavoidable, but Data Races are Pure Evil. In RACES. 9–14.Google ScholarGoogle Scholar
  10. Hans-J. Boehm and Sarita V. Adve. 2008. Foundations of the C++ Concurrency Memory Model. In PLDI. 68–78.Google ScholarGoogle Scholar
  11. Hans-J. Boehm and Sarita V. Adve. 2012. You Don’t Know Jack about Shared Variables or Memory Models. CACM 55, 2 (2012), 48–54.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Hans-J. Boehm and Brian Demsky. 2014. Outlawing Ghosts: Avoiding Out-of-Thin-Air Results. In MSPC. Article 7, 6 pages.Google ScholarGoogle Scholar
  13. Michael D. Bond, Katherine E. Coons, and Kathryn S. McKinley. 2010. Pacer: Proportional Detection of Data Races. In PLDI. 255–268.Google ScholarGoogle Scholar
  14. Chandrasekhar Boyapati, Robert Lee, and Martin Rinard. 2002. Ownership Types for Safe Programming: Preventing Data Races and Deadlocks. In OOPSLA. 211–230.Google ScholarGoogle Scholar
  15. Sebastian Burckhardt, Pravesh Kothari, Madanlal Musuvathi, and Santosh Nagarakatte. 2010. A Randomized Scheduler with Probabilistic Guarantees of Finding Bugs. In ASPLOS. 167–178.Google ScholarGoogle Scholar
  16. Jacob Burnim, Koushik Sen, and Christos Stergiou. 2011. Testing Concurrent Programs on Relaxed Memory Models. In ISSTA . 122–132.Google ScholarGoogle Scholar
  17. Yan Cai and Lingwei Cao. 2015. Effective and Precise Dynamic Detection of Hidden Races for Java Programs. In ESEC/FSE. 450–461.Google ScholarGoogle Scholar
  18. Man Cao, Jake Roemer, Aritra Sengupta, and Michael D. Bond. 2016. Prescient Memory: Exposing Weak Memory Model Behavior by Looking into the Future. In ISMM. 99–110.Google ScholarGoogle Scholar
  19. Feng Chen, Traian Florin Şerbănuţă, and Grigore Roşu. 2008. jPredictor: A Predictive Runtime Analysis Tool for Java. In ICSE . 221–230.Google ScholarGoogle Scholar
  20. Jong-Deok Choi, Keunwoo Lee, Alexey Loginov, Robert O’Callahan, Vivek Sarkar, and Manu Sridharan. 2002. Efficient and Precise Datarace Detection for Multithreaded Object-Oriented Programs. In PLDI. 258–269.Google ScholarGoogle Scholar
  21. Joseph Devietti, Benjamin P. Wood, Karin Strauss, Luis Ceze, Dan Grossman, and Shaz Qadeer. 2012. RADISH: Always-On Sound and Complete Race Detection in Software and Hardware. In ISCA. 201–212.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Anne Dinning and Edith Schonberg. 1991. Detecting Access Anomalies in Programs with Critical Sections. In PADD. 85–96.Google ScholarGoogle Scholar
  23. Stephen Dolan, KC Sivaramakrishnan, and Anil Madhavapeddy. 2018. Bounding Data Races in Space and Time. In PLDI. 242–255.Google ScholarGoogle Scholar
  24. Laura Effinger-Dean, Brandon Lucia, Luis Ceze, Dan Grossman, and Hans-J. Boehm. 2012. IFRit: Interference-Free Regions for Dynamic Data-Race Detection. In OOPSLA. 467–484.Google ScholarGoogle Scholar
  25. Tayfun Elmas, Shaz Qadeer, and Serdar Tasiran. 2007. Goldilocks: A Race and Transaction-Aware Java Runtime. In PLDI. 245–255.Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Dawson Engler and Ken Ashcraft. 2003. RacerX: Effective, Static Detection of Race Conditions and Deadlocks. In SOSP. 237–252.Google ScholarGoogle Scholar
  27. John Erickson, Madanlal Musuvathi, Sebastian Burckhardt, and Kirk Olynyk. 2010. Effective Data-Race Detection for the Kernel. In OSDI. 1–16.Google ScholarGoogle Scholar
  28. Mahdi Eslamimehr and Jens Palsberg. 2014. Race Directed Scheduling of Concurrent Programs. In PPoPP. 301–314.Google ScholarGoogle Scholar
  29. Jeanne Ferrante, Karl J. Ottenstein, and Joe D. Warren. 1987. The Program Dependence Graph and Its Use in Optimization. TOPLAS 9, 3 (1987), 319–349.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Cormac Flanagan and Stephen N. Freund. 2007. Type Inference Against Races. SCP 64, 1 (2007), 140–165.Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Cormac Flanagan and Stephen N. Freund. 2009. FastTrack: Efficient and Precise Dynamic Race Detection. In PLDI. 121–133.Google ScholarGoogle Scholar
  32. Cormac Flanagan and Stephen N. Freund. 2010a. Adversarial Memory for Detecting Destructive Races. In PLDI. 244–254.Google ScholarGoogle Scholar
  33. Cormac Flanagan and Stephen N. Freund. 2010b. The RoadRunner Dynamic Analysis Framework for Concurrent Programs. In PASTE. 1–8.Google ScholarGoogle Scholar
  34. Cormac Flanagan and Stephen N. Freund. 2017. The FastTrack2 Race Detector. Technical Report. Williams College.Google ScholarGoogle Scholar
  35. Kaan Genç, Jake Roemer, Yufan Xu, and Michael D. Bond. 2019. Dependence-Aware, Unbounded Sound Predictive Race Detection. CoRR abs/1904.13088 (2019). arXiv: 1904.13088 http://arxiv.org/abs/1904.13088Google ScholarGoogle Scholar
  36. Dennis Giffhorn and Christian Hammer. 2008. Precise Analysis of Java Programs Using JOANA. In SCAM. 267–268.Google ScholarGoogle Scholar
  37. Thomas A. Henzinger, Ranjit Jhala, and Rupak Majumdar. 2004. Race Checking by Context Inference. In PLDI. 1–13.Google ScholarGoogle Scholar
  38. Jeff Huang. 2015. Stateless Model Checking Concurrent Programs with Maximal Causality Reduction. In PLDI. 165–174.Google ScholarGoogle Scholar
  39. Jeff Huang, Patrick O’Neil Meredith, and Grigore Roşu. 2014. Maximal Sound Predictive Race Detection with Control Flow Abstraction. In PLDI. 337–348.Google ScholarGoogle Scholar
  40. Jeff Huang and Arun K. Rajagopalan. 2016. Precise and Maximal Race Detection from Incomplete Traces. In OOPSLA. 462–476.Google ScholarGoogle Scholar
  41. Shiyou Huang and Jeff Huang. 2017. Speeding Up Maximal Causality Reduction with Static Dependency Analysis. In ECOOP. 16:1–16:22.Google ScholarGoogle Scholar
  42. Intel Corporation. 2016. Intel Inspector. https://software.intel.com/en-us/intel-inspector-xe .Google ScholarGoogle Scholar
  43. Baris Kasikci, Cristian Zamfir, and George Candea. 2012. Data Races vs. Data Race Bugs: Telling the Difference with Portend. In ASPLOS. 185–198.Google ScholarGoogle Scholar
  44. Baris Kasikci, Cristian Zamfir, and George Candea. 2013. RaceMob: Crowdsourced Data Race Detection. In SOSP. 406–422.Google ScholarGoogle Scholar
  45. Baris Kasikci, Cristian Zamfir, and George Candea. 2015. Automated Classification of Data Races Under Both Strong and Weak Memory Models. TOPLAS 37, 3, Article 8 (May 2015), 44 pages.Google ScholarGoogle Scholar
  46. Dileep Kini, Umang Mathur, and Mahesh Viswanathan. 2017. Dynamic Race Prediction in Linear Time. In PLDI. 157–170.Google ScholarGoogle Scholar
  47. Leslie Lamport. 1978. Time, Clocks, and the Ordering of Events in a Distributed System. CACM 21, 7 (1978), 558–565.Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Dongyoon Lee, Peter M. Chen, Jason Flinn, and Satish Narayanasamy. 2012. Chimera: Hybrid Program Analysis for Determinism. In PLDI. 463–474.Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. N. G. Leveson and C. S. Turner. 1993. An Investigation of the Therac-25 Accidents. IEEE Computer 26, 7 (1993), 18–41.Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Tim Lindholm and Frank Yellin. 1999. The Java Virtual Machine Specification (2nd ed.). Prentice Hall PTR.Google ScholarGoogle Scholar
  51. Peng Liu, Omer Tripp, and Xiangyu Zhang. 2016. IPA: Improving Predictive Analysis with Pointer Analysis. In ISSTA. 59–69.Google ScholarGoogle Scholar
  52. Shan Lu, Soyeon Park, Eunsoo Seo, and Yuanyuan Zhou. 2008. Learning from Mistakes: A Comprehensive Study on Real World Concurrency Bug Characteristics. In ASPLOS. 329–339.Google ScholarGoogle Scholar
  53. Brandon Lucia, Luis Ceze, Karin Strauss, Shaz Qadeer, and Hans-J. Boehm. 2010. Conflict Exceptions: Simplifying Concurrent Language Semantics with Precise Hardware Exceptions for Data-Races. In ISCA. 210–221.Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. Peng Luo, Deqing Zou, Hai Jin, Yajuan Du, Long Zheng, and Jinan Shen. 2018. DigHR: precise dynamic detection of hidden races with weak causal relation analysis. J. Supercomputing (2018).Google ScholarGoogle Scholar
  55. Jeremy Manson, William Pugh, and Sarita V. Adve. 2005. The Java Memory Model. In POPL. 378–391.Google ScholarGoogle Scholar
  56. Daniel Marino, Madanlal Musuvathi, and Satish Narayanasamy. 2009. LiteRace: Effective Sampling for Lightweight Data-Race Detection. In PLDI. 134–143.Google ScholarGoogle Scholar
  57. Daniel Marino, Abhayendra Singh, Todd Millstein, Madanlal Musuvathi, and Satish Narayanasamy. 2010. DRFx: A Simple and Efficient Memory Model for Concurrent Programming Languages. In PLDI. 351–362.Google ScholarGoogle Scholar
  58. Daniel Marino, Abhayendra Singh, Todd Millstein, Madanlal Musuvathi, and Satish Narayanasamy. 2011. A Case for an SC-Preserving Compiler. In PLDI. 199–210.Google ScholarGoogle Scholar
  59. Nicholas D. Matsakis and Felix S. Klock, II. 2014. The Rust Language. In HILT. 103–104.Google ScholarGoogle Scholar
  60. Friedemann Mattern. 1988. Virtual Time and Global States of Distributed Systems. In Workshop on Parallel and Distributed Algorithms . 215–226.Google ScholarGoogle Scholar
  61. Madanlal Musuvathi and Shaz Qadeer. 2007. Iterative Context Bounding for Systematic Testing of Multithreaded Programs. In PLDI. 446–455.Google ScholarGoogle Scholar
  62. Mayur Naik and Alex Aiken. 2007. Conditional Must Not Aliasing for Static Race Detection. In POPL. 327–338.Google ScholarGoogle Scholar
  63. Mayur Naik, Alex Aiken, and John Whaley. 2006. Effective Static Race Detection for Java. In PLDI. 308–319.Google ScholarGoogle Scholar
  64. Satish Narayanasamy, Zhenghao Wang, Jordan Tigani, Andrew Edwards, and Brad Calder. 2007. Automatically Classifying Benign and Harmful Data Races Using Replay Analysis. In PLDI. 22–31.Google ScholarGoogle Scholar
  65. Hiroyasu Nishiyama. 2004. Detecting Data Races using Dynamic Escape Analysis based on Read Barrier. In VMRT. 127–138.Google ScholarGoogle Scholar
  66. Robert O’Callahan and Jong-Deok Choi. 2003. Hybrid Dynamic Data Race Detection. In PPoPP. 167–178.Google ScholarGoogle Scholar
  67. Jessica Ouyang, Peter M. Chen, Jason Flinn, and Satish Narayanasamy. 2013. ...and region serializability for all. In HotPar.Google ScholarGoogle Scholar
  68. Andreas Pavlogiannis. 2019. Fast, Sound and Effectively Complete Dynamic Race Detection. arXiv: 1901.08857 http: //arxiv.org/abs/1901.08857Google ScholarGoogle Scholar
  69. PCWorld. 2012. Nasdaq’s Facebook Glitch Came From Race Conditions. http://www.pcworld.com/article/255911/nasdaqs_ facebook_glitch_came_from_race_conditions.html .Google ScholarGoogle Scholar
  70. Yuanfeng Peng, Benjamin P. Wood, and Joseph Devietti. 2017. PARSNIP: Performant Architecture for Race Safety with No Impact on Precision. In MICRO. 490–502.Google ScholarGoogle ScholarDigital LibraryDigital Library
  71. Eli Pozniansky and Assaf Schuster. 2007. MultiRace: Efficient On-the-Fly Data Race Detection in Multithreaded C++ Programs. CCPE 19, 3 (2007), 327–340.Google ScholarGoogle Scholar
  72. Polyvios Pratikakis, Jeffrey S. Foster, and Michael Hicks. 2006. LOCKSMITH: Context-Sensitive Correlation Analysis for Race Detection. In PLDI. 320–331.Google ScholarGoogle ScholarDigital LibraryDigital Library
  73. Martin C. Rinard and Monica S. Lam. 1998. The Design, Implementation, and Evaluation of Jade. TOPLAS 20 (1998), 483–545. Issue 3.Google ScholarGoogle ScholarDigital LibraryDigital Library
  74. Jake Roemer and Michael D. Bond. 2019. Online Set-Based Dynamic Analysis for Sound Predictive Race Detection. CoRR abs/1907.08337 (2019). arXiv: 1907.08337 http://arxiv.org/abs/1907.08337Google ScholarGoogle Scholar
  75. Jake Roemer, Kaan Genç, and Michael D. Bond. 2019. Practical Predictive Race Detection. CoRR abs/1905.00494 (2019). arXiv: 1905.00494 http://arxiv.org/abs/1905.00494Google ScholarGoogle Scholar
  76. Jake Roemer, Kaan Genç, and Michael D. Bond. 2018. High-Coverage, Unbounded Sound Predictive Race Detection. In PLDI. 374–389.Google ScholarGoogle Scholar
  77. Mahmoud Said, Chao Wang, Zijiang Yang, and Karem Sakallah. 2011. Generating Data Race Witnesses by an SMT-based Analysis. In NFM. 313–327.Google ScholarGoogle Scholar
  78. Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, and Thomas Anderson. 1997. Eraser: A Dynamic Data Race Detector for Multi-Threaded Programs. In SOSP. 27–37.Google ScholarGoogle ScholarDigital LibraryDigital Library
  79. Cedomir Segulja and Tarek S. Abdelrahman. 2015. Clean: A Race Detector with Cleaner Semantics. In ISCA. 401–413.Google ScholarGoogle Scholar
  80. Koushik Sen. 2008. Race Directed Random Testing of Concurrent Programs. In PLDI. 11–21.Google ScholarGoogle Scholar
  81. Aritra Sengupta, Swarnendu Biswas, Minjia Zhang, Michael D. Bond, and Milind Kulkarni. 2015. Hybrid Static–Dynamic Analysis for Statically Bounded Region Serializability. In ASPLOS. 561–575.Google ScholarGoogle Scholar
  82. Traian Florin Şerbănuţă, Feng Chen, and Grigore Roşu. 2013. Maximal Causal Models for Sequentially Consistent Systems. In RV. 136–150.Google ScholarGoogle Scholar
  83. Konstantin Serebryany and Timur Iskhodzhanov. 2009. ThreadSanitizer – data race detection in practice. In WBIA. 62–71.Google ScholarGoogle Scholar
  84. Konstantin Serebryany, Alexander Potapenko, Timur Iskhodzhanov, and Dmitriy Vyukov. 2012. Dynamic Race Detection with LLVM Compiler. In RV. 110–114.Google ScholarGoogle Scholar
  85. Jaroslav Ševčík and David Aspinall. 2008. On Validity of Program Transformations in the Java Memory Model. In ECOOP. 27–51.Google ScholarGoogle Scholar
  86. Tianwei Sheng, Neil Vachharajani, Stephane Eranian, Robert Hundt, Wenguang Chen, and Weimin Zheng. 2011. RACEZ: A Lightweight and Non-Invasive Race Detection Tool for Production Applications. In ICSE. 401–410.Google ScholarGoogle ScholarDigital LibraryDigital Library
  87. Abhayendra Singh, Daniel Marino, Satish Narayanasamy, Todd Millstein, and Madan Musuvathi. 2011. Efficient Processor Support for DRFx, a Memory Model with Exceptions. In ASPLOS. 53–66.Google ScholarGoogle Scholar
  88. Abhayendra Singh, Satish Narayanasamy, Daniel Marino, Todd Millstein, and Madanlal Musuvathi. 2012. End-to-End Sequential Consistency. In ISCA. 524–535.Google ScholarGoogle Scholar
  89. Yannis Smaragdakis, Jacob Evans, Caitlin Sadowski, Jaeheon Yi, and Cormac Flanagan. 2012. Sound Predictive Race Detection in Polynomial Time. In POPL. 387–400.Google ScholarGoogle Scholar
  90. Zehra Sura, Xing Fang, Chi-Leung Wong, Samuel P. Midkiff, Jaejin Lee, and David Padua. 2005. Compiler Techniques for High Performance Sequentially Consistent Java Programs. In PPoPP. 2–13.Google ScholarGoogle Scholar
  91. U.S.–Canada Power System Outage Task Force. 2004. Final Report on the August 14th Blackout in the United States and Canada . Technical Report. Department of Energy.Google ScholarGoogle Scholar
  92. Kaushik Veeraraghavan, Peter M. Chen, Jason Flinn, and Satish Narayanasamy. 2011. Detecting and Surviving Data Races using Complementary Schedules. In SOSP. 369–384.Google ScholarGoogle Scholar
  93. Christoph von Praun and Thomas R. Gross. 2001. Object Race Detection. In OOPSLA. 70–82.Google ScholarGoogle Scholar
  94. Christoph von Praun and Thomas R. Gross. 2003. Static Conflict Analysis for Multi-Threaded Object-Oriented Programs. In PLDI . 115–128.Google ScholarGoogle Scholar
  95. Jan Wen Voung, Ranjit Jhala, and Sorin Lerner. 2007. RELAY: Static Race Detection on Millions of Lines of Code. In ESEC/FSE. 205–214.Google ScholarGoogle ScholarDigital LibraryDigital Library
  96. Benjamin P. Wood, Luis Ceze, and Dan Grossman. 2014. Low-Level Detection of Language-Level Data Races with LARD. In ASPLOS . 671–686.Google ScholarGoogle Scholar
  97. Yuan Yu, Tom Rodeheffer, and Wei Chen. 2005. RaceTrack: Efficient Detection of Data Race Conditions via Adaptive Tracking. In SOSP. 221–234.Google ScholarGoogle Scholar
  98. Tong Zhang, Changhee Jung, and Dongyoon Lee. 2017. ProRace: Practical Data Race Detection for Production Use. In ASPLOS . 149–162.Google ScholarGoogle Scholar
  99. M. Zhivich and R. K. Cunningham. 2009. The Real Cost of Software Errors. IEEE Security & Privacy 7 (03 2009), 87–90.Google ScholarGoogle Scholar
  100. Pin Zhou, Radu Teodorescu, and Yuanyuan Zhou. 2007. HARD: Hardware-Assisted Lockset-based Race Detection. In HPCA. 121–132.Google ScholarGoogle Scholar

Index Terms

  1. Dependence-aware, unbounded sound predictive race detection

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image Proceedings of the ACM on Programming Languages
        Proceedings of the ACM on Programming Languages  Volume 3, Issue OOPSLA
        October 2019
        2077 pages
        EISSN:2475-1421
        DOI:10.1145/3366395
        Issue’s Table of Contents

        Copyright © 2019 Owner/Author

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 10 October 2019
        Published in pacmpl Volume 3, Issue OOPSLA

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!