Race Detection for Event-Driven Node.js Applications
Abstract
Node.js has become a widely-used event-driven architecture for server-side and desktop applications. Node.js provides an effective asynchronous event-driven programming model, and supports asynchronous tasks and multi-priority event queues. Unexpected races among events and asynchronous tasks can cause severe consequences. Existing race detection approaches in Node.js applications mainly adopt random fuzzing technique, and can miss races due to large schedule space.In this paper, we propose a dynamic race detection approach NRace for Node.js applications. In NRace, we build precise happens-before relations among events and asynchronous tasks in Node.js applications, which also take multi-priority event queues into consideration. We further develop a predictive race detection technique based on these relations. We evaluate NRace on 10 realworld Node.js applications. The experimental result shows that NRace can precisely detect 6 races, and 5 of them have been confirmed by developers.
BibTeX
@inproceedings{Chang-al:ASE21,
author = {Xiaoning Chang and
Wensheng Dou and
Jun Wei and
Tao Huang and
Jinhui Xie and
Yuetang Deng and
Jianbo Yang and
Jiaheng Yang},
title = {Race Detection for {Event-Driven} Node.js Applications},
booktitle = {ASE},
pages = {480--491},
publisher = {{IEEE}},
year = {2021},
}