[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/3385412.3385993acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

SmartTrack: efficient predictive race detection

Published: 11 June 2020 Publication History

Abstract

Widely used data race detectors, including the state-of-the-art FastTrack algorithm, incur performance costs that are acceptable for regular in-house testing, but miss races detectable from the analyzed execution. Predictive analyses detect more data races in an analyzed execution than FastTrack detects, but at significantly higher performance cost.
This paper presents SmartTrack, an algorithm that optimizes predictive race detection analyses, including two analyses from prior work and a new analysis introduced in this paper. SmartTrack incorporates two main optimizations: (1) epoch and ownership optimizations from prior work, applied to predictive analysis for the first time, and (2) novel conflicting critical section optimizations introduced by this paper. Our evaluation shows that SmartTrack achieves performance competitive with FastTrack—a qualitative improvement in the state of the art for data race detection.

References

[1]
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.
[2]
Al Bessey, Ken Block, Ben Chelf, Andy Chou, Bryan Fulton, Seth Hallem, Charles Henri-Gros, Asya Kamsky, Scott McPeak, and Dawson Engler. 2010. A Few Billion Lines of Code Later: Using Static Analysis to Find Bugs in the Real World. CACM 53, 2 (2010), 66–75.
[3]
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.
[4]
Swarnendu Biswas, Minjia Zhang, Michael D. Bond, and Brandon Lucia. 2015. Valor: Efficient, Software-Only Region Conflict Exceptions. In OOPSLA. 241–259.
[5]
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.
[6]
Sam Blackshear, Nikos Gorogiannis, Peter W. O’Hearn, and Ilya Sergey. 2018. RacerD: Compositional Static Race Detection. PACMPL 2, OOPSLA, Article 144 (2018).
[7]
Hans-J. Boehm. 2011. How to miscompile programs with “benign” data races. In HotPar. 6.
[8]
Hans-J. Boehm and Sarita V. Adve. 2008. Foundations of the C++ Concurrency Memory Model. In PLDI. 68–78.
[9]
Michael D. Bond, Katherine E. Coons, and Kathryn S. McKinley. 2010. Pacer: Proportional Detection of Data Races. In PLDI. 255–268.
[10]
Sebastian Burckhardt, Pravesh Kothari, Madanlal Musuvathi, and Santosh Nagarakatte. 2010. A Randomized Scheduler with Probabilistic Guarantees of Finding Bugs. In ASPLOS. 167–178.
[11]
Jacob Burnim, Koushik Sen, and Christos Stergiou. 2011. Testing Concurrent Programs on Relaxed Memory Models. In ISSTA. 122–132.
[12]
Yan Cai and Lingwei Cao. 2015. Effective and Precise Dynamic Detection of Hidden Races for Java Programs. In ESEC/FSE. 450–461.
[13]
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.
[14]
Feng Chen, Traian Florin Şerbănuţă, and Grigore Roşu. 2008. jPredictor: A Predictive Runtime Analysis Tool for Java. In ICSE. 221–230.
[15]
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.
[16]
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.
[17]
Anne Dinning and Edith Schonberg. 1991. Detecting Access Anomalies in Programs with Critical Sections. In PADD. 85–96.
[18]
Stephen Dolan, KC Sivaramakrishnan, and Anil Madhavapeddy. 2018. Bounding Data Races in Space and Time. In PLDI. 242–255.
[19]
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.
[20]
Tayfun Elmas, Shaz Qadeer, and Serdar Tasiran. 2007. Goldilocks: A Race and Transaction-Aware Java Runtime. In PLDI. 245–255.
[21]
Dawson Engler and Ken Ashcraft. 2003. RacerX: Effective, Static Detection of Race Conditions and Deadlocks. In SOSP. 237–252.
[22]
John Erickson, Madanlal Musuvathi, Sebastian Burckhardt, and Kirk Olynyk. 2010. Effective Data-Race Detection for the Kernel. In OSDI. 1–16.
[23]
Mahdi Eslamimehr and Jens Palsberg. 2014. Race Directed Scheduling of Concurrent Programs. In PPoPP. 301–314.
[24]
Cormac Flanagan and Stephen N. Freund. 2009. FastTrack: Efficient and Precise Dynamic Race Detection. In PLDI. 121–133.
[25]
Cormac Flanagan and Stephen N. Freund. 2010. Adversarial Memory for Detecting Destructive Races. In PLDI. 244–254.
[26]
Cormac Flanagan and Stephen N. Freund. 2010. The RoadRunner Dynamic Analysis Framework for Concurrent Programs. In PASTE. 1–8.
[27]
Cormac Flanagan and Stephen N. Freund. 2017. The FastTrack2 Race Detector. Technical Report. Williams College.
[28]
Kaan Genç, Jake Roemer, Yufan Xu, and Michael D. Bond. 2019. Dependence-Aware, Unbounded Sound Predictive Race Detection. PACMPL 3, OOPSLA, Article 179 (2019).
[29]
Patrice Godefroid and Nachi Nagappan. 2008. Concurrency at Microsoft – An Exploratory Survey. In (EC) 2.
[30]
Nikos Gorogiannis, Peter W. O’Hearn, and Ilya Sergey. 2019. A True Positives Theorem for a Static Race Detector. PACMPL 3, POPL, Article 57 (2019).
[31]
Nikos Gorogiannis, Peter W. O’Hearn, and Ilya Sergey. 2020. Personal communication.
[32]
Thomas A. Henzinger, Ranjit Jhala, and Rupak Majumdar. 2004. Race Checking by Context Inference. In PLDI. 1–13.
[33]
Jeff Huang. 2015. Stateless Model Checking Concurrent Programs with Maximal Causality Reduction. In PLDI. 165–174.
[34]
Jeff Huang, Patrick O’Neil Meredith, and Grigore Roşu. 2014. Maximal Sound Predictive Race Detection with Control Flow Abstraction. In PLDI. 337–348.
[35]
Jeff Huang and Arun K. Rajagopalan. 2016. Precise and Maximal Race Detection from Incomplete Traces. In OOPSLA. 462–476.
[36]
Shiyou Huang and Jeff Huang. 2017. Speeding Up Maximal Causality Reduction with Static Dependency Analysis. In ECOOP. 16:1–16:22.
[37]
Intel Corporation. 2016. Intel Inspector. https://software.intel.com/enus/intel-inspector-xe.
[38]
Baris Kasikci, Cristian Zamfir, and George Candea. 2012. Data Races vs. Data Race Bugs: Telling the Difference with Portend. In ASPLOS. 185–198.
[39]
Baris Kasikci, Cristian Zamfir, and George Candea. 2013. RaceMob: Crowdsourced Data Race Detection. In SOSP. 406–422.
[40]
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 (2015), 8:1–8:44 pages.
[41]
Dileep Kini, Umang Mathur, and Mahesh Viswanathan. 2017. Dynamic Race Prediction in Linear Time. In PLDI. 157–170.
[42]
Leslie Lamport. 1978. Time, Clocks, and the Ordering of Events in a Distributed System. CACM 21, 7 (1978), 558–565.
[43]
Dongyoon Lee, Peter M. Chen, Jason Flinn, and Satish Narayanasamy. 2012. Chimera: Hybrid Program Analysis for Determinism. In PLDI. 463–474.
[44]
Dongyoon Lee, Benjamin Wester, Kaushik Veeraraghavan, Satish Narayanasamy, Peter M. Chen, and Jason Flinn. 2010. Respec: Efficient Online Multiprocessor Replay via Speculation and External Determinism. In ASPLOS. 77–90.
[45]
Nancy G. Leveson and Clark S. Turner. 1993. An Investigation of the Therac-25 Accidents. IEEE Computer 26, 7 (1993), 18–41.
[46]
Hongyu Liu, Sam Silvestro, Wei Wang, Chen Tian, and Tongping Liu. 2018. iReplayer: In-situ and Identical Record-and-Replay for Multithreaded Applications. In PLDI. 344–358.
[47]
Peng Liu, Omer Tripp, and Xiangyu Zhang. 2016. IPA: Improving Predictive Analysis with Pointer Analysis. In ISSTA. 59–69.
[48]
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.
[49]
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).
[50]
PLDI ’20, June 15–20, 2020, London, UK Jake Roemer, Kaan Genç, and Michael D. Bond
[51]
Jeremy Manson, William Pugh, and Sarita V. Adve. 2005. The Java Memory Model. In POPL. 378–391.
[52]
Daniel Marino, Madanlal Musuvathi, and Satish Narayanasamy. 2009. LiteRace: Effective Sampling for Lightweight Data-Race Detection. In PLDI. 134–143.
[53]
Ali José Mashtizadeh, Tal Garfinkel, David Terei, David Mazieres, and Mendel Rosenblum. 2017. Towards Practical Default-On Multi-Core Record/Replay. In ASPLOS. 693–708.
[54]
Friedemann Mattern. 1988. Virtual Time and Global States of Distributed Systems. In Workshop on Parallel and Distributed Algorithms. 215–226.
[55]
Madanlal Musuvathi and Shaz Qadeer. 2007. Iterative Context Bounding for Systematic Testing of Multithreaded Programs. In PLDI. 446– 455.
[56]
Mayur Naik and Alex Aiken. 2007. Conditional Must Not Aliasing for Static Race Detection. In POPL. 327–338.
[57]
Mayur Naik, Alex Aiken, and John Whaley. 2006. Effective Static Race Detection for Java. In PLDI. 308–319.
[58]
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.
[59]
Hiroyasu Nishiyama. 2004. Detecting Data Races using Dynamic Escape Analysis based on Read Barrier. In VMRT. 127–138.
[60]
Robert O’Callahan and Jong-Deok Choi. 2003. Hybrid Dynamic Data Race Detection. In PPoPP. 167–178.
[61]
Andreas Pavlogiannis. 2019. Fast, Sound, and Effectively Complete Dynamic Race Prediction. PACMPL 4, POPL, Article 17 (Dec. 2019).
[62]
PCWorld. 2012. Nasdaq’s Facebook Glitch Came From Race Conditions. http://www.pcworld.com/article/255911/nasdaqs_facebook_ glitch_came_from_race_conditions.html.
[63]
Yuanfeng Peng, Benjamin P. Wood, and Joseph Devietti. 2017. PARSNIP: Performant Architecture for Race Safety with No Impact on Precision. In MICRO. 490–502.
[64]
Eli Pozniansky and Assaf Schuster. 2007. MultiRace: Efficient On-the-Fly Data Race Detection in Multithreaded C++ Programs. CCPE 19, 3 (2007), 327–340.
[65]
Polyvios Pratikakis, Jeffrey S. Foster, and Michael Hicks. 2006. LOCKSMITH: Context-Sensitive Correlation Analysis for Race Detection. In PLDI. 320–331.
[66]
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.08337
[67]
Jake Roemer, Kaan Genç, and Michael D. Bond. 2020. SmartTrack: Efficient Predictive Race Detection. CoRR abs/1905.00494 (2020).
[68]
arXiv: 1905.00494 http://arxiv.org/abs/1905.00494 Extended version of PLDI 2020 paper.
[69]
Jake Roemer, Kaan Genç, and Michael D. Bond. 2018. High-Coverage, Unbounded Sound Predictive Race Detection. In PLDI. 374–389.
[70]
Mahmoud Said, Chao Wang, Zijiang Yang, and Karem Sakallah. 2011. Generating Data Race Witnesses by an SMT-based Analysis. In NFM. 313–327.
[71]
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.
[72]
Cedomir Segulja and Tarek S. Abdelrahman. 2015. Clean: A Race Detector with Cleaner Semantics. In ISCA. 401–413.
[73]
Koushik Sen. 2008. Race Directed Random Testing of Concurrent Programs. In PLDI. 11–21.
[74]
Traian Florin Şerbănuţă, Feng Chen, and Grigore Roşu. 2013. Maximal Causal Models for Sequentially Consistent Systems. In RV. 136–150.
[75]
Konstantin Serebryany and Timur Iskhodzhanov. 2009. ThreadSanitizer – data race detection in practice. In WBIA. 62–71.
[76]
Konstantin Serebryany, Alexander Potapenko, Timur Iskhodzhanov, and Dmitriy Vyukov. 2012. Dynamic Race Detection with LLVM Compiler. In RV. 110–114.
[77]
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.
[78]
Yannis Smaragdakis, Jacob Evans, Caitlin Sadowski, Jaeheon Yi, and Cormac Flanagan. 2012. Sound Predictive Race Detection in Polynomial Time. In POPL. 387–400.
[79]
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.
[80]
Kaushik Veeraraghavan, Peter M. Chen, Jason Flinn, and Satish Narayanasamy. 2011. Detecting and Surviving Data Races using Complementary Schedules. In SOSP. 369–384.
[81]
Christoph von Praun and Thomas R. Gross. 2001. Object Race Detection. In OOPSLA. 70–82.
[82]
Jan Wen Voung, Ranjit Jhala, and Sorin Lerner. 2007. RELAY: Static Race Detection on Millions of Lines of Code. In ESEC/FSE. 205–214.
[83]
Benjamin P. Wood, Man Cao, Michael D. Bond, and Dan Grossman. 2017. Instrumentation Bias for Dynamic Data Race Detection. PACMPL 1, OOPSLA, Article 69 (2017).
[84]
Benjamin P. Wood, Luis Ceze, and Dan Grossman. 2014. Low-Level Detection of Language-Level Data Races with LARD. In ASPLOS. 671– 686.
[85]
Yuan Yu, Tom Rodeheffer, and Wei Chen. 2005. RaceTrack: Efficient Detection of Data Race Conditions via Adaptive Tracking. In SOSP. 221–234.
[86]
Tong Zhang, Changhee Jung, and Dongyoon Lee. 2017. ProRace: Practical Data Race Detection for Production Use. In ASPLOS. 149– 162.
[87]
M. Zhivich and R. K. Cunningham. 2009. The Real Cost of Software Errors. IEEE Security & Privacy 7 (03 2009), 87–90.

