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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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)
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)
Holliday, J., El Abbadi, A.: Distributed deadlock detection. In: Encyclopedia of Distributed Computing. Kluwer Academic Publishers, Dordrecht (accepted for publication)
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)
Belik, F.: An efficient deadlock avoidance technique. IEEE Trans. Comput. 39(7) (1990)
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)
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)
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)
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
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)
Farchi, E., Nir-Buchbinder, Y., Ur, S.: Cross-run lock discipline checker for Java. In: PADTAD / Haifa Verification Conference (2005)
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)
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)
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)
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)
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)
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)
Terekhov, I., Camp, T.: Time efficient deadlock resolution algorithms. Information Processing Letters 69(3) (1999)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)