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.
- Gautam Altekar and Ion Stoica. ODR: output deterministic replay for multicore debugging. In SOSP, 2009. Google ScholarDigital Library
- The SPARC Architecture Manual V9. SPARC International, Inc. 1994. Google ScholarDigital Library
- Emina Torlakand, Mandana Vaziri, and Julian Dolby. MemSAT: checking axiomatic specifications of memory models. In PLDI, 2010. Google ScholarDigital Library
- Thomas Ball and James Larus. Efficient path profiling. In MICRO, 1996. Google ScholarDigital Library
- Cristian Cadar, Daniel Dunbar, and Dawson Engler. Klee: unassisted and automatic generation of high-coverage tests for complex systems programs. In OSDI, 2008. Google ScholarDigital Library
- Alvin Cheung, Armando Solar-Lezama, and Samuel Madden. Partial replay of long-running applications. In ESEC/FSE, 2011. Google ScholarDigital Library
- Leonardo De Moura and Nikolaj Bjørner. Z3: an efficient SMT solver. In TACAS, 2008. Google ScholarDigital Library
- Bruno Dutertre and Leonardo De Moura. The Yices SMT solver. Technical report, 2006.Google Scholar
- Cormac Flanagan and Stephen Freund. Adversarial memory for detecting destructive races. In PLDI, 2010. Google ScholarDigital Library
- Vijay Ganesh and David Dill. A decision procedure for bit-vectors and arrays. In CAV, 2007. Google ScholarDigital Library
- Phillip Gibbons and Ephraim Korach. Testing shared memories. 1997.Google Scholar
- Derek Hower and Mark Hill. Rerun: Exploiting episodes for lightweight memory race recording. In ISCA, 2008. Google ScholarDigital Library
- Jeff Huang, and Charles Zhang. LEAN: Simplifying concurrency bug reproduction via Replay-supported Execution Reduction. In OOPSLA, 2012. Google ScholarDigital Library
- Jeff Huang, Peng Liu, and Charles Zhang. LEAP: Lightweight deterministic multi-processor replay of concurrent Java programs. In FSE, 2010. Google ScholarDigital Library
- Jeff Huang and Charles Zhang. An efficient static trace simplification technique for debugging concurrent programs. In SAS, 2011. Google ScholarDigital Library
- Nicholas Jalbert and Koushik Sen. A trace simplification technique for effective debugging of concurrent programs. In FSE, 2010. Google ScholarDigital Library
- Daniel Jiménez. Fast path-based neural branch prediction. In MICRO, 2003.Google ScholarCross Ref
- Guoliang Jin, Linhai Song, Wei Zhang, Shan Lu, and Ben Liblit. Automated atomicity-violation fixing. In PLDI, 2011. Google ScholarDigital Library
- Guoliang Jin, Aditya Thakur, Ben Liblit, and Shan Lu. Instrumentation and sampling strategies for cooperative concurrency bug isolation. In OOPSLA, 2010. Google ScholarDigital Library
- James R. Larus. Whole program paths. In PLDI, 1999. Google ScholarDigital Library
- Dongyoon Lee, Peter M. Chen, Jason Flinn, and Satish Narayanasamy. Chimera: hybrid program analysis for determinism. In PLDI, 2012. Google ScholarDigital Library
- Michael D. Bond and Milind Kulkarni. Respec: efficient online multiprocessor replay via speculation and external determinism. Technical report, Ohio State University, 2012.Google Scholar
- Dongyoon Lee, Mahmoud Said, Satish Narayanasamy, and Zijiang Yang. Offline symbolic analysis to infer total store order. In HPCA, 2011. Google ScholarDigital Library
- Dongyoon Lee, Mahmoud Said, Satish Narayanasamy, Zijiang Yang, and Cristiano Pereira. Offline symbolic analysis for multi-processor execution replay. In MICRO, 2009. Google ScholarDigital Library
- Shan Lu, Weihang Jiang, and Yuanyuan Zhou. A study of interleaving coverage criteria. In ESEC-FSE, 2007. Google ScholarDigital Library
- Pablo Montesinos, Luis Ceze, and Josep Torrellas. Delorean: Recording and deterministically replaying shared-memory multi-processor execution efficiently. In ISCA, 2008. Google ScholarDigital Library
- Madanlal Musuvathi and Shaz Qadeer. Iterative context bounding for systematic testing of multithreaded programs. In PLDI, 2007. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Polyvios Pratikakis, Jeffrey Foster, and Michael Hicks. Locksmith: context-sensitive correlation analysis for race detection. In PLDI, 2006. Google ScholarDigital Library
- Kapil Vaswani, Matthew J. Thazhuthaveetil, and Y. N. Srikant. A programmable hardware path profiler. In CGO, 2005. Google ScholarDigital Library
- 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 ScholarDigital Library
- Chao Wang, Sudipta Kundu, Malay K. Ganai, and Aarti Gupta. Symbolic predictive analysis for concurrent programs. In FM, 2009. Google ScholarDigital Library
- Chao Wang, Rhishikesh Limaye, Malay Ganai, and Aarti Gupta. Trace based symbolic analysis for atomicity violations. In TACAS, 2010. Google ScholarDigital Library
- Dasarath Weeratunge, Xiangyu Zhang, and Suresh Jaganathan. Accentuating the positive: Atomicity inference and enforcement using correct executions. In OOPSLA, 2011. Google ScholarDigital Library
- Dasarath Weeratunge, Xiangyu Zhang, and Suresh Jagannathan. Analyzing multicore dumps to facilitate concurrency bug reproduction. In ASPLOS, 2010. Google ScholarDigital Library
- Bin Xin, William Sumner, and Xiangyu Zhang. Efficient program execution indexing. In PLDI, 2008. Google ScholarDigital Library
- Min Xu, Rastislav Bodik, and Mark Hill. A "flight data recorder" for full-system multiprocessor deterministic replay. In ISCA, 2003. Google ScholarDigital Library
- Jie Yu and Satish Narayanasamy. A case for an interleaving constrained shared-memory multi-processor. In ISCA, 2009. Google ScholarDigital Library
- Cristian Zamfir and George Candea. Execution synthesis: a technique for automated software debugging. In EuroSys, 2010. Google ScholarDigital Library
- Jinguo Zhou, Xiao Xiao, and Charles Zhang. Stride: Search-based deterministic replay in polynomial time via bounded linkage. In ICSE, 2012. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
Index Terms
- CLAP: recording local executions to reproduce concurrency failures
Recommendations
CLAP: recording local executions to reproduce concurrency failures
PLDI '13We 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 ...
EXE: Automatically Generating Inputs of Death
This article presents EXE, an effective bug-finding tool that automatically generates inputs that crash real code. Instead of running code on manually or randomly constructed input, EXE runs it on symbolic input initially allowed to be anything. As ...
Cooperative crug isolation
WODA '09: Proceedings of the Seventh International Workshop on Dynamic AnalysisWith the widespread deployment of multi-core hardware, writing concurrent programs has become inescapable. This has made fixing concurrency bugs (or crugs) critical in modern software systems. Static analysis techniques to find crugs such as data races ...
Comments