Abstract
Infinite loops can make applications unresponsive. Potential problems include lost work or output, denied access to application functionality, and a lack of responses to urgent events. We present Jolt, a novel system for dynamically detecting and escaping infinite loops. At the user’s request, Jolt attaches to an application to monitor its progress. Specifically, Jolt records the program state at the start of each loop iteration. If two consecutive loop iterations produce the same state, Jolt reports to the user that the application is in an infinite loop. At the user’s option, Jolt can then transfer control to a statement following the loop, thereby allowing the application to escape the infinite loop and ideally continue its productive execution. The immediate goal is to enable the application to execute long enough to save any pending work, finish any in-progress computations, or respond to any urgent events.
We evaluated Jolt by applying it to detect and escape eight infinite loops in five benchmark applications. Jolt was able to detect seven of the eight infinite loops (the eighth changes the state on every iteration). We also evaluated the effect of escaping an infinite loop as an alternative to terminating the application. In all of our benchmark applications, escaping an infinite loop produced a more useful output than terminating the application. Finally, we evaluated how well escaping from an infinite loop approximated the correction that the developers later made to the application. For two out of our eight loops, escaping the infinite loop produced the same output as the corrected version of the application.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Exuberant ctags, http://ctags.sourceforge.net
GNU grep, http://www.gnu.org/software/grep
GNU indent, http://www.gnu.org/software/indent
GNU sed, http://www.gnu.org/software/sed
GStreamer, http://www.gstreamer.net
numpy, http://numpy.scipy.org
scipy, http://www.scipy.org
Bradley, A.R., Manna, Z., Sipma, H.B.: Termination of polynomial programs. In: International Conference on Verification, Model Checking, and Abstract Interpretation (2005)
Burnim, J., Jalbert, N., Stergiou, C., Sen, K.: Looper: Lightweight detection of infinite loops at runtime. In: International Conference on Automated Software Engineering (2009)
Colón, M.A., Sipma, H.B.: Practical methods for proving program termination. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, pp. 442–454. Springer, Heidelberg (2002)
Cook, B., Podelski, A., Rybalchenko, A.: Terminator: beyond safety. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 415–418. Springer, Heidelberg (2006)
Dallmeier, V., Zeller, A., Meyer, B.: Generating fixes from object behavior anomalies. In: International Conference on Automated Software Engineering (2009)
Demsky, B., Rinard, M.: Data structure repair using goal-directed reasoning. In: International Conference on Software Engineering (2005)
Gupta, A., Henzinger, T.A., Majumdar, R., Rybalchenko, A., Xu, R.G.: Proving non-termination. In: Symposium on Principles of Programming Languages (2008)
Hayashizaki, H., Wu, P., Inoue, H., Serrano, M., Nakatani, T.: Improving the performance of trace-based systems by false loop filtering. In: International Conference on Architectural Support for Programming Languages and Operating Systems (2011)
Lattner, C., Adve, V.: LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In: International Symposium on Code Generation and Optimization (2004)
Li, Z., Tan, L., Wang, X., Lu, S., Zhou, Y., Zhai, C.: Have things changed now? an empirical study of bug characteristics in modern open source software. In: Workshop on Architectural and System Support for Improving Software Dependability (2006)
Luk, C., Cohn, R., Muth, R., Patil, H., Klauser, A., Lowney, G., Wallace, S., Reddi, V., Hazelwood, K.: Pin: Building customized program analysis tools with dynamic instrumentation. In: Conference on Programming Language Design and Implementation (2005)
Metz, C.: Mozilla girds firefox with hang detector (June 2010), http://www.theregister.co.uk/2010/06/10/firefox_hang_detector/
Miller, B., Koski, D., Lee, C., Maganty, V., Murthy, R., Natarajan, A., Steidl, J.: Fuzz revisited: A re-examination of the reliability of Unix utilities and services. TR #1268, Computer Sciences Department, University of Wisconsin (1995)
Muchnick, S.: Advanced Compiler Design and Implementation (1997)
Nagarajan, V., Jeffrey, D., Gupta, R.: Self-recovery in server programs. In: International Symposium on Memory Management (2009)
Nethercote, N., Seward, J.: Valgrind A Program Supervision Framework. Electronic Notes in Theoretical Computer Science 89(2), 44–66 (2003)
Nguyen, H.H., Rinard, M.: Detecting and eliminating memory leaks using cyclic memory allocation. In: International Symposium on Memory Management (2007)
Palix, N., Thomas, G., Saha, S., Calvès, C., Lawall, J., Muller, G.: Faults in Linux: Ten years later. In: International Conference on Architectural Support for Programming Languages and Operating Systems (2011)
Perkins, J., Kim, S., Larsen, S., Amarasinghe, S., Bachrach, J., Carbin, M., Pacheco, C., Sherwood, F., Sidiroglou, S., Sullivan, G., Wong, W., Zibin, Y., Ernst, M., Rinard, M.: Automatically patching errors in deployed software. In: Symposium on Operating Systems Principles (2009)
Qin, F., Tucek, J., Sundaresan, J., Zhou, Y.: Rx: treating bugs as allergies—a safe method to survive software failures. In: Symposium on Operating Systems Principles (2005)
Rinard, M., Cadar, C., Dumitran, D., Roy, D.M., Leu, T., Beebee Jr., W.S.: Enhancing server availability and security through failure-oblivious computing. In: Symposium on Operating Systems Design and Implementation (2004)
Schulte, E., Forrest, S., Weimer, W.: Automated program repair through the evolution of assembly code. In: International Conference on Automated Software Engineering (2010)
Sidiroglou, S., Laadan, O., Perez, C., Viennot, N., Nieh, J., Keromytis, A.: Assure: automatic software self-healing using rescue points. In: International Conference on Architectural Support for Programming Languages and Operating Systems (2009)
Sidiroglou, S., Locasto, M., Boyd, S., Keromytis, A.: Building a reactive immune system for software services. In: USENIX Annual Technical Conference (2005)
Song, X., Chen, H., Zang, B.: Why software hangs and what can be done with it. In: International Conference on Dependable Systems and Networks (2010)
Spoto, F., Mesnard, F., Payet, É.: A termination analyzer for java bytecode based on path-length. Transactions on Programming Languages and Systems 32, 1–70 (2010)
Theiling, H.: Extracting safe and precise control flow from binaries. In: International Conference on Real-Time Systems and Applications (2000)
Velroyen, H., Rümmer, P.: Non-termination checking for imperative programs. In: International Conference on Tests and Proofs (2008)
Wei, Y., Pei, Y., Furia, C., Silva, L., Buchholz, S., Meyer, B., Zeller, A.: Automated fixing of programs with contracts. In: International Symposium on Software Testing and Analysis (2010)
Weimer, W., Nguyen, T.V., Le Goues, C., Forrest, S.: Automatically finding patches using genetic programming. In: International Conference on Software Engineering (2009)
Xiong, W., Park, S., Zhang, J., Zhou, Y., Ma, Z.: Ad hoc synchronization considered harmful. In: Symposium on Operating Systems Design and Implementation (2010)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Carbin, M., Misailovic, S., Kling, M., Rinard, M.C. (2011). Detecting and Escaping Infinite Loops with Jolt. In: Mezini, M. (eds) ECOOP 2011 – Object-Oriented Programming. ECOOP 2011. Lecture Notes in Computer Science, vol 6813. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22655-7_28
Download citation
DOI: https://doi.org/10.1007/978-3-642-22655-7_28
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-22654-0
Online ISBN: 978-3-642-22655-7
eBook Packages: Computer ScienceComputer Science (R0)