A randomized dynamic program analysis technique for detecting real deadlocks

We present a novel dynamic analysis technique that finds real deadlocks in multi-threaded programs. Our technique runs in two stages. In the first stage, we use an imprecise dynamic analysis technique to find potential deadlocks in a multi-threaded program by observing an execution of the program. In the second stage, we control a random thread scheduler to create the potential deadlocks with high probability. Unlike other dynamic analysis techniques, our approach has the advantage that it does not give any false warnings. We have implemented the technique in a prototype tool for Java, and have experimented on a number of large multi-threaded Java programs. We report a number of previously known and unknown real deadlocks that were found in these benchmarks.

[1]  Scott D. Stoller,et al.  Testing Concurrent Java Programs using Randomized Scheduling , 2002, RV@FLoC.

[2]  LamportLeslie Time, clocks, and the ordering of events in a distributed system , 1978 .

[3]  Gerard J. Holzmann,et al.  The Model Checker SPIN , 1997, IEEE Trans. Software Eng..

[4]  Koushik Sen,et al.  CalFuzzer: An Extensible Active Testing Framework for Concurrent Programs , 2009, CAV.

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

[6]  Leslie Lamport,et al.  Time, clocks, and the ordering of events in a distributed system , 1978, CACM.

[7]  Patrice Godefroid,et al.  Model checking for programming languages using VeriSoft , 1997, POPL '97.

[8]  Jerry J. Harrow Runtime Checking of Multithreaded Applications with Visual Threads , 2000, SPIN.

[9]  Bensalem Saddek,et al.  SCALABLE DYNAMIC DEADLOCK ANALYSIS OF MULTI-THREADED PROGRAMS , 2005 .

[10]  Claudio Demartini,et al.  A deadlock detection tool for concurrent Java programs , 1999, Softw. Pract. Exp..

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

[12]  Joël Ouaknine,et al.  Concurrent software verification with states, events, and deadlocks , 2005, Formal Aspects of Computing.

[13]  Shmuel Ur,et al.  Deadlocks: From Exhibiting to Healing , 2008, RV.

[14]  Koushik Sen,et al.  Randomized active atomicity violation detection in concurrent programs , 2008, SIGSOFT '08/FSE-16.

[15]  Koushik Sen,et al.  Race directed random testing of concurrent programs , 2008, PLDI '08.

[16]  Christoph von Praun,et al.  Detecting synchronization defects in multi-threaded object-oriented programs , 2004 .

[17]  Klaus Havelund,et al.  Model checking JAVA programs using JAVA PathFinder , 2000, International Journal on Software Tools for Technology Transfer.

[18]  Mark Lillibridge,et al.  Extended static checking for Java , 2002, PLDI '02.

[19]  Stephen P. Masticola,et al.  Static detection of deadlocks in polynomial time , 1993 .

[20]  G RyderBarbara,et al.  Parameterized object sensitivity for points-to analysis for Java , 2005 .

[21]  Gerard J. Holzmann,et al.  The SPIN Model Checker , 2003 .

[22]  Thomas R. Gross,et al.  Object race detection , 2001, OOPSLA '01.

[23]  Armin Biere,et al.  Applying static analysis to large-scale, multi-threaded Java programs , 2001, Proceedings 2001 Australian Software Engineering Conference.

[24]  Dawson R. Engler,et al.  RacerX: effective, static detection of race conditions and deadlocks , 2003, SOSP '03.

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

[26]  Barbara G. Ryder,et al.  Parameterized object sensitivity for points-to analysis for Java , 2005, TSEM.

[27]  Xiangyu Zhang,et al.  Efficient program execution indexing , 2008, PLDI '08.

[28]  David Gay,et al.  Effective static deadlock detection , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[29]  Radu Iosif,et al.  A deadlock detection tool for concurrent Java programs , 1999, Softw. Pract. Exp..

[30]  Horatiu Jula,et al.  Deadlock Immunity: Enabling Systems to Defend Against Deadlocks , 2008, OSDI.

[31]  Martin C. Rinard,et al.  ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), November 2002 Ownership Types for Safe Programming: Preventing Data Races and Deadlocks , 2022 .

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

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