Skip to main content

Deadlocks: From Exhibiting to Healing

  • Conference paper

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

Abstract

Deadlocks are possibly the best known bug pattern in computer systems in general; certainly they are the best known in concurrent programming. Numerous articles, some dating back more than 40 years, have been dedicated to the questions of how to design deadlock free programs, how to statically or dynamically detect possible deadlocks, how to avoid deadlocks at runtime, and how to resolve deadlocks once they happen. We start the paper with an investigation on how to exhibit potential deadlocks. Exhibiting deadlocks is very useful in testing, as verifying if a potential deadlock can actually happen is a time-consuming debugging activity. There was recently some very interesting research in this direction; however, we believe our approach is more practical, has no scaling issues, and in fact is already industry-ready.

The second contribution of our paper is in the area of healing multi-threaded programs so they do not get into deadlocks. This is an entirely new approach, which is very different from the approaches in the literature that were meant for multi-process scenarios and are not suitable (and indeed not used) in multithreaded programming. While the basic ideas are fairly simple, the details here are very important as any mistake is liable to actually create new deadlocks. The paper describes the basic healing idea and its limitations, the pitfalls and how to overcome them, and experimental results.

This work is partially supported by the European Community under the Information Society Technologies (IST) programme of the 6th FP for RTD - project SHADOWS contract IST-035157. The authors are solely responsible for the content of this paper. It does not represent the opinion of the European Community, and the European Community is not responsible for any use that might be made of data appearing therein.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. http://msdn2.microsoft.com/en-us/library/ms792855.aspx

  2. Agarwal, R., Stoller, S.D.: Run-time detection of potential deadlocks for programs with locks, semaphores, and condition variables. In: PADTAD 2006: Proceeding of the 2006 workshop on Parallel and distributed systems: testing and debugging (2006)

    Google Scholar 

  3. Agarwal, R., Wang, L., Stoller, S.D.: Detecting potential deadlocks with static analysis and run-time monitoring. In: Proceedings of the Parallel and Distributed Systems: Testing and Debugging track of the 2005 IBM Verification Conference (2005)

    Google Scholar 

  4. Holliday, J., El Abbadi, A.: Distributed deadlock detection. In: Encyclopedia of Distributed Computing. Kluwer Academic Publishers, Dordrecht (accepted for publication)

    Google Scholar 

  5. Banaszak, Z.A., Krogh, B.H.: Deadlock avoidance in flexible manufacturing systems with concurrently competing process flows. IEEE Transactions on Robotics and Automation 6(6) (1990)

    Google Scholar 

  6. Belik, F.: An efficient deadlock avoidance technique. IEEE Trans. Comput. 39(7) (1990)

    Google Scholar 

  7. Ben-Asher, Y., Eytani, Y., Farchi, E., Ur, S.: Noise makers need to know where to be silent - producing schedules that find bugs. In: International Symposium on Leveraging Applications of Formal Methods, Verification and Validation (ISOLA) (2006)

    Google Scholar 

  8. Bensalem, S., Fernandez, J.-C., Havelund, K., Mounier, L.: Confirmation of deadlock potentials detected by runtime analysis. In: PADTAD 2006: Proceeding of the 2006 workshop on Parallel and distributed systems: testing and debugging (2006)

    Google Scholar 

  9. Bensalem, S., Havelund, K.: Dynamic deadlock analysis of multi-threaded programs. In: Ur, S., Bin, E., Wolfsthal, Y. (eds.) HVC 2005. LNCS, vol. 3875. Springer, Heidelberg (2006)

    Google Scholar 

  10. Edelstein, O., Farchi, E., Nir, Y., Ratsaby, G., Ur, S.: Multithreaded Java program test generation. IBM Systems Journal 41(1) (2002), http://alphaworks.ibm.com/tech/contest

  11. Farchi, E., Nir, Y., Ur, S.: Concurrent bug patterns and how to test them. In: IPDPS 2003: Proceedings of the 17th International Symposium on Parallel and Distributed Processing. IEEE Computer Society, Los Alamitos (2003)

    Google Scholar 

  12. Farchi, E., Nir-Buchbinder, Y., Ur, S.: Cross-run lock discipline checker for Java. In: PADTAD / Haifa Verification Conference (2005)

    Google Scholar 

  13. Giannakopoulou1, D., Pasareanu, C.S., Lowry, M., Washington, R.: Lifecycle verification of the NASA Ames K9 Rover Executive. In: ICAPS 2005: Workshop on Verification and Validation of Model-Based Planning and Scheduling Systems (2005)

    Google Scholar 

  14. Havelund, K.: Using runtime analysis to guide model checking of java programs. In: Proceedings of the 7th International SPIN Workshop on SPIN Model Checking and Software Verification. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  15. Nir-Buchbinder, Y., Ur, S.: ConTest Listeners: a concurrency-oriented infrastructure for java test and heal tools. In: Fourth International Workshop on Software Quality Assurance (2007)

    Google Scholar 

  16. Sánchez, C., Sipma, H.B., Manna, Z., Gill, C.D.: Efficient distributed deadlock avoidance with liveness guarantees. In: EMSOFT 2006: Proceedings of the 6th ACM & IEEE International conference on Embedded software (2006)

    Google Scholar 

  17. Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.: Eraser: a dynamic data race detector for multi-threaded programs. In: SOSP 1997: Proceedings of the sixteenth ACM symposium on Operating systems principles (1997)

    Google Scholar 

  18. Sen, K., Agha, G.: Cute and jcute: Concolic unit testing and explicit path model-checking tools. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144. Springer, Heidelberg (2006)

    Google Scholar 

  19. Terekhov, I., Camp, T.: Time efficient deadlock resolution algorithms. Information Processing Letters 69(3) (1999)

    Google Scholar 

  20. Williams, A., Thies, W., Ernst, M.D.: Static deadlock detection for Java libraries. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Nir-Buchbinder, Y., Tzoref, R., Ur, S. (2008). Deadlocks: From Exhibiting to Healing. In: Leucker, M. (eds) Runtime Verification. RV 2008. Lecture Notes in Computer Science, vol 5289. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-89247-2_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-89247-2_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-89246-5

  • Online ISBN: 978-3-540-89247-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics