Skip to main content

Static Deadlock Detection for Java Libraries

  • Conference paper
ECOOP 2005 - Object-Oriented Programming (ECOOP 2005)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 3586))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Artho, C., Biere, A.: Applying static analysis to large-scale, multi-threaded Java programs. In: ASWEC, pp. 68–75 (2001)

    Google Scholar 

  2. Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: preventing data races and deadlocks. In: OOPSLA, pp. 211–230 (2002)

    Google Scholar 

  3. Breuer, P.T., Garcia-Valls, M.: Static deadlock detection in the Linux kernel. In: Ada-Europe, pp. 52–64 (2004)

    Google Scholar 

  4. Chaki, S., Clarke, E., Ouaknine, J., Sharygina, N.: Automated, compositional and iterative deadlock detection. In: MEMOCODE (2004)

    Google Scholar 

  5. Chaki, S., Clarke, E.M., Groce, A., Jha, S., Veith, H.: Modular verification of software components in C. IEEE TSE 30, 388–402 (2004)

    Google Scholar 

  6. Chase, D.R., Wegman, M., Zadeck, F.K.: Analysis of pointers and structures. In: PLDI (1990)

    Google Scholar 

  7. Corbett, J.C.: Evaluating deadlock detection methods for concurrent software. IEEE TSE 22, 161–180 (1996)

    Google Scholar 

  8. Demartini, C., Iosif, R., Sisto, R.: A deadlock detection tool for concurrent Java programs. Software: Practice and Experience 29, 577–603 (1999)

    Article  Google Scholar 

  9. DMS Decision Management Systems GmbH: The Kopi Project (2004), http://www.dms.at/kopi/

  10. Engler, D., Ashcraft, K.: RacerX: Effective, static detection of race conditions and deadlocks. In: SOSP, pp. 237–252 (2003)

    Google Scholar 

  11. Flanagan, C., Qadeer, S.: A type and effect system for atomicity. In: POPL, pp. 338–349 (2003)

    Google Scholar 

  12. Friedman-Hill, E.: Jess, the Java expert system shell (2004), http://herzberg.ca.sandia.gov/jess/

  13. Havelund, K., Pressburger, T.: Model checking Java programs using Java PathFinder. STTT 2, 366–381 (2000)

    MATH  Google Scholar 

  14. Havelund, K.: Using runtime analysis to guide model checking of Java programs. In: SPIN, pp. 245–264 (2000)

    Google Scholar 

  15. Havelund, K., RoÅŸu, G.: Monitoring Java programs with Java PathExplorer. In: RV. (2001)

    Google Scholar 

  16. INRIA: Proactive (2004), http://www-sop.inria.fr/oasis/ProActive/

  17. Knizhnik, K., Artho, C.: Jlint (2005), http://jlint.sourceforge.net/

  18. 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)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. San Diego State University: SDSU Java library (2004), http://www.eli.sdsu.edu/java-SDSU/

  21. 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)

    Google Scholar 

  22. Singhal, M.: Deadlock detection in distributed systems. IEEE Computer 22, 37–48 (1989)

    Google Scholar 

  23. Sun Microsystems, Inc.: Java Development Kit (2004), http://java.sun.com/

  24. von Praun, C.: Detecting Synchronization Defects in Multi-Threaded Object-Oriented Programs. PhD thesis, Swiss Federal Institute of Technology, Zurich (2004)

    Google Scholar 

  25. 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)

    Google Scholar 

  26. Williams, A.L.: Static detection of deadlock for Java libraries. Master’s thesis, MIT Dept. of EECS (2005)

    Google Scholar 

  27. Zeng, F.: Deadlock resolution via exceptions for dependable Java applications. In: DSN, pp. 731–740 (2003)

    Google Scholar 

  28. Zeng, F., Martin, R.P.: Ghost locks: Deadlock prevention for Java. In: MASPLAS (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics