Abstract
Concurrent programs often exhibit bugs due to unintended interferences among the concurrent threads. Such bugs are often hard to reproduce because they typically happen under very specific interleaving of the executing threads. Basically, it is very hard to fix a bug (or software failure) in concurrent programs without being able to reproduce it. In this paper, we present an approach, called ConCrash, that automatically and deterministically reproduces concurrent failures by recording logical thread schedule and generating unit tests. For a given bug (failure), ConCrash records the logical thread scheduling order and preserves object states in memory at runtime. Then, ConCrash reproduces the failure offline by simply using the saved information without the need for JVM-level or OS-level support. To reduce the runtime performance overhead, ConCrash employs a static data race detection technique to report potential possible race conditions, and only instruments such places. We implement the ConCrash approach in a prototype tool for Java and experimented on a number of multi-threaded Java benchmarks. As a result, we successfully reproduced a number of real concurrent bugs (e.g., deadlocks, data races and atomicity violation) within an acceptable overhead.
Chapter PDF
References
reCrashJ implementation, http://groups.csail.mit.edu/pag/reCrash/
Soot Homepage, http://www.sable.mcgill.ca/soot/
XStream Project Homepage, http://xstream.codehaus.org/
Agrawal, H., Horgan, J.R.: Dynamic program slicing. In: PLDI 1990, pp. 246–256 (1990)
Artzi, S., Kim, S., Ernst, M.D.: Recrash: Making software failures reproducible by preserving object states. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 542–565. Springer, Heidelberg (2008)
Choi, J.D., Lee, K., Loginov, A., O’Callahan, R., Sarkar, V., Sridharan, M.: Efficient and precise datarace detection for multithreaded object-oriented programs. In: PLDI 2002, pp. 258–269 (2002)
Choi, J.D., Srinivasan, H.: Deterministic replay of Java multithreaded applications. In: SPDT 1998, pp. 48–59 (1998)
Choi, J.D., Zeller, A.: Isolating failure-inducing thread schedules. SIGSOFT Softw. Eng. Notes 27(4), 210–220 (2002)
Edelstein, O., Farchi, E., Nir, Y., Ratsaby, G., Ur, S.: Multithreaded Java program test generation. IBM Systems Journal 41(1), 111–124 (2002)
Flanagan, C., Freund, S.N.: Atomizer: a dynamic atomicity checker for multithreaded programs. In: POPL 2004, pp. 256–267 (2004)
Freund, S.N.: Checking concise specifications for multithreaded software. Journal of Object Technology 3, 81–101 (2004)
Lu, S., Park, S., Seo, E., Zhou, Y.: Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. SIGARCH Comput. Archit. News 36(1), 329–339 (2008)
Musuvathi, M., Qadeer, S., Ball, T., Basler, G., Arumuga Nainar, P., Neamtiu, I.: Finding and reproducing heisenbugs in concurrent programs. In: OSDI 2008, pp. 267–280 (2008)
Naik, M., Aiken, A., Whaley, J.: Effective static race detection for Java. In: PLDI 2006, pp. 308–319 (2006)
Naik, M., Park, C., Sen, K., Gay, D.: Effective static deadlock detection. In: ICSE 2009, pp. 386–396 (2009)
O’Callahan, R., Choi, J.D.: Hybrid dynamic data race detection. SIGPLAN Not. 38(10), 167–178 (2003)
Park, S., Zhou, Y., Xiong, W., Yin, Z., Kaushik, R.H., Lee, K., Lu, S.: PRES: probabilistic replay with execution sketching on multiprocessors. In: SOSP 2009, pp. 177–192 (2009)
von Praun, C., Gross, T.R.: Object race detection. In: OOPSLA 2001, pp. 70–82 (2001)
Sen, K.: Race directed random testing of concurrent programs. In: PLDI 2008, pp. 11–21. ACM, New York (2008)
Steven, J., Chandra, P., Fleck, B., Podgurski, A.: jRapture: A capture/replay tool for observation-based testing. SIGSOFT Softw. Eng. Notes 25(5), 158–167 (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Luo, Q., Zhang, S., Zhao, J., Hu, M. (2010). A Lightweight and Portable Approach to Making Concurrent Failures Reproducible. In: Rosenblum, D.S., Taentzer, G. (eds) Fundamental Approaches to Software Engineering. FASE 2010. Lecture Notes in Computer Science, vol 6013. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12029-9_23
Download citation
DOI: https://doi.org/10.1007/978-3-642-12029-9_23
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-12028-2
Online ISBN: 978-3-642-12029-9
eBook Packages: Computer ScienceComputer Science (R0)