skip to main content
10.1145/2491956.2462167acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

CLAP: recording local executions to reproduce concurrency failures

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

Index Terms

  1. CLAP: recording local executions to reproduce concurrency failures

            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
            • Published in

              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
              • 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

              Copyright © 2013 ACM

              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

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              PLDI '13 Paper Acceptance Rate46of267submissions,17%Overall Acceptance Rate406of2,067submissions,20%

              Upcoming Conference

              PLDI '24

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader