Visible to the public LockPeeker: Detecting Latent Locks in Java APIs

TitleLockPeeker: Detecting Latent Locks in Java APIs
Publication TypeConference Paper
Year of Publication2016
AuthorsLin, Ziyi, Zhong, Hao, Chen, Yuting, Zhao, Jianjun
Conference NameProceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering
Date PublishedAugust 2016
PublisherACM
Conference LocationNew York, NY, USA
ISBN Number978-1-4503-3845-5
KeywordsAPI, API method, APIs, applications programming interfaces, compositionality, deadlock detection, Latent lock, pubcrawl, Resiliency
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.

URLhttps://dl.acm.org/doi/10.1145/2970276.2970355
DOI10.1145/2970276.2970355
Citation Keylin_lockpeeker:_2016