LockPeeker: Detecting latent locks in Java APIs

Ziyi Lin, Hao Zhong, Yuting Chen, Jianjun Zhao

Research output: Chapter in Book/Report/Conference proceedingConference contribution

5 Citations (Scopus)

Abstract

Detecting lock-related defects has long been a hot research topic in software engineering. Many efforts have been spent on detecting such deadlocks in concurrent software systems. However, latent locks may be hidden in application programming interface (API) methods whose source code may not be accessible to developers. Many APIs have latent locks. For example, our study has shown that J2SE alone can have 2,000+ latent locks. As latent locks are less known by developers, they can cause deadlocks that are hard to perceive or diagnose. Meanwhile, the state-of-the-art tools mostly handle API methods as black boxes, and cannot detect deadlocks that involve such latent locks. In this paper, we propose a novel black-box testing approach, called LockPeeker, that reveals latent locks in Java APIs. The essential idea of LockPeeker is that latent locks of a given API method can be revealed by testing the method and summarizing the locking effects during testing execution. We have evaluated LockPeeker on ten real-world Java projects. Our evaluation results show that (1) LockPeeker detects 74.9% of latent locks in API methods, and (2) it enables state-of-the-art tools to detect deadlocks that otherwise cannot be detected.

Original languageEnglish
Title of host publicationASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering
EditorsSarfraz Khurshid, David Lo, Sven Apel
PublisherAssociation for Computing Machinery, Inc
Pages368-378
Number of pages11
ISBN (Electronic)9781450338455
DOIs
Publication statusPublished - Aug 25 2016
Event31st IEEE/ACM International Conference on Automated Software Engineering, ASE 2016 - Singapore, Singapore
Duration: Sep 3 2016Sep 7 2016

Publication series

NameASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering

Other

Other31st IEEE/ACM International Conference on Automated Software Engineering, ASE 2016
CountrySingapore
CitySingapore
Period9/3/169/7/16

All Science Journal Classification (ASJC) codes

  • Software
  • Computational Theory and Mathematics
  • Human-Computer Interaction

Fingerprint Dive into the research topics of 'LockPeeker: Detecting latent locks in Java APIs'. Together they form a unique fingerprint.

  • Cite this

    Lin, Z., Zhong, H., Chen, Y., & Zhao, J. (2016). LockPeeker: Detecting latent locks in Java APIs. In S. Khurshid, D. Lo, & S. Apel (Eds.), ASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering (pp. 368-378). (ASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering). Association for Computing Machinery, Inc. https://doi.org/10.1145/2970276.2970355