NodeRacer: Event Race Detection for Node.js']js Applications

被引:14
作者
Endo, Andre Takeshi [1 ,2 ]
Moller, Anders [1 ]
机构
[1] Aarhus Univ, Aarhus, Denmark
[2] Univ Tecnol Fed Parana, Curitiba, Parana, Brazil
来源
2020 IEEE 13TH INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VALIDATION AND VERIFICATION (ICST 2020) | 2020年
基金
欧洲研究理事会;
关键词
!text type='Java']Java[!/text]Script; race conditions; flaky tests;
D O I
10.1109/ICST46399.2020.00022
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The Node.js platform empowers a huge number of software systems programmed with JavaScript. Node.js employs an asynchronous execution model where event handlers are scheduled nondeterministically, and unexpected races between event handlers often cause malfunctions. Existing techniques for detecting such event races require complex modifications of the Node.js internals, or target only certain kinds of races. This paper presents a new approach, called NODERACER, that detects event races in Node.js applications by selectively postponing events, guided by happens-before relations. The technique is implemented entirely with code instrumentation, without modifications of the Node.js system. Our experimental results give evidence that NODERACER finds event race errors with higher probability than a state-of-the-art fuzzer, and that the use of happens-before relations helps avoiding false positives. Furthermore, we demonstrate that NODERACER produces actionable error reports, and that it can be helpful for detecting test flakiness that is caused by event races.
引用
收藏
页码:120 / 130
页数:11
相关论文
共 34 条
[1]   Practical initialization race detection for JavaScript web applications [J].
Adamsen, Christoffer Quist ;
Méller, Anders ;
Tip, Frank .
Proceedings of the ACM on Programming Languages, 2017, 1 (OOPSLA)
[2]   Practical AJAX Race Detection for Java']JavaScript Web Applications [J].
Adamsen, Christoffer Quist ;
Moller, Anders ;
Alimadadi, Saba ;
Tip, Frank .
ESEC/FSE'18: PROCEEDINGS OF THE 2018 26TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, 2018, :38-48
[3]   Repairing Event Race Errors by Controlling Nondeterminism [J].
Adamsen, Christoffer Quist ;
Moller, Anders ;
Karim, Rezwana ;
Sridharan, Manu ;
Tip, Frank ;
Sen, Koushik .
2017 IEEE/ACM 39TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2017, :289-299
[4]   A Survey of Dynamic Analysis and Test Generation for Java']JavaScript [J].
Andreasen, Esben ;
Gong, Liang ;
Moller, Anders ;
Pradel, Michael ;
Selakovic, Marija ;
Sen, Koushik ;
Staicu, Cristian-Alexandru .
ACM COMPUTING SURVEYS, 2017, 50 (05)
[5]   A Survey of Recent Trends in Testing Concurrent Software Systems [J].
Bianchi, Francesco Adalberto ;
Margara, Alessandro ;
Pezze, Mauro .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2018, 44 (08) :747-783
[6]   A parameterized type system for race-free Java']Java programs [J].
Boyapati, C ;
Rinard, M .
ACM SIGPLAN NOTICES, 2001, 36 (11) :56-69
[7]   Detecting Atomicity Violations for Event-Driven Node.js']js Applications [J].
Chang, Xiaoning ;
Dou, Wensheng ;
Gao, Yu ;
Wang, Jie ;
Wei, Jun ;
Huang, Tao .
2019 IEEE/ACM 41ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2019), 2019, :631-642
[8]  
Davis J. C., 2017, P 10 EUR WORKSH SYST
[9]   Node.fz: Fuzzing the Server-Side Event-Driven Architecture [J].
Davis, James ;
Thekumparampil, Arun ;
Lee, Dongyoon .
PROCEEDINGS OF THE TWELFTH EUROPEAN CONFERENCE ON COMPUTER SYSTEMS (EUROSYS 2017), 2017, :145-160
[10]   FastTrack: Efficient and Precise Dynamic Race Detection [J].
Flanagan, Cormac ;
Freund, Stephen N. .
PLDI'09 PROCEEDINGS OF THE 2009 ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, 2009, :121-133