Practical Object-Oriented Back-in-Time Debugging

  • Adrian Lienhard
  • Tudor Gîrba
  • Oscar Nierstrasz
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5142)

Abstract

Back-in-time debuggers are extremely useful tools for identifying the causes of bugs. Unfortunately the “omniscient” approaches that try to remember all previous states are impractical because they consume too much space or they are far too slow. Several approaches rely on heuristics to limit these penalties, but they ultimately end up throwing out too much relevant information. In this paper we propose a practical approach that attempts to keep track of only the relevant data. In contrast to other approaches, we keep object history information together with the regular objects in the application memory. Although seemingly counter-intuitive, this approach has the effect that data not reachable from current application objects (and hence, no longer relevant) is garbage collected. We describe the technical details of our approach, and we present benchmarks that demonstrate that memory consumption stays within practical bounds. Furthermore, the performance penalty is significantly less than with other approaches.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Zeller, A.: Why Programs Fail: A Guide to Systematic Debugging. Morgan Kaufmann, San Francisco (2005)Google Scholar
  2. 2.
    Liblit, B., Naik, M., Zheng, A.X., Aiken, A., Jordan, M.I.: Scalable statistical bug isolation. In: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation (PLDI 2005), pp. 15–26. ACM, New York (2005)CrossRefGoogle Scholar
  3. 3.
    Lewis, B.: Debugging backwards in time. In: Proceedings of the Fifth International Workshop on Automated Debugging (AADEBUG 2003) (October 2003)Google Scholar
  4. 4.
    Pothier, G., Tanter, E., Piquer, J.: Scalable omniscient debugging. In: Proceedings of the 22nd Annual SCM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2007). ACM, New York (to appear, 2007)Google Scholar
  5. 5.
    Hofer, C., Denker, M., Ducasse, S.: Design and implementation of a backward-in-time debugger. In: Proceedings of NODE 2006, September 2006. Lecture Notes in Informatics, vol. P-88, pp. 17–32. Gesellschaft für Informatik (GI) (2006)Google Scholar
  6. 6.
    Maruyama, K., Terada, M.: Debugging with reverse watchpoint. In: Proceedings of the Third International Conference on Quality Software (QSIC 2003), p. 116. IEEE Computer Society, Washington (2003)CrossRefGoogle Scholar
  7. 7.
    Lienhard, A., Greevy, O., Nierstrasz, O.: Tracking objects to detect feature dependencies. In: Proceedings International Conference on Program Comprehension (ICPC 2007), June 2007, pp. 59–68. IEEE Computer Society, Washington (2007)CrossRefGoogle Scholar
  8. 8.
    Lienhard, A., Ducasse, S., Gîrba, T.: Object flow analysis — taking an object-centric view on dynamic analysis. In: Proceedings of the 2007 International Conference on Dynamic Languages (ICDL 2007), pp. 121–140. ACM Digital Library, New York (2007)CrossRefGoogle Scholar
  9. 9.
    Lienhard, A., Gîrba, T., Greevy, O., Nierstrasz, O.: Test blueprints – exposing side effects in execution traces to support writing unit tests. In: 12th European Conference on Software Maintenance and Reengineering (CSMR 2008), pp. 83–92. IEEE Computer Society Press, Los Alamitos (2008)CrossRefGoogle Scholar
  10. 10.
    Alpern, B., Attanasio, C.R., Cocchi, A., Lieber, D., Smith, S., Ngo, T., Barton, J.J., Hummel, S.F., Sheperd, J.C., Mergen, M.: Implementing jalapeño in java. In: Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA 1999), pp. 314–324. ACM, New York (1999)CrossRefGoogle Scholar
  11. 11.
    Ingalls, D., Kaehler, T., Maloney, J., Wallace, S., Kay, A.: Back to the future: The story of Squeak, a practical Smalltalk written in itself. In: Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA 1997), November 1997, pp. 318–326. ACM Press, New York (1997)CrossRefGoogle Scholar
  12. 12.
    Bracha, G., Ungar, D.: Mirrors: design principles for meta-level facilities of object-oriented programming languages. In: Proceedings of OOPSLA 2004, ACM SIGPLAN Notices, pp. 331–344. ACM Press, New York (2004)Google Scholar
  13. 13.
    Goldberg, A., Robson, D.: Smalltalk 80: the Language and its Implementation. Addison-Wesley, Reading (1983)MATHGoogle Scholar
  14. 14.
    Kanji, G.K.: 100 Statistical Tests. SAGE Publications, Thousand Oaks (1999)Google Scholar
  15. 15.
    Bond, M.D., Nethercote, N., Kent, S.W., Guyer, S.Z., McKinley, K.S.: Tracking bad apples: reporting the origin of null and undefined value errors. In: Proceedings of the 22nd annual ACM SIGPLAN conference on Object oriented programming systems and applications (OOPSLA 2007), pp. 405–422. ACM, New York (2007)CrossRefGoogle Scholar
  16. 16.
    Lieberman, H., Fry, C.: ZStep 95: A reversible, animated source code stepper. In: Stasko, J., Domingue, J., Brown, M.H., Price, B.A. (eds.) Software Visualization — Programming as a Multimedia Experience, pp. 277–292. MIT Press, Cambridge (1998)Google Scholar
  17. 17.
    Martin, M., Livshits, B., Lam, M.S.: Finding application errors and security flaws using pql: a program query language. In: Proceedings of Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2005), pp. 363–385. ACM Press, New York (2005)Google Scholar
  18. 18.
    Lencevicius, R., Hölzle, U., Singh, A.K.: Query-based debugging of object-oriented programs. In: Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming (OOPSLA 1997), pp. 304–317. ACM, New York (1997)CrossRefGoogle Scholar
  19. 19.
    Potanin, A., Noble, J., Biddle, R.: Snapshot query-based debugging. In: Proceedings of the 2004 Australian Software Engineering Conference (ASWEC 2004), p. 251. IEEE Computer Society, Washington (2004)Google Scholar
  20. 20.
    Ducasse, S., Gîrba, T., Wuyts, R.: Object-oriented legacy system trace-based logic testing. In: Proceedings of 10th European Conference on Software Maintenance and Reengineering (CSMR 2006), pp. 35–44. IEEE Computer Society Press, Los Alamitos (2006)Google Scholar
  21. 21.
    Lencevicius, R., Hölzle, U., Singh, A.K.: Dynamic query-based debugging. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 135–160. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  22. 22.
    Feldman, S.I., Brown, C.B.: Igor: a system for program debugging via reversible execution. In: Proceedings of the 1988 ACM SIGPLAN and SIGOPS workshop on Parallel and distributed debugging (PADD 1988), pp. 112–123. ACM, New York (1988)CrossRefGoogle Scholar
  23. 23.
    Boothe, B.: Efficient algorithms for bidirectional debugging. In: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation (PLDI 2000), pp. 299–310. ACM, New York (2000)CrossRefGoogle Scholar
  24. 24.
    Xu, G., Rountev, A., Tang, Y., Qin, F.: Efficient checkpointing of java software using contextsensitive capture and replay. In: Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering (ESEC-FSE 2007), pp. 85–94. ACM, New York (2007)CrossRefGoogle Scholar
  25. 25.
    Demetrescu, C., Finocchi, I.: A portable virtual machine for program debugging and directing. In: Proceedings of the 2004 ACM symposium on Applied computing (SAC 2004), pp. 1524–1530. ACM, New York (2004)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Adrian Lienhard
    • 1
  • Tudor Gîrba
    • 1
  • Oscar Nierstrasz
    • 1
  1. 1.Software Composition GroupUniversity of BernSwitzerland

Personalised recommendations