Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article

CLAP: recording local executions to reproduce concurrency failures

Published: 16 June 2013 Publication History

Abstract

We present CLAP, a new technique to reproduce concurrency bugs. CLAP has two key steps. First, it logs thread local execution paths at runtime. Second, offline, it computes memory dependencies that accord with the logged execution and are able to reproduce the observed bug. The second step works by combining constraints from the thread paths and constraints based on a memory model, and computing an execution with a constraint solver.
CLAP has four major advantages. First, logging purely local execution of each thread is substantially cheaper than logging memory interactions, which enables CLAP to be efficient compared to previous approaches. Second, our logging does not require any synchronization and hence with no added memory barriers or fences; this minimizes perturbation and missed bugs due to extra synchronizations foreclosing certain racy behaviors. Third, since it uses no synchronization, we extend CLAP to work on a range of relaxed memory models, such as TSO and PSO, in addition to sequential consistency. Fourth, CLAP can compute a much simpler execution than the original one, that reveals the bug with minimal thread context switches. To mitigate the scalability issues, we also present an approach to parallelize constraint solving, which theoretically scales our technique to programs with arbitrary execution length.
Experimental results on a variety of multithreaded benchmarks and real world concurrent applications validate these advantages by showing that our technique is effective in reproducing concurrency bugs even under relaxed memory models; furthermore, it is significantly more efficient than a state-of-the-art technique that records shared memory dependencies, reducing execution time overhead by 45% and log size by 88% on average.

References

[1]
Gautam Altekar and Ion Stoica. ODR: output deterministic replay for multicore debugging. In SOSP, 2009.
[2]
The SPARC Architecture Manual V9. SPARC International, Inc. 1994.
[3]
Emina Torlakand, Mandana Vaziri, and Julian Dolby. MemSAT: checking axiomatic specifications of memory models. In PLDI, 2010.
[4]
Thomas Ball and James Larus. Efficient path profiling. In MICRO, 1996.
[5]
Cristian Cadar, Daniel Dunbar, and Dawson Engler. Klee: unassisted and automatic generation of high-coverage tests for complex systems programs. In OSDI, 2008.
[6]
Alvin Cheung, Armando Solar-Lezama, and Samuel Madden. Partial replay of long-running applications. In ESEC/FSE, 2011.
[7]
Leonardo De Moura and Nikolaj Bjørner. Z3: an efficient SMT solver. In TACAS, 2008.
[8]
Bruno Dutertre and Leonardo De Moura. The Yices SMT solver. Technical report, 2006.
[9]
Cormac Flanagan and Stephen Freund. Adversarial memory for detecting destructive races. In PLDI, 2010.
[10]
Vijay Ganesh and David Dill. A decision procedure for bit-vectors and arrays. In CAV, 2007.
[11]
Phillip Gibbons and Ephraim Korach. Testing shared memories. 1997.
[12]
Derek Hower and Mark Hill. Rerun: Exploiting episodes for lightweight memory race recording. In ISCA, 2008.
[13]
Jeff Huang, and Charles Zhang. LEAN: Simplifying concurrency bug reproduction via Replay-supported Execution Reduction. In OOPSLA, 2012.
[14]
Jeff Huang, Peng Liu, and Charles Zhang. LEAP: Lightweight deterministic multi-processor replay of concurrent Java programs. In FSE, 2010.
[15]
Jeff Huang and Charles Zhang. An efficient static trace simplification technique for debugging concurrent programs. In SAS, 2011.
[16]
Nicholas Jalbert and Koushik Sen. A trace simplification technique for effective debugging of concurrent programs. In FSE, 2010.
[17]
Daniel Jiménez. Fast path-based neural branch prediction. In MICRO, 2003.
[18]
Guoliang Jin, Linhai Song, Wei Zhang, Shan Lu, and Ben Liblit. Automated atomicity-violation fixing. In PLDI, 2011.
[19]
Guoliang Jin, Aditya Thakur, Ben Liblit, and Shan Lu. Instrumentation and sampling strategies for cooperative concurrency bug isolation. In OOPSLA, 2010.
[20]
James R. Larus. Whole program paths. In PLDI, 1999.
[21]
Dongyoon Lee, Peter M. Chen, Jason Flinn, and Satish Narayanasamy. Chimera: hybrid program analysis for determinism. In PLDI, 2012.
[22]
Michael D. Bond and Milind Kulkarni. Respec: efficient online multiprocessor replay via speculation and external determinism. Technical report, Ohio State University, 2012.
[23]
Dongyoon Lee, Mahmoud Said, Satish Narayanasamy, and Zijiang Yang. Offline symbolic analysis to infer total store order. In HPCA, 2011.
[24]
Dongyoon Lee, Mahmoud Said, Satish Narayanasamy, Zijiang Yang, and Cristiano Pereira. Offline symbolic analysis for multi-processor execution replay. In MICRO, 2009.
[25]
Shan Lu, Weihang Jiang, and Yuanyuan Zhou. A study of interleaving coverage criteria. In ESEC-FSE, 2007.
[26]
Pablo Montesinos, Luis Ceze, and Josep Torrellas. Delorean: Recording and deterministically replaying shared-memory multi-processor execution efficiently. In ISCA, 2008.
[27]
Madanlal Musuvathi and Shaz Qadeer. Iterative context bounding for systematic testing of multithreaded programs. In PLDI, 2007.
[28]
Madanlal Musuvathi, Shaz Qadeer, Thomas Ball, Gérard Basler, Piramanayagam A. Nainar, and Iulian Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In OSDI, 2008.
[29]
Soyeon Park, Yuanyuan Zhou, Weiwei Xiong, Zuoning Yin, Rini Kaushik, Kyu H. Lee, and Shan Lu. PRES: probabilistic replay with execution sketching on multi-processors. In SOSP, 2009.
[30]
Polyvios Pratikakis, Jeffrey Foster, and Michael Hicks. Locksmith: context-sensitive correlation analysis for race detection. In PLDI, 2006.
[31]
Kapil Vaswani, Matthew J. Thazhuthaveetil, and Y. N. Srikant. A programmable hardware path profiler. In CGO, 2005.
[32]
Kaushik Veeraraghavan, Dongyoon Lee, Benjamin Wester, Jessica Ouyang, Peter M. Chen, Jason Flinn, and Satish Narayanasamy. Doubleplay: parallelizing sequential logging and replay. In ASPLOS, 2011.
[33]
Chao Wang, Sudipta Kundu, Malay K. Ganai, and Aarti Gupta. Symbolic predictive analysis for concurrent programs. In FM, 2009.
[34]
Chao Wang, Rhishikesh Limaye, Malay Ganai, and Aarti Gupta. Trace based symbolic analysis for atomicity violations. In TACAS, 2010.
[35]
Dasarath Weeratunge, Xiangyu Zhang, and Suresh Jaganathan. Accentuating the positive: Atomicity inference and enforcement using correct executions. In OOPSLA, 2011.
[36]
Dasarath Weeratunge, Xiangyu Zhang, and Suresh Jagannathan. Analyzing multicore dumps to facilitate concurrency bug reproduction. In ASPLOS, 2010.
[37]
Bin Xin, William Sumner, and Xiangyu Zhang. Efficient program execution indexing. In PLDI, 2008.
[38]
Min Xu, Rastislav Bodik, and Mark Hill. A "flight data recorder" for full-system multiprocessor deterministic replay. In ISCA, 2003.
[39]
Jie Yu and Satish Narayanasamy. A case for an interleaving constrained shared-memory multi-processor. In ISCA, 2009.
[40]
Cristian Zamfir and George Candea. Execution synthesis: a technique for automated software debugging. In EuroSys, 2010.
[41]
Jinguo Zhou, Xiao Xiao, and Charles Zhang. Stride: Search-based deterministic replay in polynomial time via bounded linkage. In ICSE, 2012.
[42]
Dongyoon Lee, Benjamin Wester, Kaushik Veeraraghavan, Satish Narayanasamy, Peter M. Chen, and Jason Flinn. Respec: efficient online multiprocessor replayvia speculation and external determinism. In ASPLOS, 2010.
[43]
A. Georges, M. Christiaens, M. Ronsse, and K. De Bosschere. JaRec: a portable record/replay environment for multi-threaded Java applications. In SPE, 2004.

Cited By

View all
  • (2024)How Well Industry-Level Cause Bisection Works in Real-World: A Study on Linux KernelCompanion Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering10.1145/3663529.3663828(62-73)Online publication date: 10-Jul-2024
  • (2023)Enhanced S2E for Analysis of Multi-Thread SoftwareProgramming and Computing Software10.1134/S036176882309007449:Suppl 1(S39-S44)Online publication date: 1-Dec-2023
  • (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
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 48, Issue 6
PLDI '13
June 2013
515 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2499370
Issue’s Table of Contents
  • cover image ACM Conferences
    PLDI '13: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation
    June 2013
    546 pages
    ISBN:9781450320146
    DOI:10.1145/2491956
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]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 16 June 2013
Published in SIGPLAN Volume 48, Issue 6

Check for updates

Author Tags

  1. bug reproduction
  2. concurrency
  3. constraint solving
  4. local execution

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)59
  • Downloads (Last 6 weeks)4
Reflects downloads up to 23 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)How Well Industry-Level Cause Bisection Works in Real-World: A Study on Linux KernelCompanion Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering10.1145/3663529.3663828(62-73)Online publication date: 10-Jul-2024
  • (2023)Enhanced S2E for Analysis of Multi-Thread SoftwareProgramming and Computing Software10.1134/S036176882309007449:Suppl 1(S39-S44)Online publication date: 1-Dec-2023
  • (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
  • (2021)Postmortem accurate IR-level state recovery for deployed concurrent programsACM SIGAPP Applied Computing Review10.1145/3493499.349350221:3(33-48)Online publication date: 20-Oct-2021
  • (2021)An exploratory study of autopilot software bugs in unmanned aerial vehiclesProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468559(20-31)Online publication date: 20-Aug-2021
  • (2021)RAProducer: efficiently diagnose and reproduce data race bugs for binaries via trace analysisProceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3460319.3464831(593-606)Online publication date: 11-Jul-2021
  • (2021)A Guard-Driven Analysis Approach of Workflow Net with DataIEEE Transactions on Services Computing10.1109/TSC.2019.289908614:6(1650-1661)Online publication date: 1-Nov-2021
  • (2020)Tell You a Definite Answer: Whether Your Data is Tainted During Thread SchedulingIEEE Transactions on Software Engineering10.1109/TSE.2018.287166646:9(916-931)Online publication date: 1-Sep-2020
  • (2019)AggrePlay: efficient record and replay of multi-threaded programsProceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3338906.3338959(567-577)Online publication date: 12-Aug-2019
  • (2019)Efficient transaction-based deterministic replay for multi-threaded programsProceedings of the 34th IEEE/ACM International Conference on Automated Software Engineering10.1109/ASE.2019.00076(760-771)Online publication date: 10-Nov-2019
  • Show More Cited By

View Options

Get Access

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