skip to main content
research-article

Tardis: affordable time-travel debugging in managed runtimes

Published:15 October 2014Publication History
Skip Abstract Section

Abstract

Developers who set a breakpoint a few statements too late or who are trying to diagnose a subtle bug from a single core dump often wish for a time-traveling debugger. The ability to rewind time to see the exact sequence of statements and program values leading to an error has great intuitive appeal but, due to large time and space overheads, time traveling debuggers have seen limited adoption. A managed runtime, such as the Java JVM or a JavaScript engine, has already paid much of the cost of providing core features - type safety, memory management, and virtual IO - that can be reused to implement a low overhead time-traveling debugger. We leverage this insight to design and build affordable time-traveling debuggers for managed languages. Tardis realizes our design: it provides affordable time-travel with an average overhead of only 7% during normal execution, a rate of 0.6MB/s of history logging, and a worst-case 0.68s time-travel latency on our benchmark applications. Tardis can also debug optimized code using time-travel to reconstruct state. This capability, coupled with its low overhead, makes Tardis suitable for use as the default debugger for managed languages, promising to bring time-traveling debugging into the mainstream and transform the practice of debugging.

References

  1. H. Agrawal, R. A. Demillo, and E. H. Spafford. Debugging with dynamic slicing and backtracking. Software Practice and Experience, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. H. Agrawal and J. R. Horgan. Dynamic program slicing. In PLDI, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. B. Alpern, C. R. Attanasio, A. Cocchi, D. Lieber, S. Smith, T. Ngo, J. J. Barton, S. F. Hummel, J. C. Sheperd, and M. Mergen. Implementing Jalapeño in Java. In OOPSLA, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Bhansali, W.-K. Chen, S. de Jong, A. Edwards, R. Murray, M. Drinić, D. Mihočka, and J. Chau. Framework for instruction-level tracing and analysis of program executions. In VEE, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. M. Blackburn, P. Cheng, and K. S. McKinley. Myths and realities: The performance impact of garbage collection. In SIGMETRICS, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. M. Blackburn, R. Garner, C. Hoffmann, A. M. Khang, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanovic, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis (2006-mr2). In OOPSLA, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. M. Blackburn and A. L. Hosking. Barriers: Friend or foe? In ISMM, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. M. Blackburn and K. S. McKinley. Immix:A mark-region garbage collector with space efficiency, fast collection, and mutator performance. In PLDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. D. Bond, M. Kulkarni, M. Cao, M. Zhang, M. F. Salmi, S. Biswas, A. Sengupta, and J. Huang. Octet: Capturing and controlling cross-thread dependences efficiently. In OOPSLA, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. B. Boothe. Efficient algorithms for bidirectional debugging. In PLDI, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. B. Burg, R. Bailey, A. J. Ko, and M. D. Ernst. Interactive record/replay for web application debugging. In UIST, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. Caballero, G. Grieco, M. Marron, and A. Nappa. Undangle: Early detection of dangling pointers in use-after-free and double-free vulnerabilities. In ISSTA, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. Cao, S. M. Blackburn, T. Gao, and K. S. McKinley. The yin and yang of power and performance for asymmetric hardware and managed software. In ISCA, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Common compiler infrastructure. http://ccimetadata.codeplex.com.Google ScholarGoogle Scholar
  15. Chronon v3.10. http://chrononsystems.com.Google ScholarGoogle Scholar
  16. Chronon performance, Visited June 4, 2014. http://www.chrononsystems.com/what-is-chronon/performance.Google ScholarGoogle Scholar
  17. Announcing Chronon "DVR for Java", Visited June 4, 2014. http://www.theserverside.com/discussions/thread.tss?thread_id=62697.Google ScholarGoogle Scholar
  18. C. Clark, K. Fraser, S. Hand, J. G. Hansen, E. Jul, C. Limpach, I. Pratt, and A. Warfield. Live migration of virtual machines. In NSDI, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. R. Driscoll, N. Sarnak, D. D. Sleator, and R. E. Tarjan. Making data structures persistent. Journal of Computer and System Sciences, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. I. Feldman and C. B. Brown. Igor: A system for program debugging via reversible execution. In Parallel and Distributed Debugging, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. GDB v7. http://www.gnu.org/software/gdb/news/ reversible.html.Google ScholarGoogle Scholar
  22. Z. Gu, E. T. Barr, D. Schleck, and Z. Su. Reusing debugging knowledge via trace-based bug search. In OOPSLA, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. C. Head, G. Lefebvre, M. Spear, N. Taylor, and A. Warfield. Debugging through time with the Tralfamadore debugger. In RESoLVE, 2012.Google ScholarGoogle Scholar
  24. U. Hölzle, C. Chambers, and D. Ungar. Debugging optimized code with dynamic deoptimization. In PLDI, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. G. C. Hunt and J. R. Larus. Singularity: Rethinking the software stack. SIGOPS, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Intellitrace. http://msdn.microsoft.com/en-us/library/vstudio/dd264915.aspx.Google ScholarGoogle Scholar
  27. L. Jiang and Z. Su. Context-aware statistical debugging: From bug predictors to faulty control flow paths. In ASE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. R. Jones, A. Hosking, and E. Moss. The Garbage Collection Handbook: The art of automatic memory management. Chapman & Hall/CRC, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Y. P. Khoo, J. S. Foster, and M. Hicks. Expositor: Scriptable time-travel debugging with first-class traces. In ICSE, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. S. T. King, G. W. Dunlap, and P. M. Chen. Debugging operating systems with time-traveling virtual machines. In USENIX, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. A. Ko and B. Myers. Debugging reinvented: Asking and answering why and why not questions about program behavior. In ICSE, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. B. Lee, M. Hirzel, R. Grimm, and K. S. McKinley. Debug all your code: Portable mixed-environment debugging. In OOPSLA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. H. Lee, D. von Dincklage, A. Diwan, and J. E. B. Moss. Understanding the behavior of compiler optimizations. Software Practice and Experience, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. D. Lessa, B. Jayaraman, and J. Chomicki. Temporal data model for program debugging. In DBPL, 2011.Google ScholarGoogle Scholar
  35. B. Lewis. Debugging backwards in time. In AADEBUG, 2003.Google ScholarGoogle Scholar
  36. A. Lienhard, T. Gîrba, and O. Nierstrasz. Practical object-oriented back-in-time debugging. In ECOOP, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. J. T. K. Lo, E. Wohlstadter, and A. Mesbah. Imagen: Runtime migration of browser sessions for JavaScript web applications. In WWW, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. J. Mickens, J. Elson, and J. Howell. Mugshot: Deterministic capture and replay for Javascript applications. In NSDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. S. Muchnick. Advanced Compiler Design and Implementation. Morgan Kaufmann, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. J. Nielsen. Usability Engineering. Morgan Kaufmann, 1st edition, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. F. Pizlo, L. Ziarek, P. Maj, A. L. Hosking, E. Blanton, and J. Vitek. Schism: Fragmentation-tolerant real-time garbage collection. In PLDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. J. S. Plank, M. Beck, G. Kingsley, and K. Li. Libckpt: Transparent checkpointing under Unix. In TCON, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. F. Pluquet, S. Langerman, and R. Wuyts. Executing code in the past: Efficient in-memory object graph versioning. In OOPSLA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. D. E. Porter, S. Boyd-Wickizer, J. Howell, R. Olinsky, and G. C. Hunt. Rethinking the library OS from the top down. In ASPLOS, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. G. Pothier, E. Tanter, and J. M. Piquer. Scalable omniscient debugging. In OOPSLA, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. C. Reichenbach, N. Immerman, Y. Smaragdakis, E. E. Aftandilian, and S. Z. Guyer. What can the GC compute efficiently? A language for heap assertions at GC time. In OOPSLA, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Retrace. http://www.replaydebugging.com/.Google ScholarGoogle Scholar
  48. Mozilla rr tool. http://rr-project.org/.Google ScholarGoogle Scholar
  49. J. B. Sartor, M. Hirzel, and K. S. McKinley. No bit left behind: The limits of heap data compression. In ISMM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. P. Ta-Shma, G. Laden, M. Ben-Yehuda, and M. Factor. Virtual machine time travel using continuous data protection and checkpointing. SIGOPS, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. UndoDB v3.5. http://undo-software.com.Google ScholarGoogle Scholar
  52. UndoDB performance, Visited June 4, 2014. http://undo-software.com/content/faqs.Google ScholarGoogle Scholar
  53. A.-M. Visan, K. Arya, G. Cooperman, and T. Denniston. URDB: A universal reversible debugger based on decomposing debugging histories. In PLOS, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. P. R. Wilson and T. G. Moher. Demonic memories for process histories. In PLDI, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. M. Xu, V. Malyugin, J. Sheldon, G. Venkitachalam, and B. Weissman. Retrace: Collecting execution trace with virtual machine deterministic replay. In MoBS, 2007.Google ScholarGoogle Scholar

Index Terms

  1. Tardis: affordable time-travel debugging in managed runtimes

    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

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 49, Issue 10
      OOPSLA '14
      October 2014
      907 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2714064
      • Editor:
      • Andy Gill
      Issue’s Table of Contents
      • cover image ACM Conferences
        OOPSLA '14: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications
        October 2014
        946 pages
        ISBN:9781450325851
        DOI:10.1145/2660193

      Copyright © 2014 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 15 October 2014

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!