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

Fingerprint

Application programming interfaces (API)
Black-box testing
Testing
Software engineering
Defects

All Science Journal Classification (ASJC) codes

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

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

LockPeeker : Detecting latent locks in Java APIs. / Lin, Ziyi; Zhong, Hao; Chen, Yuting; Zhao, Jianjun.

ASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering. ed. / Sarfraz Khurshid; David Lo; Sven Apel. Association for Computing Machinery, Inc, 2016. p. 368-378 (ASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering).

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

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. ASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering, Association for Computing Machinery, Inc, pp. 368-378, 31st IEEE/ACM International Conference on Automated Software Engineering, ASE 2016, Singapore, Singapore, 9/3/16. https://doi.org/10.1145/2970276.2970355
Lin Z, Zhong H, Chen Y, Zhao J. LockPeeker: Detecting latent locks in Java APIs. In Khurshid S, Lo D, Apel S, editors, ASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering. Association for Computing Machinery, Inc. 2016. p. 368-378. (ASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering). https://doi.org/10.1145/2970276.2970355
Lin, Ziyi ; Zhong, Hao ; Chen, Yuting ; Zhao, Jianjun. / LockPeeker : Detecting latent locks in Java APIs. ASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering. editor / Sarfraz Khurshid ; David Lo ; Sven Apel. Association for Computing Machinery, Inc, 2016. pp. 368-378 (ASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering).
@inproceedings{3b0f9b1b4b3a424a8012d82c87046da9,
title = "LockPeeker: Detecting latent locks in Java APIs",
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.",
author = "Ziyi Lin and Hao Zhong and Yuting Chen and Jianjun Zhao",
year = "2016",
month = "8",
day = "25",
doi = "10.1145/2970276.2970355",
language = "English",
series = "ASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering",
publisher = "Association for Computing Machinery, Inc",
pages = "368--378",
editor = "Sarfraz Khurshid and David Lo and Sven Apel",
booktitle = "ASE 2016 - Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering",

}

TY - GEN

T1 - LockPeeker

T2 - Detecting latent locks in Java APIs

AU - Lin, Ziyi

AU - Zhong, Hao

AU - Chen, Yuting

AU - Zhao, Jianjun

PY - 2016/8/25

Y1 - 2016/8/25

N2 - 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.

AB - 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.

UR - http://www.scopus.com/inward/record.url?scp=84989177864&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=84989177864&partnerID=8YFLogxK

U2 - 10.1145/2970276.2970355

DO - 10.1145/2970276.2970355

M3 - Conference contribution

AN - SCOPUS:84989177864

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

SP - 368

EP - 378

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

A2 - Khurshid, Sarfraz

A2 - Lo, David

A2 - Apel, Sven

PB - Association for Computing Machinery, Inc

ER -