Abstract
This paper presents a dynamic program analysis algorithm that can detect deadlock potentials in a multi-threaded program by examining a single execution trace, obtained by running an instrumented version of the program. The algorithm is interesting because it can identify deadlock potentials even though no deadlocks occur in the examined execution, and therefore it scales very well in contrast to more formal approaches to deadlock detection. It is an improvement of an existing algorithm in that it reduces the number of false positives (false warnings). The paper describes an implementation and an application to three case studies.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Agarwal, R., Wang, L., Stoller, S.D.: Detecting Potential Deadlocks with Static Analysis and Run-Time Monitoring. In: Proceedings of the Parallel and Distribute Systems: Testing and Debugging (PADTAD) track of the 2005 IBM Verification Conference, Haifa, Israel. Springer, Heidelberg (2005)
Arnold, K., Gosling, J.: The Java Programming Language. Addison-Wesley, Reading (1996)
Artho, C., Biere, A.: Applying Static Analysis to Large-Scale, Multi-threaded Java Programs. In: Grant, D. (ed.) 13th Australien Software Engineering Conference, pp. 68–75. IEEE Computer Society, Los Alamitos (2001)
Artho, C., Havelund, K., Biere, A.: High-level Data Races. Software Testing. Verification and Reliability (STVR) 13(4) (December 2003)
Artho, C., Havelund, K., Biere, A.: Using Block-Local Atomicity to Detect Stale-Value Concurrency Errors. In: 2nd International Symposium on Automated Technology for Verification and Analysis, Taiwan, October-November (2004)
Ball, T., Podelski, A., Rajamani, S.: Boolean and Cartesian Abstractions for Model Checking C Programs. In: Margaria, T., Yi, W. (eds.) TACAS 2001. LNCS, vol. 2031, p. 268. Springer, Heidelberg (2001)
Barringer, H., Goldberg, A., Havelund, K., Sen, K.: Rule-Based Runtime Verification. In: Steffen, B., Levi, G. (eds.) VMCAI 2004. LNCS, vol. 2937, pp. 44–57. Springer, Heidelberg (2004)
Bensalem, S., Havelund, K.: Reducing False Positives in Runtime Analysis of Deadlocks. Internal report, NASA Ames Research Center (October 2002)
Brat, G., Drusinsky, D., Giannakopoulou, D., Goldberg, A., Havelund, K., Lowry, M., Pasareanu, C., Visser, W., Washington, R.: Experimental Evaluation of Verification and Validation Tools on Martian Rover Software. Formal Methods in System Design 25(2) (2004)
Corbett, J., Dwyer, M.B., Hatcliff, J., Pasareanu, C.S.: Bandera: Extracting Finite-state Models from Java Source Code. In: Proceedings of the 22nd International Conference on Software Engineering, Limerich, Ireland, June 2000. ACM Press, New York (2000)
Detlefs, D.L., Rustan, K., Leino, M., Nelson, G., Saxe, J.B.: Extended Static Checking. Technical Report 159, Compaq Systems Research Center, Palo Alto, California, USA (1998)
Edelstein, O., Farchi, E., Nir, Y., Ratsaby, G., Ur, S.: Multithreaded Java Program Test Generation. Software Testing and Verification 41(1) (2002)
Farchi, E., Nir-Buchbinder, Y., Ur, S.: A Cross-Run Lock Discipline Checker for Java. In: Tool presented at the Parallel and Distributed Systems: Testing and Debugging (PADTAD) track of the 2005 IBM Verification Conference, Haifa, Israel (November 2005), Tool is available at http://alphaworks.ibm.com/tech/contest
Godefroid, P.: Model Checking for Programming Languages using VeriSoft. In: Proceedings of the 24th ACM Symposium on Principles of Programming Languages, Paris, France, January 1997, pp. 174–186 (1997)
Goldberg, A., Havelund, K.: Instrumentation of Java Bytecode for Runtime Analysis. In: Proc. Formal Techniques for Java-like Programs. Technical Reports from ETH Zurich, vol. 408. ETH Zurich, Switzerland (2003)
Harrow, J.: Runtime Checking of Multithreaded Applications with Visual Threads. In: Havelund, K., Penix, J., Visser, W. (eds.) SPIN 2000. LNCS, vol. 1885, pp. 331–342. Springer, Heidelberg (2000)
Havelund, K.: Using Runtime Analysis to Guide Model Checking of Java Programs. In: Havelund, K., Penix, J., Visser, W. (eds.) SPIN 2000. LNCS, vol. 1885, pp. 245–264. Springer, Heidelberg (2000)
Havelund, K., Pressburger, T.: Model Checking Java Programs using Java PathFinder. International Journal on Software Tools for Technology Transfer 2(4), 366–381 (April 2000); Special issue of STTT containing selected submissions to the 4th SPIN workshop, Paris, France (1998)
Havelund, K., Ro¸su, G.: Monitoring Java Programs with Java PathExplorer. In: Proceedings of the First International Workshop on Runtime Verification (RV 2001), Paris, France, July 2001. Electronic Notes in Theoretical Computer Science, vol. 55, pp. 97–114. Elsevier Science, Amsterdam (2001)
Havelund, K., Ro¸su, G.: An Overview of the Runtime Verification Tool Java PathExplorer. Formal Methods in System Design 24(2) (March 2004); Extended version of [19]
Holzmann, G.J., Smith, M.H.: A Practical Method for Verifying Event-Driven Software. In: Proceedings of ICSE 1999, International Conference on Software Engineering, Los Angeles, California, USA, May 1999. IEEE/ACM (1999)
Knapp, E.: Deadlock Detection in Distributed Database Systems. ACM Computing Surveys, 303–328 (December 1987)
Lea, D.: Concurrent Programming in Java, Design Principles and Patterns. Addison-Wesley, Reading (1997)
Park, D., Stern, U., Skakkebaek, J., Dill, D.: Java Model Checking. In: Proceedings of the 15th IEEE International Conference on Automated Software Engineering, September 2000, pp. 253–256 (2000)
PolySpace. An Automatic Run-Time Error Detection Tool, http://www.polyspace.com
Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.: Eraser: A Dynamic Data Race Detector for Multithreaded Programs. ACM Transactions on Computer Systems 15(4), 391–411 (1997)
Singhal, M.: Deadlock Detection in Distributed Systems. IEEE Computer, 37–48 (November 1989)
Stoller, S.D.: Model-Checking Multi-threaded Distributed Java Programs. In: Havelund, K., Penix, J., Visser, W. (eds.) SPIN 2000. LNCS, vol. 1885, pp. 224–244. Springer, Heidelberg (2000)
Visser, W., Havelund, K., Brat, G., Park, S., Lerda, F.: Model Checking Programs. Automated Software Engineering 10(2) (April 2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bensalem, S., Havelund, K. (2006). Dynamic Deadlock Analysis of Multi-threaded Programs. In: Ur, S., Bin, E., Wolfsthal, Y. (eds) Hardware and Software, Verification and Testing. HVC 2005. Lecture Notes in Computer Science, vol 3875. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11678779_15
Download citation
DOI: https://doi.org/10.1007/11678779_15
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-32604-5
Online ISBN: 978-3-540-32605-2
eBook Packages: Computer ScienceComputer Science (R0)