Abstract
Concurrent programs are difficult to test and debug due to their non-deterministic execution. For deadlocks, traditional deadlock detection algorithms depend on finding cycles in lock graphs created from application programs. This paper first introduces three kinds of blocked relations, lock-blocked, wait-blocked, and join-blocked for Java multi-threaded programs. Previous work does not consider the wait-blocked relations, nor the influence of thread interruption. The paper then proposes two types of deadlocks based on these blocked relations, that is, block-cycle type deadlocks and waiting-block type deadlocks which are acyclic. It also presents an example of implementation to detect these types of deadlocks, and addresses future directions.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Agarwal, R., Stoller, S.: Run-time detection of potential deadlocks for programs with locks, semaphores, and condition variables. In: Proceedings of the 2006 Workshop on Parallel and Distributed Systems: Testing and Debugging, pp. 51–60. ACM (2006)
Bensalem, S., Fernandez, J., Havelund, K., Mounier, L.: Confirmation of deadlock potentials detected by runtime analysis. In: Proceedings of the 2006 Workshop on Parallel and Distributed Systems: Testing and Debugging, pp. 41–50. ACM (2006)
Bensalem, S., Griesmayer, A., Legay, A., Nguyen, T., Peled, D.: Efficient deadlock detection for concurrent systems. In: 2011 9th IEEE/ACM International Conference on Formal Methods and Models for Codesign (MEMOCODE), pp. 119–129. IEEE (2011)
Bensalem, S., Havelund, K.: Dynamic deadlock analysis of multi-threaded programs. In: Ur, S., Bin, E., Wolfsthal, Y. (eds.) HVC 2005. LNCS, vol. 3875, pp. 208–223. Springer, Heidelberg (2006)
Bradbury, J., Jalbert, K.: Defining a catalog of programming anti-patterns for concurrent java. In: Proc. of the 3rd International Workshop on Software Patterns and Quality (SPAQu 2009), pp. 6–11 (2009)
Chaki, S., Clarke, E., Ouaknine, J., Sharygina, N., Sinha, N.: Concurrent software verification with states, events, and deadlocks. Formal Aspects of Computing 17(4), 461–483 (2005)
Demartini, C., Iosif, R., Sisto, R.: A deadlock detection tool for concurrent java programs. Software: Practice and Experience 29(7), 577–603 (1999)
Deshmukh, J., Emerson, E., Sankaranarayanan, S.: Symbolic deadlock analysis in concurrent libraries and their clients. In: Proceedings of the 2009 IEEE/ACM International Conference on Automated Software Engineering, pp. 480–491. IEEE Computer Society (2009)
Deshmukh, J., Emerson, E., Sankaranarayanan, S.: Symbolic modular deadlock analysis. Automated Software Engineering, 1–38 (2011)
El-Zawawy, M., Nayel, H.: Type systems based data race detector. Computer and Information Science 5(4), 53–60 (2012)
Ferrara, P.: A generic static analyzer for multithreaded java programs. Software: Practice and Experience (2012), doi:10.1002/spe.2126
Fiedor, J., Křena, B., Letko, Z., Vojnar, T.: A uniform classification of common concurrency errors. In: Moreno-Díaz, R., Pichler, F., Quesada-Arencibia, A. (eds.) EUROCAST 2011, Part I. LNCS, vol. 6927, pp. 519–526. Springer, Heidelberg (2012)
Filman, R., Havelund, K.: Source-code instrumentation and quantification of events. In: FOAL 2002 Workshop (at AOSD 2002), pp. 45–49 (2002)
Flanagan, C., Freund, S., Yi, J.: Velodrome: a sound and complete dynamic atomicity checker for multithreaded programs. ACM SIGPLAN Notices 43(6), 293–303 (2008)
Gordon, C., Ernst, M., Grossman, D.: Static lock capabilities for deadlock freedom. In: Proceedings of the 8th ACM SIGPLAN Workshop on Types in Language Design and Implementation, pp. 67–78. ACM (2012)
Havelund, K.: Using runtime analysis to guide model checking of java programs. In: Havelund, K., Penix, J., Visser, W. (eds.) SPIN 2000. LNCS, vol. 1885, pp. 245–264. Springer, Heidelberg (2000)
Havelund, K., Rosu, G.: Java pathexplorer–a runtime verification tool. In: The 6th International Symposium on Artificial Intelligence, Robotics and Automation in Space: A New Space Odyssey, pp. 18–21 (2001)
Johnsen, E.B., Tran, T.M.T., Owe, O., Steffen, M.: Safe locking for multi-threaded java with exceptions. The Journal of Logic and Algebraic Programming 81, 257–283 (2012)
Joshi, P., Naik, M., Sen, K., Gay, D.: An effective dynamic analysis for detecting generalized deadlocks. In: Proceedings of the Eighteenth ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 327–336. ACM (2010)
Joshi, P., Park, C., Sen, K., Naik, M.: A randomized dynamic program analysis technique for detecting real deadlocks. ACM Sigplan Notices 44(6), 110–120 (2009)
Jula, H., Andrica, S., Candea, G.: Efficiency optimizations for implementations of deadlock immunity. In: Khurshid, S., Sen, K. (eds.) RV 2011. LNCS, vol. 7186, pp. 78–93. Springer, Heidelberg (2012)
Jula, H., Tozun, P., Candea, G.: Communix: A framework for collaborative deadlock immunity. In: 2011 IEEE/IFIP 41st International Conference on Dependable Systems & Networks (DSN), pp. 181–188. IEEE (2011)
Kahlon, V., Sinha, N., Kruus, E., Zhang, Y.: Static data race detection for concurrent programs with asynchronous calls. In: Proceedings of the the 7th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 13–22. ACM (2009)
Kahlon, V., Yang, Y., Sankaranarayanan, S., Gupta, A.: Fast and accurate static data-race detection for concurrent programs. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 226–239. Springer, Heidelberg (2007)
Koskinen, E., Herlihy, M.: Dreadlocks: efficient deadlock detection. In: Proceedings of the Twentieth Annual Symposium on Parallelism in Algorithms and Architectures, pp. 297–303. ACM (2008)
Lu, S., Park, S., Seo, E., Zhou, Y.: Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. ACM Sigplan Notices 43(3), 329–339 (2008)
Luo, Z., Das, R., Qi, Y.: Multicore sdk: A practical and efficient deadlock detector for real-world applications. In: 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation (ICST), pp. 309–318. IEEE (2011)
Mahdian, F., Rafe, V., Rafeh, R.: A framework to automatic deadlock detection in concurrent programs. Przeglad Elektrotechniczny, 182–184 (2012) iSSN 0033-2097, R. 88 NR 1b/2012
Naik, M., Park, C., Sen, K., Gay, D.: Effective static deadlock detection. In: IEEE 31st International Conference on Software Engineering, ICSE 2009, pp. 386–396. IEEE (2009)
Nir-Buchbinder, Y., Tzoref, R., Ur, S.: Deadlocks: From exhibiting to healing. In: Leucker, M. (ed.) RV 2008. LNCS, vol. 5289, pp. 104–118. Springer, Heidelberg (2008)
Nonaka, Y., Ushijima, K.: A run-time deadlock detector for concurrent java programs. In: Eighth Asia-Pacific Software Engineering Conference, APSEC 2001, pp. 45–52. IEEE (2001)
Oracle Corporation: Java Bug Database (2013), http://bugs.sun.com/
Oracle Corporation: Java Language Specification Java SE, 7th edn. (2013), http://docs.oracle.com/javase/specs/jls/se7/jls7.pdf
Oracle Corporation. jconsole (2013), http://docs.oracle.com/javase/7/docs/technotes/guides/management/index.html
Oracle Corporation. jstack (2013), http://docs.oracle.com/javase/7/docs/technotes/tools/
Oracle Corporation: NetBeans IDE (2013), http://netbeans.org/
Park, S., Vuduc, R., Harrold, M.: A unified approach for localizing non-deadlock concurrency bugs. In: 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation, pp. 51–60. IEEE (2012)
Pun, K., Steffen, M., Stolz, V.: Deadlock checking by a behavioral effect system for lock handling. Journal of Logic and Algebraic Programming 81(3), 331–354 (2012)
Shanbhag, V.: Deadlock-detection in java-library using static-analysis. In: 15th Asia-Pacific Software Engineering Conference, APSEC 2008, pp. 361–368. IEEE (2008)
Shimomura, T.: Easy, Enjoyable, Effective E-Learning. Nova Science Publishers, Inc. (2008)
Shimomura, T., Ikeda, K.: Extensible web-based learning architecture. In: The 2012 International Conference on Software Engineering Research and Practice, pp. 1–7 (2012)
Shimomura, T., Ikeda, K.: Waiting blocked-tree type deadlock detection. In: Proceedings of Science and Information Conference 2013 (SAI 2013), pp. 45–50 (2013)
Wang, Y., Kelly, T., Kudlur, M., Lafortune, S., Mahlke, S.: Gadara: Dynamic deadlock avoidance for multithreaded programs. In: Proceedings of the 8th USENIX Conference on Operating Systems Design and Implementation, pp. 281–294. USENIX Association (2008)
Wen, Y., Zhao, J., Huang, M., Chen, H.: Towards detecting thread deadlock in java programs with jvm introspection. In: 2011 IEEE 10th International Conference on Trust, Security and Privacy in Computing and Communications (TrustCom), pp. 1600–1607. IEEE (2011)
Williams, A., Thies, W., Awasthi, P.: Static deadlock detection for java libraries. In: Gao, X.-X. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 602–629. Springer, Heidelberg (2005)
Zhang, W., Sun, C., Lu, S.: Conmem: detecting severe concurrency bugs through an effect-oriented approach. ACM SIGARCH Computer Architecture News 38(1), 179–192 (2010)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Shimomura, T., Ikeda, K. (2014). Two Types of Deadlock Detection: Cyclic and Acyclic. In: Chen, L., Kapoor, S., Bhatia, R. (eds) Intelligent Systems for Science and Information. Studies in Computational Intelligence, vol 542. Springer, Cham. https://doi.org/10.1007/978-3-319-04702-7_14
Download citation
DOI: https://doi.org/10.1007/978-3-319-04702-7_14
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-04701-0
Online ISBN: 978-3-319-04702-7
eBook Packages: EngineeringEngineering (R0)