Skip to main content

ReCrash: Making Software Failures Reproducible by Preserving Object States

  • Conference paper

Part of the Lecture Notes in Computer Science book series (LNPSE,volume 5142)

Abstract

It is very hard to fix a software failure without being able to reproduce it. However, reproducing a failure is often difficult and time-consuming. This paper proposes a novel technique, ReCrash, that generates multiple unit tests that reproduce a given program failure. During every execution of the target program, ReCrash stores partial copies of method arguments in memory. If the program fails (e.g., crashes), ReCrash uses the saved information to create unit tests reproducing the failure.

We present ReCrashJ, an implementation of ReCrash for Java. ReCrashJ reproduced real crashes from Javac, SVNKit, Eclipsec, and BST. ReCrashJ is efficient, incurring 13%–64% performance overhead. If this overhead is unacceptable, then ReCrashJ has another mode that has negligible overhead until a crash occurs and 0%–1.7% overhead until the crash occurs for a second time, at which point the test cases are generated.

Keywords

  • Fault
  • bug
  • crash
  • failure
  • object
  • reproducing
  • capture
  • replay
  • test generation

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-540-70592-5_23
  • Chapter length: 24 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   109.00
Price excludes VAT (USA)
  • ISBN: 978-3-540-70592-5
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   149.00
Price excludes VAT (USA)

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Apple Crash Reporter (2007), http://developer.apple.com/technotes/tn2004/tn2123.html

  2. Java Platform Debugger Architecture (2007), http://java.sun.com/javase/technologies/core/toolsapis/jpda/

  3. JVMTI Tool Interface (JVM TI) (2007), http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/index.html

  4. Microsoft Online Crash Analysis (2007), http://oca.microsoft.com

  5. Talkback Reports (2007), http://talkback-public.mozilla.org

  6. XStream Project Homepage (2007), http://xstream.codehaus.org/

  7. Artzi, S., Ernst, M.D., Kieżun, A., Pacheco, C., Perkins, J.H.: Finding the needles in the haystack: Generating legal test inputs for object-oriented programs. Technical Report MIT-CSAIL-TR-2006-056, MIT Computer Science and Artificial Intelligence Laboratory, Cambridge, MA, September 5 (2006)

    Google Scholar 

  8. Artzi, S., Kieżun, A., Glasser, D., Ernst, M.D.: Combined static and dynamic mutability analysis. In: ASE 2007: Proceedings of the 22nd Annual International Conference on Automated Software Engineering, Atlanta, GA, USA, November 7-9 (2007)

    Google Scholar 

  9. Choi, J.-D., Srinivasan, H.: Deterministic replay of Java multithreaded applications. In: SPDT 1998: Proceedings of the SIGMETRICS symposium on Parallel and distributed tools, pp. 48–59 (1998)

    Google Scholar 

  10. Clause, J., Orso, A.: A technique for enabling and supporting debugging of field failures. In: ICSE 2007, Proceedings of the 29th International Conference on Software Engineering, Minneapolis, MN, USA, May 23–25, 2007, pp. 261–270 (2007)

    Google Scholar 

  11. Csallner, C., Smaragdakis, Y.: JCrasher: an automatic robustness tester for Java. Software: Practice and Experience 34(11), 1025–1050 (2004)

    CrossRef  Google Scholar 

  12. Csallner, C., Smaragdakis, Y.: Check ’n’ Crash: Combining static checking and testing. In: Inverardi, P., Jazayeri, M. (eds.) ICSE 2005. LNCS, vol. 4309, pp. 422–431. Springer, Heidelberg (2006)

    Google Scholar 

  13. Csallner, C., Smaragdakis, Y.: DSD-Crasher: A hybrid analysis tool for bug finding. In: ISSTA 2006, Proceedings of the 2006 International Symposium on Software Testing and Analysis, Portland, ME, USA, July 18–20, 2006, pp. 245–254 (2006)

    Google Scholar 

  14. de Oliveira, D.A.S., Crandall, J.R., Wassermann, G., Wu, S.F., Su, Z., Chong, F.T.: ExecRecorder: VM-based full-system replay for attack analysis and system recovery. In: ASID 2006: Proceedings of the 1st workshop on Architectural and system support for improving software dependability, pp. 66–71 (2006)

    Google Scholar 

  15. Dunlap, G.W., King, S.T., Cinar, S., Basrai, M.A., Chen, P.M.: Revirt: enabling intrusion analysis through virtual-machine logging and replay. SIGOPS Oper. Syst. Rev., 211–224 (2002)

    Google Scholar 

  16. Elbaum, S., Chin, H.N., Dwyer, M.B., Dokulil, J.: Carving differential unit test cases from system test cases. In: Proceedings of the ACM SIGSOFT 14th Symposium on the Foundations of Software Engineering (FSE 2006), pp. 253–264 November 7-9 (2006)

    Google Scholar 

  17. Ernst, M.D.: Annotations on Java types: JSR 308 working document. November 12 (2007), http://pag.csail.mit.edu/jsr308/

  18. Geels, D., Altekar, G., Shenker, S., Stoica, I.: Replay debugging for distributed applications. In: USENIX-ATC 2006: Proceedings of the Annual Technical Conference on USENIX 2006 Annual Technical Conference, Boston, MA, p. 27 (2006)

    Google Scholar 

  19. LeBlanc, T.J., Mellor-Crummey, J.M.: Debugging parallel programs with instant replay. IEEE Trans. Comput. 36(4), 471–482 (1987)

    CrossRef  Google Scholar 

  20. Leitner, A., Ciupa, I., Fiva, A.: Contract Driven Development = Test Driven Development − Writing Test Cases. In: Proc. of the 12th European Software Engineering Conference (ESEC/FSE), September 2007, pp. 425–434 (2007)

    Google Scholar 

  21. Narayanasamy, S., Pokam, G., Calder, B.: BugNet: Continuously recording program execution for deterministic replay debugging. In: ISCA 2005: Proceedings of the 32nd annual international symposium on Computer Architecture, pp. 284–295 (2005)

    Google Scholar 

  22. Narayanasamy, S., Pokam, G., Calder, B.: BugNet: Recording application-level execution for deterministic replay debugging. IEEE Micro. 26(1), 100–109 (2006)

    CrossRef  Google Scholar 

  23. ObjectWeb Consortium. ASM - Home Page (2007), http://asm.objectweb.org/

  24. Pacheco, C., Ernst, M.D.: Eclat: Automatic generation and classification of test inputs. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 504–527. Springer, Heidelberg (2005)

    Google Scholar 

  25. Pacheco, C., Lahiri, S.K., Ernst, M.D., Ball, T.: Feedback-directed random test generation. In: ICSE 2007, Proceedings of the 29th International Conference on Software Engineering, Minneapolis, MN, USA, May 23–25 (2007)

    Google Scholar 

  26. Saff, D., Artzi, S., Perkins, J.H., Ernst, M.D.: Automatic test factoring for Java. In: ASE 2005: Proceedings of the 20th Annual International Conference on Automated Software Engineering, Long Beach, CA, USA, November 9–11, 2005, pp. 114–123 (2005)

    Google Scholar 

  27. Sălcianu, A., Rinard, M.C.: Purity and side-effect analysis for Java programs. In: Cousot, R. (ed.) VMCAI 2005. LNCS, vol. 3385, pp. 199–215. Springer, Heidelberg (2005)

    Google Scholar 

  28. Srinivasan, S.M., Kandula, S., Andrews, C.R., Zhou, Y.: Flashback: A lightweight extension for rollback and deterministic replay for software debugging. In: ATEC 2004: Proceedings of the USENIX Annual Technical Conference 2004 on USENIX Annual Technical Conference, Boston, MA, p. 3 (2004)

    Google Scholar 

  29. Steven, J., Chandra, P., Fleck, B., Podgurski, A.: jRapture: A capture/replay tool for observation-based testing. In: ISSTA 2000: Proceedings of the 2000 ACM SIGSOFT international symposium on Software testing and analysis, pp. 158–167 (2000)

    Google Scholar 

  30. Tomb, A., Brat, G., Visser, W.: Variably interprocedural program analysis for runtime error detection. In: ISSTA 2007, Proceedings of the 2007 International Symposium on Software Testing and Analysis, London, UK, July 10–12 (2007)

    Google Scholar 

  31. Xu, M., Bodik, R., Hill, M.D.: A “flight data recorder” for enabling full-system multiprocessor deterministic replay. In: ISCA 2003: Proceedings of the 30th annual international symposium on Computer architecture, pp. 122–135 (2003)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Artzi, S., Kim, S., Ernst, M.D. (2008). ReCrash: Making Software Failures Reproducible by Preserving Object States. In: Vitek, J. (eds) ECOOP 2008 – Object-Oriented Programming. ECOOP 2008. Lecture Notes in Computer Science, vol 5142. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-70592-5_23

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-70592-5_23

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-70591-8

  • Online ISBN: 978-3-540-70592-5

  • eBook Packages: Computer ScienceComputer Science (R0)