Cited By

View all
  • (2024)IsoPredict: Dynamic Predictive Analysis for Detecting Unserializable Behaviors in Weakly Isolated Data Store ApplicationsProceedings of the ACM on Programming Languages10.1145/36563918:PLDI(343-367)Online publication date: 20-Jun-2024
  • (2024)SSRD: Shapes and Summaries for Race Detection in Concurrent Data StructuresProceedings of the 2024 ACM SIGPLAN International Symposium on Memory Management10.1145/3652024.3665505(68-81)Online publication date: 20-Jun-2024
  • (2024)Accurate Data Race Prediction in the Linux Kernel through Sparse Fourier LearningProceedings of the ACM on Programming Languages10.1145/36498408:OOPSLA1(810-832)Online publication date: 29-Apr-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI 2020: Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2020
1174 pages
ISBN:9781450376136
DOI:10.1145/3385412
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 June 2020

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. Data race detection
  2. dynamic predictive analysis

Qualifiers

  • Research-article

Funding Sources

Conference

PLDI '20
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)42
  • Downloads (Last 6 weeks)1
Reflects downloads up to 14 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)IsoPredict: Dynamic Predictive Analysis for Detecting Unserializable Behaviors in Weakly Isolated Data Store ApplicationsProceedings of the ACM on Programming Languages10.1145/36563918:PLDI(343-367)Online publication date: 20-Jun-2024
  • (2024)SSRD: Shapes and Summaries for Race Detection in Concurrent Data StructuresProceedings of the 2024 ACM SIGPLAN International Symposium on Memory Management10.1145/3652024.3665505(68-81)Online publication date: 20-Jun-2024
  • (2024)Accurate Data Race Prediction in the Linux Kernel through Sparse Fourier LearningProceedings of the ACM on Programming Languages10.1145/36498408:OOPSLA1(810-832)Online publication date: 29-Apr-2024
  • (2024)Predictive Monitoring against Pattern Regular LanguagesProceedings of the ACM on Programming Languages10.1145/36329158:POPL(2191-2225)Online publication date: 5-Jan-2024
  • (2024)CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution AnalysisProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 310.1145/3620666.3651358(223-238)Online publication date: 27-Apr-2024
  • (2024)Greybox Fuzzing for Concurrency TestingProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 210.1145/3620665.3640389(482-498)Online publication date: 27-Apr-2024
  • (2024)Optimistic Prediction of Synchronization-Reversal Data RacesProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639099(1-13)Online publication date: 20-May-2024
  • (2024)Minimal Context-Switching Data Race Detection with Dataflow TrackingJournal of Computer Science and Technology10.1007/s11390-023-1569-739:1(211-226)Online publication date: 1-Feb-2024
  • (2023)AtomiS: Data-Centric Synchronization Made PracticalProceedings of the ACM on Programming Languages10.1145/36228017:OOPSLA2(116-145)Online publication date: 16-Oct-2023
  • (2023)Sound Dynamic Deadlock Prediction in Linear TimeProceedings of the ACM on Programming Languages10.1145/35912917:PLDI(1733-1758)Online publication date: 6-Jun-2023
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media