Abstract
Library writers wish to provide a guarantee not only that each procedure in the library performs correctly in isolation, but also that the procedures perform correctly when run in conjunction. To this end, we propose a method for static detection of deadlock in Java libraries. Our goal is to determine whether client code exists that may deadlock a library, and, if so, to enable the library writer to discover the calling patterns that can lead to deadlock.
Our flow-sensitive, context-sensitive analysis determines possible deadlock configurations using a lock-order graph. This graph represents the order in which locks are acquired by the library. Cycles in the graph indicate deadlock possibilities, and our tool reports all such possibilities. We implemented our analysis and evaluated it on 18 libraries comprising 1245 kLOC. We verified 13 libraries to be free from deadlock, and found 14 distinct deadlocks in 3 libraries.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Artho, C., Biere, A.: Applying static analysis to large-scale, multi-threaded Java programs. In: ASWEC, pp. 68–75 (2001)
Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: preventing data races and deadlocks. In: OOPSLA, pp. 211–230 (2002)
Breuer, P.T., Garcia-Valls, M.: Static deadlock detection in the Linux kernel. In: Ada-Europe, pp. 52–64 (2004)
Chaki, S., Clarke, E., Ouaknine, J., Sharygina, N.: Automated, compositional and iterative deadlock detection. In: MEMOCODE (2004)
Chaki, S., Clarke, E.M., Groce, A., Jha, S., Veith, H.: Modular verification of software components in C. IEEE TSE 30, 388–402 (2004)
Chase, D.R., Wegman, M., Zadeck, F.K.: Analysis of pointers and structures. In: PLDI (1990)
Corbett, J.C.: Evaluating deadlock detection methods for concurrent software. IEEE TSE 22, 161–180 (1996)
Demartini, C., Iosif, R., Sisto, R.: A deadlock detection tool for concurrent Java programs. Software: Practice and Experience 29, 577–603 (1999)
DMS Decision Management Systems GmbH: The Kopi Project (2004), http://www.dms.at/kopi/
Engler, D., Ashcraft, K.: RacerX: Effective, static detection of race conditions and deadlocks. In: SOSP, pp. 237–252 (2003)
Flanagan, C., Qadeer, S.: A type and effect system for atomicity. In: POPL, pp. 338–349 (2003)
Friedman-Hill, E.: Jess, the Java expert system shell (2004), http://herzberg.ca.sandia.gov/jess/
Havelund, K., Pressburger, T.: Model checking Java programs using Java PathFinder. STTT 2, 366–381 (2000)
Havelund, K.: Using runtime analysis to guide model checking of Java programs. In: SPIN, pp. 245–264 (2000)
Havelund, K., RoÅŸu, G.: Monitoring Java programs with Java PathExplorer. In: RV. (2001)
INRIA: Proactive (2004), http://www-sop.inria.fr/oasis/ProActive/
Knizhnik, K., Artho, C.: Jlint (2005), http://jlint.sourceforge.net/
Li, T., Ellis, C.S., Lebeck, A.R., Sorin, D.J.: Pulse: A dynamic deadlock detection mechanism using speculative execution. In: USENIX Technical Conference, pp. 31–44 (2005)
Masticola, S.P., Ryder, B.G.: A model of Ada programs for static deadlock detection in polynomial time. In: Workshop on Parallel and Distributed Debugging (1991)
San Diego State University: SDSU Java library (2004), http://www.eli.sdsu.edu/java-SDSU/
Shih, C.S., Stankovic, J.A.: Survey of deadlock detection in distributed concurrent programming environments and its application to real-time systems. Technical report, UMass UM-CS-1990-069 (1990)
Singhal, M.: Deadlock detection in distributed systems. IEEE Computer 22, 37–48 (1989)
Sun Microsystems, Inc.: Java Development Kit (2004), http://java.sun.com/
von Praun, C.: Detecting Synchronization Defects in Multi-Threaded Object-Oriented Programs. PhD thesis, Swiss Federal Institute of Technology, Zurich (2004)
Williams, A., Thies, W., Ernst, M.D.: Static deadlock detection in Java libraries. Research Abstract #102, MIT Computer Science and Artificial Intelligence Laboratory (February 2004)
Williams, A.L.: Static detection of deadlock for Java libraries. Master’s thesis, MIT Dept. of EECS (2005)
Zeng, F.: Deadlock resolution via exceptions for dependable Java applications. In: DSN, pp. 731–740 (2003)
Zeng, F., Martin, R.P.: Ghost locks: Deadlock prevention for Java. In: MASPLAS (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Williams, A., Thies, W., Ernst, M.D. (2005). Static Deadlock Detection for Java Libraries. In: Black, A.P. (eds) ECOOP 2005 - Object-Oriented Programming. ECOOP 2005. Lecture Notes in Computer Science, vol 3586. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11531142_26
Download citation
DOI: https://doi.org/10.1007/11531142_26
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-27992-1
Online ISBN: 978-3-540-31725-8
eBook Packages: Computer ScienceComputer Science (R0)