一句话:提出动态竞态检测方法 NRace,利用 happens-before 关系预测 Node.js 事件与异步任务间的竞态。
Node.js 采用异步事件驱动模型,并支持异步任务与多优先级事件队列;事件与异步任务之间意外的竞态可能导致严重后果。现有 Node.js 竞态检测主要依赖随机 fuzzing,因调度空间巨大而容易漏检。本文提出动态竞态检测方法 NRace:它为事件和异步任务构建精确的 happens-before 关系,并将多优先级事件队列纳入考虑;在此基础上进一步实现预测式竞态检测。作者在 10 个真实 Node.js 应用上评估,NRace 精确检测出 6 个竞态,其中 5 个已被开发者确认。
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.
DOI 原文 ·
@inproceedings{paperbot6496,
title = {Race Detection for Event-Driven Node.js Applications},
author = {Xiaoning Chang and Wensheng Dou and Jun Wei and Tao Huang and Jinhui Xie and Yuetang Deng and Jianbo Yang and Jiaheng Yang},
booktitle = {ASE},
year = {2021},
doi = {10.1109/ase51524.2021.9678814}
}