Repairing Event Race Errors by Controlling Nondeterminism

被引:26
作者
Adamsen, Christoffer Quist [1 ]
Moller, Anders [1 ]
Karim, Rezwana [2 ]
Sridharan, Manu [2 ,5 ]
Tip, Frank [3 ]
Sen, Koushik [4 ]
机构
[1] Aarhus Univ, Aarhus, Denmark
[2] Samsung Res Amer, Mountain View, CA USA
[3] Northeastern Univ, Boston, MA 02115 USA
[4] Univ Calif Berkeley, Dept EECS, Berkeley, CA USA
[5] Uber, San Francisco, CA USA
来源
2017 IEEE/ACM 39TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE) | 2017年
基金
欧洲研究理事会;
关键词
!text type='Java']Java[!/text]Script; event-driven programming; automated repair;
D O I
10.1109/ICSE.2017.34
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Modern web applications are written in an event-driven style, in which event handlers execute asynchronously in response to user or system events. The nondeterminism arising from this programming style can lead to pernicious errors. Recent work focuses on detecting event races and classifying them as harmful or harmless. However, since modifying the source code to prevent harmful races can be a difficult and error-prone task, it may be preferable to steer away from the bad executions. In this paper, we present a technique for automated repair of event race errors in JavaScript web applications. Our approach relies on an event controller that restricts event handler scheduling in the browser according to a specified repair policy, by intercepting and carefully postponing or discarding selected events. We have implemented the technique in a tool called EventRaceCommander, which relies entirely on source code instrumentation, and evaluated it by repairing more than 100 event race errors that occur in the web applications from the largest 20 of the Fortune 500 companies. Our results show that applicationin-dependent repair policies usually suffice to repair event race errors without excessive negative impact on performance or user experience, though application-specific repair policies that target specific event races are sometimes desirable.
引用
收藏
页码:289 / 299
页数:11
相关论文
共 30 条
[1]  
[Anonymous], P 23 ACM S OP SYST P
[2]  
Bielik P., 2015, P 30 ACM SIGPLAN INT
[3]  
Chew Lee, 2010, P 5 EUR C COMP SYST
[4]   FastTrack: Efficient and Precise Dynamic Race Detection [J].
Flanagan, Cormac ;
Freund, Stephen N. .
COMMUNICATIONS OF THE ACM, 2010, 53 (11) :93-101
[5]  
Hong S., 2014, P 7 IEEE INT C SOFTW
[6]  
Ide J., 2009, P WORKSH EXPL CONC E
[7]  
Jensen C.S., 2015, P 30 ACM SIGPLAN INT
[8]  
Jin G., 2012, P 10 USENIX S OP SYS
[9]  
Jin Guoliang., 2011, P 32 ACM SIGPLAN C P
[10]  
Khoshnood S., 2015, P INT S SOFTW TEST A