skip to main content
10.1145/3243176.3243206acmconferencesArticle/Chapter ViewAbstractPublication PagespactConference Proceedingsconference-collections
research-article

Towards concurrency race debugging: an integrated approach for constraint solving and dynamic slicing

Published: 01 November 2018 Publication History

Abstract

Existing data race detectors can witness race conditions for their occurrence but few can also identify the fundamental reasons for their understanding. In this paper, we present a new debugging framework for providing a concise schedule that can help not only witness but also understand data race. The key innovation of this work is to integrate dynamic slicing into constraint solving technique. We propose to use race manifestation (a fraction of memory accesses) to characterize buggy behaviors arising from data races. By encoding race manifestation constraints, existing constraint solving system is enabled to generate the buggy-behavior-exposing schedule, which is further simplified to a minimum as root cause via a tailored data race slicing technique further proposed.
Results show the effectiveness of race manifestation in exposing buggy behaviors. Evaluation on both real-world and benchmark programs shows that root cause schedules can diagnose 376 out of 382 data races detected by the state-of-the-art, with 99.7% fewer events and 99.3% fewer inter-thread context switches compared to the original schedules.

References

[1]
aget. 2009. http://www.enderunix.org/aget/. (2009).
[2]
Hiralal Agrawal and Joseph R. Horgan. 1990. Dynamic Program Slicing. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '90). 246--256.
[3]
Apache. 2005. http://www.apache.org/. (2005).
[4]
Michael D. Bond, Katherine E. Coons, and Kathryn S. McKinley. 2010. PACER: Proportional Detection of Data Races. In Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '10). 255--268.
[5]
Sebastian Burckhardt, Pravesh Kothari, Madanlal Musuvathi, and Santosh Nagarakatte. 2010. A Randomized Scheduler with Probabilistic Guarantees of Finding Bugs. In Proceedings of the 15th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '10). 167--178.
[6]
Cristian Cadar, Daniel Dunbar, and Dawson Engler. 2008. KLEE: Unassisted and Automatic Generation of High-coverage Tests for Complex Systems Programs. In Proceedings of the 8th USENIX Conference on Operating Systems Design and Implementation (OSDI'08). 209--224.
[7]
Yan Cai and Lingwei Cao. 2015. Effective and Precise Dynamic Detection of Hidden Races for Java Programs. In Proceedings of the 10th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE '15). 450--461.
[8]
Yan Cai, Jian Zhang, Lingwei Cao, and Jian Liu. 2016. A Deployable Sampling Strategy for Data Race Detection. In Proceedings of the 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE '16). 810--821.
[9]
cherokee. 2005. http://cherokee-project.com/. (2005).
[10]
Jong-Deok Choi and Andreas Zeller. 2002. Isolating Failure-inducing Thread Schedules. In Proceedings of ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA '02). 210--220.
[11]
Holger Cleve and Andreas Zeller. 2005. Locating Causes of Program Failures. In Proceedings of the 27th International Conference on Software Engineering (ICSE '05). 342--351.
[12]
Stephen Dolan, KC Sivaramakrishnan, and Anil Madhavapeddy. 2018. Bounding Data Races in Space and Time. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '18). 242--255.
[13]
Cormac Flanagan and Stephen N. Freund. 2009. Fast Track: Efficient and Precise Dynamic Race Detection. In Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '09). 121--133.
[14]
Justin Gottschlich, Gilles Pokam, Cristiano Pereira, and Youfeng Wu. 2013. Concurrent predicates: A debugging technique for every parallel programmer. In Proceedings of the 22nd International Conference on Parallel Architectures and Compilation Techniques (PACT '13). 331--340.
[15]
Jeff Huang, Patrick O'Neil Meredith, and Grigore Rosu. 2014. Maximal Sound Predictive Race Detection with Control Flow Abstraction. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '14). 337--348.
[16]
Jeff Huang and Arun K. Rajagopalan. 2016. Precise and Maximal Race Detection from Incomplete Traces. In Proceedings of the ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA '16). 462--476.
[17]
Jeff Huang and Charles Zhang. 2011. An Efficient Static Trace Simplification Technique for Debugging Concurrent Programs. In Proceedings of the International Conference on Static Analysis (SAS'11). 163--179.
[18]
Jeff Huang and Charles Zhang. 2012. LEAN: Simplifying Concurrency Bug Reproduction via Replay-supported Execution Reduction. In Proceedings of the International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA '12). 451--466.
[19]
Jeff Huang, Charles Zhang, and Julian Dolby. 2013. CLAP: Recording Local Executions to Reproduce Concurrency Failures. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '13). 141--152.
[20]
Ruirui Huang, Erik Halberg, Andrew Ferraiuolo, and Edward Suh. 2014. Low-overhead and high coverage run-time race detection through selective meta-data management. In Proceedings of the 20th IEEE International Symposium on High Performance Computer Architecture (HPCA '14). 96--107.
[21]
Nicholas Jalbert and Koushik Sen. 2010. A Trace Simplification Technique for Effective Debugging of Concurrent Programs. In Proceedings of the 18th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE '10). 57--66.
[22]
Guoliang Jin, Linhai Song, Wei Zhang, Shan Lu, and Ben Liblit. 2011. Automated Atomicity-violation Fixing. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '11). 389--400.
[23]
Guoliang Jin, Wei Zhang, Dongdong Deng, Ben Liblit, and Shan Lu. 2012. Automated Concurrency-bug Fixing. In Proceedings of the 10th USENIX Conference on Operating Systems Design and Implementation (OSDI '12). 221--236.
[24]
Sepideh Khoshnood, Markus Kusano, and Chao Wang. 2015. ConcBugAssist: Constraint Solving for Diagnosis and Repair of Concurrency Bugs. In Proceedings of the 2015 International Symposium on Software Testing and Analysis (ISSTA '15). 165--176.
[25]
Nancy G. Leveson and Clark S. Turner. 1993. An Investigation of the Therac-25 Accidents. Computer 26, 7 (1993), 18--41.
[26]
Changhui Lin, Vijay Nagarajan, and Rajiv Gupta. 2010. Efficient Sequential Consistency Using Conditional Fences. In Proceedings of the 19th International Conference on Parallel Architectures and Compilation Techniques (PACT '10). 295--306.
[27]
Bozhen Liu and Jeff Huang. 2018. D4: Fast Concurrency Debugging with Parallel Differential Analysis. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '18). 359--373.
[28]
Peng Liu, Julian Dolby, and Charles Zhang. 2013. Finding Incorrect Compositions of Atomicity. In Proceedings of the 9th ACM SIGPLAN Conference on Programming Language Design and Implementation (FSE '13). 158--168.
[29]
Shan Lu, Soyeon Park, Chongfeng Hu, Xiao Ma, Weihang Jiang, Zhenmin Li, Raluca A. Popa, and Yuanyuan Zhou. 2007. MUVI: Automatically Inferring Multi-variable Access Correlations and Detecting Related Semantic and Concurrency Bugs. In Proceedings of the 21st ACM Symposium on Operating Systems Principles (SOSP '07). 103--116.
[30]
Shan Lu, Soyeon Park, Eunsoo Seo, and Yuanyuan Zhou. 2008. Learning from Mistakes: A Comprehensive Study on Real World Concurrency Bug Characteristics. In Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '08). 329--339.
[31]
Shan Lu, Joseph Tucek, Feng Qin, and Yuanyuan Zhou. 2006. AVIO: Detecting Atomicity Violations via Access Interleaving Invariants. In Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '06). 37--48.
[32]
Nuno Machado, Brandon Lucia, and Luís Rodrigues. 2015. Concurrency Debugging with Differential Schedule Projections. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '15). 586--595.
[33]
Nuno Machado, Brandon Lucia, and Luís Rodrigues. 2016. Productionguided Concurrency Debugging. In Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP '16). 29:1--29:12.
[34]
Daniel Marino, Madanlal Musuvathi, and Satish Narayanasamy. 2009. LiteRace: Effective Sampling for Lightweight Data-race Detection. In Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '09). 134--143.
[35]
Markus Mock, Darren C. Atkinson, Craig Chambers, and Susan J. Eggers. 2002. Improving Program Slicing with Dynamic Points-to Data. In Proceedings of the 10th ACM SIGSOFT Symposium on Foundations of Software Engineering (FSE '10). 71--80.
[36]
mozilla. 2008. https://www.mozilla.org/. (2008).
[37]
Madanlal Musuvathi, Shaz Qadeer, Thomas Ball, Gerard Basler, Piramanayagam Arumuga Nainar, and Iulian Neamtiu. 2008. Finding and Reproducing Heisenbugs in Concurrent Programs. In Proceedings of the 8th USENIX Conference on Operating Systems Design and Implementation (OSDI '08). 267--280.
[38]
MySQL. 2011. http://www.mysql.com/. (2011).
[39]
Santosh Nagarakatte, Sebastian Burckhardt, Milo M.K. Martin, and Madanlal Musuvathi. 2012. Multicore Acceleration of Priority-based Schedulers for Concurrency Bug Detection. In Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '12). 543--554.
[40]
NERC Steering Group. 2004. Technical Analysis of the August 14, 2003, Blackout: What Happened, Why, and What Did We Learn? Technical Report. North American Electric Reliability Council.
[41]
Robert H. B. Netzer and Barton P. Miller. 1992. What are Race Conditions?: Some Issues and Formalizations. ACM Letters on Programming Languages and Systems 1, 1 (1992), 74--88.
[42]
Hung Viet Nguyen, Christian Kästner, and Tien N. Nguyen. 2015. Cross-language Program Slicing for Dynamic Web Applications. In Proceedings of the 10th Joint Meeting on Foundations of Software Engineering (FSE '15). 369--380.
[43]
Soyeon Park, Shan Lu, and Yuanyuan Zhou. 2009. CTrigger: Exposing Atomicity Violation Bugs from Their Hiding Places. In Proceedings of the 14th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '09). 25--36.
[44]
pbzip2. 2012. http://compression.ca/pbzip2/. (2012).
[45]
Shanxiang Qi, Abdullah A. Muzahid, Wonsun Ahn, and Josep Torrellas. 2014. Dynamically detecting and tolerating IF-Condition Data Races. In Proceedings of the 20th IEEE International Symposium on High Performance Computer Architecture (HPCA '14). 120--131.
[46]
Torsten Robschink and Gregor Snelting. 2002. Efficient Path Conditions in Dependence Graphs. In Proceedings of the 24th International Conference on Software Engineering (ICSE '02). 478--488.
[47]
Jake Roemer, Kaan Genc, and Michael D. Bond. 2018. High-Coverage Unbounded Sound Predictive Race Detection. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '18). 374--389.
[48]
Mahmoud Said, Chao Wang, Zijiang Yang, and Karem Sakallah. 2011. Generating Data Race Witnesses by an SMT-based Analysis. In Proceedings of the 3rd International Conference on NASA Formal Methods (NFM'11). 313--327.
[49]
Susmit Sarkar, Peter Sewell, Jade Alglave, Luc Maranget, and Derek Williams. 2011. Understanding POWER Multiprocessors. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '11). 175--186.
[50]
Colin Scott, Aurojit Panda, Vjekoslav Brajkovic, George Necula, Arvind Krishnamurthy, and Scott Shenker. 2016. Minimizing Faulty Executions of Distributed Systems. In Proceedings of the 13th USENIX Conference on Networked Systems Design and Implementation (NSDI '16). 291--309.
[51]
Cedomir Segulja and Tarek S. Abdelrahman. 2015. Clean: A Race Detector with Cleaner Semantics. In Proceedings of the 42nd Annual International Symposium on Computer Architecture (ISCA '15). 401--413.
[52]
Koushik Sen. 2008. Race Directed Random Testing of Concurrent Programs. In Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '08). 11--21.
[53]
Konstantin Serebryany and Timur Iskhodzhanov. 2009. ThreadSanitizer: Data Race Detection in Practice. In Proceedings of the Workshop on Binary Instrumentation and Applications (WBIA '09). 62--71.
[54]
Yannis Smaragdakis, Jacob Evans, Caitlin Sadowski, Jaeheon Yi, and Cormac Flanagan. 2012. Sound Predictive Race Detection in Polynomial Time. In Proceedings of the 39th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '12). 387--400.
[55]
Yices Solver. 2013. http://yices.csl.sri.com/, (2013).
[56]
Sriraman Tallam, Chen Tian, and Rajiv Gupta. 2008. Dynamic slicing of multithreaded programs for race detection. In Proceedings of the IEEE International Conference on Software Maintenance (ICSM '08). 97--106.
[57]
Lin Tan, Yuanyuan Zhou, and Yoann Padioleau. 2011. aComment: Mining Annotations from Comments and Code to Detect Interrupt Related Concurrency Bugs. In Proceedings of the 33rd International Conference on Software Engineering (ICSE '11). 11--20.
[58]
Transmission. 2011. http://www.transmissionbt.com/. (2011).
[59]
Dasarath Weeratunge, Xiangyu Zhang, William N. Sumner, and Suresh Jagannathan. 2010. Analyzing Concurrency Bugs Using Dual Slicing. In Proceedings of the 19th International Symposium on Software Testing and Analysis (ISSTA '10). 253--264.
[60]
Benjamin Wester, David Devecsery, Peter M. Chen, Jason Flinn, and Satish Narayanasamy. 2013. Parallelizing Data Race Detection. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '13). 27--38.
[61]
Xinwei Xie and Jingling Xue. 2011. Acculock: Accurate and Efficient Detection of Data Races. In Proceedings of the 9th Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO '11). 201--212.
[62]
Yifan Xu, I-Ting Angelina Lee, and Kunal Agrawal. 2018. Efficient Parallel Determinacy Race Detection for Two-dimensional Dags. In Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP '18). 368--380.
[63]
Adarsh Yoga and Santosh Nagarakatte. 2016. Atomicity Violation Checker for Task Parallel Programs. In Proceedings of the International Symposium on Code Generation and Optimization (CGO '16). 239--249.
[64]
Adarsh Yoga, Santosh Nagarakatte, and Aarti Gupta. 2016. Parallel Data Race Detection for Task Parallel Programs with Locks. In Proceedings of the 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE '16). 833--845.
[65]
Jie Yu and Satish Narayanasamy. 2009. A Case for an Interleaving Constrained Shared-memory Multi-processor. In Proceedings of the International Symposium on Computer Architecture (ISCA '09). 325--336.
[66]
Jie Yu, Satish Narayanasamy, Cristiano Pereira, and Gilles Pokam. 2012. Maple: A Coverage-driven Testing Tool for Multithreaded Programs. In Proceedings of the International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA '12). 485--502.
[67]
Tingting Yu, Tarannum S. Zaman, and Chao Wang. 2017. DESCRY: Reproducing System-level Concurrency Failures. In Proceedings of the 11th Joint Meeting on Foundations of Software Engineering (FSE '17). 694--704.
[68]
Sheng Zhan and Jeff Huang. 2016. ECHO: Instantaneous in Situ Race Detection in the IDE. In Proceedings of the 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE '16). 775--786.
[69]
Xiangyu Zhang, Rajiv Gupta, and Youtao Zhang. 2003. Precise Dynamic Slicing Algorithms. In Proceedings of the 25th International Conference on Software Engineering (ICSE '03). 319--329.

Cited By

View all
  • (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)Achieving High MAP-Coverage Through Pattern Constraint ReductionIEEE Transactions on Software Engineering10.1109/TSE.2022.314448049:1(99-112)Online publication date: 1-Jan-2023
  • (2020)A Conflict-free Scheduler for High-performance Graph Processing on Multi-pipeline FPGAsACM Transactions on Architecture and Code Optimization10.1145/339052317:2(1-26)Online publication date: 29-May-2020
  • Show More Cited By
  1. Towards concurrency race debugging: an integrated approach for constraint solving and dynamic slicing

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    PACT '18: Proceedings of the 27th International Conference on Parallel Architectures and Compilation Techniques
    November 2018
    494 pages
    ISBN:9781450359863
    DOI:10.1145/3243176
    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 ACM 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

    In-Cooperation

    • IFIP WG 10.3: IFIP WG 10.3
    • IEEE CS

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 01 November 2018

    Permissions

    Request permissions for this article.

    Check for updates

    Qualifiers

    • Research-article

    Funding Sources

    • National Key Research and Development Program of China
    • China Postdoctoral Science Foundation
    • ARC
    • NSFC

    Conference

    PACT '18
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 121 of 471 submissions, 26%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)26
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 27 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (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)Achieving High MAP-Coverage Through Pattern Constraint ReductionIEEE Transactions on Software Engineering10.1109/TSE.2022.314448049:1(99-112)Online publication date: 1-Jan-2023
    • (2020)A Conflict-free Scheduler for High-performance Graph Processing on Multi-pipeline FPGAsACM Transactions on Architecture and Code Optimization10.1145/339052317:2(1-26)Online publication date: 29-May-2020
    • (2019)CrashTunerProceedings of the 27th ACM Symposium on Operating Systems Principles10.1145/3341301.3359645(114-130)Online publication date: 27-Oct-2019

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media