Deadlocks: From Exhibiting to Healing

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.

[1]  Rahul Agarwal,et al.  Run-time detection of potential deadlocks for programs with locks, semaphores, and condition variables , 2006, PADTAD '06.

[2]  Ference Belik An Efficient Deadlock Avoidance Rechnique , 1990, IEEE Trans. Computers.

[3]  Klaus Havelund,et al.  Confirmation of deadlock potentials detected by runtime analysis , 2006, PADTAD '06.

[4]  John Penix,et al.  Proceedings of the 7th International SPIN Workshop on SPIN Model Checking and Software Verification , 2000 .

[5]  Yosi Ben-Asher,et al.  Noise Makers Need to Know Where to be Silent – Producing Schedules That Find Bugs , 2006, Second International Symposium on Leveraging Applications of Formal Methods, Verification and Validation (isola 2006).

[6]  Michael D. Ernst,et al.  Static Deadlock Detection for Java Libraries , 2005, ECOOP.

[7]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multi-threaded programs , 1997, TOCS.

[8]  C. Pasareanu,et al.  Lifecycle Verification of the NASA Ames K 9 Rover Executive , 2004 .

[9]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[10]  Bruce H. Krogh,et al.  Deadlock avoidance in flexible manufacturing systems with concurrently competing process flows , 1990, IEEE Trans. Robotics Autom..

[11]  Shmuel Ur,et al.  ConTest listeners: a concurrency-oriented infrastructure for Java test and heal tools , 2007, SOQUA '07.

[12]  Eitan Farchi,et al.  Concurrent bug patterns and how to test them , 2003, Proceedings International Parallel and Distributed Processing Symposium.

[13]  Andrew P. Black ECOOP 2005 - Object-Oriented Programming, 19th European Conference, Glasgow, UK, July 25-29, 2005, Proceedings , 2005, ECOOP.

[14]  Rahul Agarwal,et al.  Detecting Potential Deadlocks with Static Analysis and Run-Time Monitoring , 2005, Haifa Verification Conference.

[15]  Klaus Havelund,et al.  SPIN Model Checking and Software Verification , 2000, Lecture Notes in Computer Science.

[16]  Scott William. Hammond Distributed deadlock detection in Concurrent C , 1988 .

[17]  César Sánchez,et al.  Efficient distributed deadlock avoidance with liveness guarantees , 2006, EMSOFT '06.

[18]  Eitan Farchi,et al.  Multithreaded Java program test generation , 2002, IBM Syst. J..

[19]  Tracy Camp,et al.  Time Efficient Deadlock Resolution Algorithms , 1999, Inf. Process. Lett..

[20]  Klaus Havelund,et al.  Using Runtime Analysis to Guide Model Checking of Java Programs , 2013, SPIN.

[21]  Klaus Havelund,et al.  Dynamic Deadlock Analysis of Multi-threaded Programs , 2005, Haifa Verification Conference.

[22]  Koushik Sen,et al.  CUTE and jCUTE: Concolic Unit Testing and Explicit Path Model-Checking Tools , 2006, CAV.