skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Functional

Sound deadlock prediction

Published:24 October 2018Publication History
Skip Abstract Section

Abstract

For a concurrent program, a prediction tool maps the history of a single run to a prediction of bugs in an exponential number of other runs. If all those bugs can occur, then the tool is sound. This is the case for some data race tools like RVPredict, but was, until now, not the case for deadlock tools. We present the first sound tool for predicting deadlocks in Java. Unlike previous work, we use request events and a novel form of executability constraints that enable sound and effective deadlock prediction. We model prediction as a general decision problem, which we show is decidable and can be instantiated to both deadlocks and data races. Our proof of decidability maps the decision problem to an equivalent constraint problem that we solve using an SMT-solver. Our experiments show that our tool finds real deadlocks effectively, including some missed by DeadlockFuzzer, which verifies each deadlock candidate by re-executing the input program. Our experiments also show that our tool can be used to predict more, real data races than RVPredict.

Skip Supplemental Material Section

Supplemental Material

a146-kalhauge.webm

References

  1. Saddek Bensalem and Klaus Havelund. 2006. Dynamic Deadlock Analysis of Multi-threaded Programs. In Proceedings of the First Haifa International Conference on Hardware and Software Verification and Testing (HVC’05). Springer-Verlag, Berlin, Heidelberg, 208–223. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Stephen M Blackburn, Robin Garner, Chris Hoffmann, Asjad M Khang, Kathryn S McKinley, Rotem Bentzur, Amer Diwan, Daniel Feinberg, Daniel Frampton, Samuel Z Guyer, et al. 2006. The DaCapo benchmarks: Java benchmarking development and analysis. In ACM Sigplan Notices, Vol. 41. ACM, 169–190. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Eric Bodden, Andreas Sewe, Jan Sinschek, Mira Mezini, and Hela Oueslati. 2011. Taming Reflection: Aiding Static Analysis in the Presence of Reflection and Custom Class Loaders. In Proceeding of the 33rd International Conference on Software Engineering (ICSE ’11). ACM, New York, NY, USA, 241–250. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Eric Bruneton, Romain Lenglet, and Thierry Coupaye. 2002. ASM: a code manipulation tool to implement adaptable systems. Adaptable and extensible component systems 30, 19 (2002).Google ScholarGoogle Scholar
  5. Yan Cai and WK Chan. 2012. MagicFuzzer: scalable deadlock detection for large-scale applications. In Proceedings of the 34th International Conference on Software Engineering. IEEE Press, 606–616. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Yan Cai and WK Chan. 2014. Magiclock: scalable detection of potential deadlocks in large-scale multithreaded programs. IEEE Transactions on Software Engineering 40, 3 (2014), 266–281. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Yan Cai, Changjiang Jia, Shangru Wu, Ke Zhai, and Wing Kwong Chan. 2015. ASN: a dynamic barrier-based approach to confirmation of deadlocks from warnings for large-scale multithreaded programs. IEEE Transactions on Parallel and Distributed Systems 26, 1 (2015), 13–23.Google ScholarGoogle ScholarCross RefCross Ref
  8. Y. Cai and Q. Lu. 2016. Dynamic Testing for Deadlocks via Constraints. IEEE Transactions on Software Engineering 42, 9 (Sept 2016), 825–842.Google ScholarGoogle ScholarCross RefCross Ref
  9. Yan Cai, Shangru Wu, and WK Chan. 2014. ConLock: A constraint-based approach to dynamic checking on deadlocks in multithreaded programs. In Proceedings of the 36th International Conference on Software Engineering. ACM, 491–502. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Feng Chen, Traian Florin Serbanuta, and Grigore Rosu. 2008. jPredictor: A Predictive Runtime Analysis Tool for Java. In Proceedings of the 30th International Conference on Software Engineering (ICSE ’08). ACM, New York, NY, USA, 221–230. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Zhi Da Luo, Raja Das, and Yao Qi. 2011. Multicore SDK: A practical and efficient deadlock detector for real-world applications. In Software Testing, Verification and Validation (ICST), 2011 IEEE Fourth International Conference on. IEEE, 309–318. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Leonardo De Moura and Nikolaj Bjørner. 2008. Z3: An efficient SMT solver. In International conference on Tools and Algorithms for the Construction and Analysis of Systems. Springer, 337–340. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Claudio DeMartini, Radu Iosif, and Riccardo Sisto. 1999. A deadlock detection tool for concurrent Java programs. Software: Practice and Experience 29, 7 (1999), 577–603. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Hyunsook Do, Sebastian Elbaum, and Gregg Rothermel. 2005. Supporting controlled experimentation with testing techniques: An infrastructure and its potential impact. Empirical Software Engineering 10, 4 (2005), 405–435. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Eelco Dolstra and Andres Löh. 2008. NixOS: A purely functional Linux distribution. In ACM Sigplan Notices, Vol. 43. ACM, 367–378. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Matthew B Dwyer, John Hatcliff, Matthew Hoosier, Venkatesh Ranganath, Todd Wallentine, et al. 2006a. Evaluating the effectiveness of slicing for model reduction of concurrent object-oriented programs. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems. Springer, 73–89. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Matthew B Dwyer, Suzette Person, and Sebastian Elbaum. 2006b. Controlling factors in evaluating path-sensitive error detection techniques. In Proceedings of the 14th ACM SIGSOFT international symposium on Foundations of software engineering. ACM, 92–104. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Dawson Engler and Ken Ashcraft. 2003. RacerX: effective, static detection of race conditions and deadlocks. In ACM SIGOPS Operating Systems Review, Vol. 37. ACM, 237–252. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Mahdi Eslamimehr and Jens Palsberg. 2014. Sherlock: scalable deadlock detection for concurrent programs. In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering. ACM, 353–365. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Jerry J Harrow. 2000. Runtime checking of multithreaded applications with visual threads. In International SPIN Workshop on Model Checking of Software. Springer, 331–342. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Klaus Havelund. 2000. Using runtime analysis to guide model checking of Java programs. In International SPIN Workshop on Model Checking of Software. Springer, 245–264. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Klaus Havelund and Thomas Pressburger. 2000. Model checking java programs using java pathfinder. International Journal on Software Tools for Technology Transfer (STTT) 2, 4 (2000), 366–381.Google ScholarGoogle ScholarCross RefCross Ref
  23. Gerard J. Holzmann. 1990. Design and Validation of Protocols. Tutorial Computer Networks and ISDN Systems 25 (1990), 981–1017. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Jeff Huang. 2015. Stateless model checking concurrent programs with maximal causality reduction. In ACM SIGPLAN Notices, Vol. 50. ACM, 165–174. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Jeff Huang, Qingzhou Luo, and Grigore Rosu. 2015. GPredict: Generic predictive concurrency analysis. In Proceedings of the 37th International Conference on Software Engineering-Volume 1. IEEE Press, 847–857. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Jeff Huang, Patrick O’Neil Meredith, and Grigore Rosu. 2014. Maximal Sound Predictive Race Detection with Control Flow Abstraction. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’14). ACM, New York, NY, USA, 337–348. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Pallavi Joshi, Chang-Seo Park, Koushik Sen, and Mayur Naik. 2009. A randomized dynamic program analysis technique for detecting real deadlocks. In ACM Sigplan Notices, Vol. 44. ACM, 110–120. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Dileep Kini, Umang Mathur, and Mahesh Viswanathan. 2017. Dynamic race prediction in linear time. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 157–170. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Leslie Lamport. 1978. Time, clocks, and the ordering of events in a distributed system. Commun. ACM 21, 7 (1978), 558–565. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Ziyi Lin, Darko Marinov, Hao Zhong, Yuting Chen, and Jianjun Zhao. 2015. Jacontebe: A benchmark suite of real-world java concurrency bugs (T). In Automated Software Engineering (ASE), 2015 30th IEEE/ACM International Conference on. IEEE, 178–189.Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Mayur Naik, Chang-Seo Park, Koushik Sen, and David Gay. 2009. Effective static deadlock detection. In Software Engineering, 2009. ICSE 2009. IEEE 31st International Conference on. IEEE, 386–396. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Mahmoud Said, Chao Wang, Zijiang Yang, Karem Sakallah, and Karem Sakallahg. 2011. Generating data race witnesses by an SMT-based analysis. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) 6617 LNCS (2011), 313–327. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Traian Florin Serbanuta, Feng Chen, and Grigore Rosu. 2008. Maximal Causal Models for Multithreaded Systems. Technical Report UIUCDCS–R–2008–3017. University of Illinois at Urbana-Champaign.Google ScholarGoogle Scholar
  34. Traian Florin Şerbănuţă, Feng Chen, and Grigore Roşu. 2012. Maximal causal models for sequentially consistent systems. In International Conference on Runtime Verification. Springer, 136–150.Google ScholarGoogle Scholar
  35. Traian Florin Serbanuta, Feng Chen, and Grigore Rosu. 2012. Maximal causal models for sequentially consistent systems. In International Conference on Runtime Verification. Springer, 136–150.Google ScholarGoogle Scholar
  36. Yannis Smaragdakis, Jacob Evans, Caitlin Sadowski, Jaeheon Yi, and Cormac Flanagan. 2012. Sound predictive race detection in polynomial time. In ACM Sigplan Notices, Vol. 47. ACM, 387–400. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Francesco Sorrentino. 2015. PickLock: A deadlock prediction approach under nested locking. In Model Checking Software. Springer, 179–199. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Willem Visser, Klaus Havelund, Guillaume Brat, SeungJoon Park, and Flavio Lerda. 2003. Model checking programs. Automated Software Engineering 10, 2 (2003), 203–232. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Chao Wang, Sudipta Kundu, Malay Ganai, and Aarti Gupta. 2009. Symbolic Predictive Analysis for Concurrent Programs. In FM 2009: Formal Methods, Ana Cavalcanti and Dennis R. Dams (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 256–272. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Sound deadlock prediction

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!