Adaptively Generating High Quality Fixes for Atomicity Violations

被引:9
作者
Cai, Yan [1 ]
Cao, Lingwei [1 ,2 ]
Zhao, Jing [3 ]
机构
[1] Chinese Acad Sci, Inst Software, State Key Lab Comp Sci, Beijing, Peoples R China
[2] Univ Chinese Acad Sci, Beijing, Peoples R China
[3] Harbin Engn Univ, Sch Comp Sci & Technol, Harbin, Heilongjiang, Peoples R China
来源
ESEC/FSE 2017: PROCEEDINGS OF THE 2017 11TH JOINT MEETING ON FOUNDATIONS OF SOFTWARE ENGINEERING | 2017年
基金
中国国家自然科学基金;
关键词
Atomicity violations; fix; repair; concurrency bugs; deadlock; multithreaded program; lock order; REPAIR;
D O I
10.1145/3106237.3106239
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
It is difficult to fix atomicity violations correctly. Existing gate lock algorithm (GLA) simply inserts gate locks to serialize executions, which may introduce performance bugs and deadlocks. Synthesized context-aware gate locks (by Grail) require complex source code synthesis. We propose alpha Fixer to adaptively fix atomicity violations. It firstly analyses the lock acquisitions of an atomicity violation. Then it either adjusts the existing lock scope or inserts a gate lock. The former addresses cases where some locks are used but fail to provide atomic accesses. For the latter, it infers the visibility (being global or a field of a class/struct) of the gate lock such that the lock only protects related accesses. For both cases, alpha Fixer further eliminates new lock orders to avoid introducing deadlocks. Of course, alpha Fixer can produce both kinds of fixes on atomicity violations with locks. The experimental results on 15 previously used atomicity violations show that: alpha Fixer correctly fixed all 15 atomicity violations without introducing deadlocks. However, GLA and Grail both introduced 5 deadlocks. HFix (that only targets on fixing certain types of atomicity violations) only fixed 2 atomicity violations and introduced 4 deadlocks. alpha Fixer also provides an alternative way to insert gate locks (by inserting gate locks with proper visibility) considering fix acceptance.
引用
收藏
页码:303 / 314
页数:12
相关论文
共 60 条
  • [1] Detection of deadlock potentials in multithreaded programs
    Agarwal, R.
    Bensalem, S.
    Farchi, E.
    Havelund, K.
    Nir-Buchbinder, Y.
    Stoller, S. D.
    Ur, S.
    Wang, L.
    [J]. IBM JOURNAL OF RESEARCH AND DEVELOPMENT, 2010, 54 (05)
  • [2] [Anonymous], 13113414 ARXIV
  • [3] [Anonymous], 2010, P 9 USENIX C OP SYST
  • [4] [Anonymous], PROC INT CONF SOFTW
  • [5] [Anonymous], P 2013 INT S SOFTW T
  • [6] Bodden E., 2008, Proceedings of the International Symposium on Software Testing and Analysis (ISSTA), P155, DOI DOI 10.1145/1390630.1390650
  • [7] Aspect-Oriented Race Detection in Java']Java
    Bodden, Eric
    Havelund, Klaus
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2010, 36 (04) : 509 - 527
  • [8] ConLock: A Constraint-Based Approach to Dynamic Checking on Deadlocks in Multithreaded Programs
    Cai, Yan
    Wu, Shangru
    Chan, W. K.
    [J]. 36TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2014), 2014, : 491 - 502
  • [9] Cai Y, 2012, PROC INT CONF SOFTW, P606, DOI 10.1109/ICSE.2012.6227156
  • [10] Cornu B, 2015, 151207423 ARXIV