Abstract
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.
- R. Agarwal, L. Wang, and S. D. Stoller. Detecting potential deadlocks with static analysis and runtime monitoring. In Parallel and Distributed Systems: Testing and Debugging 2005, 2005.Google Scholar
- C. Artho and A. Biere. Applying static analysis to large-scale, multi-threaded Java programs. In Proceedings of the 13th Australian Software Engineering Conference (ASWEC'01), pages 68--75, 2001. Google Scholar
Digital Library
- S. Bensalem, J.-C. Fernandez, K. Havelund, and L. Mounier. Confirmation of deadlock potentials detected by runtime analysis. In PADTAD'06, pages 41--50, 2006. Google Scholar
Digital Library
- S. Bensalem and K. Havelund. Scalable dynamic deadlock analysis of multi-threaded programs. In Parallel and Distributed Systems: Testing and Debugging 2005 (PADTAD'05), 2005.Google Scholar
- C. Boyapati, R. Lee, and M. Rinard. Ownership types for safe programming: preventing data races and deadlocks. In 17th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 211--230, 2002. Google Scholar
Digital Library
- S. Chaki, E. Clarke, J. Ouaknine, N. Sharygina, and N. Sinha. Concurrent software verification with states, events, and deadlocks. Formal Aspects of Computing, 17(4):461--483, 2005.Google Scholar
Cross Ref
- C. Demartini, R. Iosif, and R. Sisto. A deadlock detection tool for concurrent java programs. Software -- Practice and Experience, 29(7):577--603, 1999. Google Scholar
Digital Library
- O. Edelstein, E. Farchi, Y. Nir, G. Ratsaby, , and S. Ur. Multithreaded Java program test generation. IBM Systems Journal, 41(1):111--125, 2002. Google Scholar
Digital Library
- D. R. Engler and K. Ashcraft. Racerx: effective, static detection of race conditions and deadlocks. In 19th ACM Symposium on Operating Systems Principles (SOSP), pages 237--252, 2003. Google Scholar
Digital Library
- C. Flanagan, K. R. M. Leino, M. Lillibridge, G. Nelson, J. B. Saxe, and R. Stata. Extended static checking for java. In PLDI'02: Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, pages 234--245. ACM, 2002. Google Scholar
Digital Library
- P. Godefroid. Model checking for programming languages using verisoft. In 24th Symposium on Principles of Programming Languages, pages 174--186, 1997. Google Scholar
Digital Library
- J. Harrow. Runtime checking of multithreaded applications with visual threads. In 7th International SPIN Workshop on Model Checking and Software Verification, pages 331--342, 2000. Google Scholar
Digital Library
- K. Havelund. Using runtime analysis to guide model checking of java programs. In 7th International SPIN Workshop on Model Checking and Software Verification, pages 245--264, 2000. Google Scholar
Digital Library
- K. Havelund and T. Pressburger. Model Checking Java Programs using Java PathFinder. Int. Journal on Software Tools for Technology Transfer, 2(4):366--381, 2000.Google Scholar
Cross Ref
- G. Holzmann. The Spin model checker. IEEE Transactions on Software Engineering, 23(5):279---295, 1997. Google Scholar
Digital Library
- P. Joshi, M. Naik, C.-S. Park, and K. Sen. An extensible active testing framework for concurrent programs. In 21st International Conference on Computer Aided Verification (CAV'09), Lecture Notes in Computer Science. Springer, 2009. Google Scholar
Digital Library
- H. Jula, D. Tralamazza, C. Zamfir, and G. Candea. Deadlock immunity: Enabling systems to defend against deadlocks. In Proceedings of the 8th USENIX Symposium on Operating Systems Design and Implementation (OSDI'08), 2008. Google Scholar
Digital Library
- L. Lamport. Time, clocks, and the ordering of events in a distributed system. Commun. ACM, 21(7):558--565, 1978. Google Scholar
Digital Library
- S. Masticola. Static detection of deadlocks in polynomial time. PhD thesis, Rutgers University, 1993. Google Scholar
Digital Library
- A. Milanova, A. Rountev, and B. Ryder. Parameterized object sensitivity for points-to analysis for Java. ACM Transactions on Software Engineering and Methodology, 14(1):1--41, Jan. 2005. Google Scholar
Digital Library
- M. Naik, C.-S. Park, K. Sen, and D. Gay. Effective static deadlock detection. In 31st International Conference on Software Engineering (ICSE'09). IEEE, 2009. Google Scholar
Digital Library
- Y. Nir-Buchbinder, R. Tzoref, and S. Ur. Deadlocks: From exhibiting to healing. In 8th Workshop on Runtime Verification, 2008. Google Scholar
Digital Library
- C.-S. Park and K. Sen. Randomized active atomicity violation detection in concurrent programs. In 16th International Symposium on Foundations of Software Engineering (FSE'08). ACM, 2008. Google Scholar
Digital Library
- F. Qin, J. Tucek, J. Sundaresan, and Y. Zhou. Rx: treating bugs as allergies -- a safe method to survive software failures. In SOSP'05: Proceedings of the twentieth ACM symposium on Operating systems principles, pages 235--248. ACM, 2005. Google Scholar
Digital Library
- K. Sen. Race directed random testing of concurrent programs. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'08), 2008. Google Scholar
Digital Library
- S. D. Stoller. Testing concurrent Java programs using randomized scheduling. In Workshop on Runtime Verification (RV'02), volume 70 of ENTCS, 2002.Google Scholar
Cross Ref
- C. von Praun. Detecting Synchronization Defects in Multi-Threaded Object-Oriented Programs. PhD thesis, Swiss Federal Institute of Technology, Zurich, 2004.Google Scholar
- C. von Praun and T. R. Gross. Object race detection. In 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications (OOPSLA), pages 70--82. ACM, 2001. Google Scholar
Digital Library
- A. Williams, W. Thies, and M. Ernst. Static deadlock detection for Java libraries. In ECOOP 2005 -- 19th European Conference on Object--Oriented Programming (ECOOP'05), pages 602--629, 2005. Google Scholar
Digital Library
- B. Xin, W. N. Sumner, and X. Zhang. Efficient program execution indexing. In ACM SIGPLAN conference on Programming language design and implementation, pages 238--248, 2008. Google Scholar
Digital Library
Index Terms
A randomized dynamic program analysis technique for detecting real deadlocks
Recommendations
An effective dynamic analysis for detecting generalized deadlocks
FSE '10: Proceedings of the eighteenth ACM SIGSOFT international symposium on Foundations of software engineeringWe present an effective dynamic analysis for finding a broad class of deadlocks, including the well-studied lock-only deadlocks as well as the less-studied, but no less widespread or insidious, deadlocks involving condition variables. Our analysis ...
A randomized dynamic program analysis technique for detecting real deadlocks
PLDI '09: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and ImplementationWe 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 ...
Multithreaded test synthesis for deadlock detection
OOPSLA '14Designing and implementing thread-safe multithreaded libraries can be a daunting task as developers of these libraries need to ensure that their implementations are free from concurrency bugs, including deadlocks. The usual practice involves employing ...







Comments