@gron

Detecting Atomicity Violations for Event-Driven Node.js Applications

, , , , , and . Proceedings of the 41st International Conference on Software Engineering, page 631--642. IEEE Press, (May 2019)
DOI: 10.1109/ICSE.2019.00073

Abstract

Node.js has been widely used as an event-driven server-side architecture. To improve performance, a task in a Node.js application is usually divided into a group of events, which are non-deterministically scheduled by Node.js. Developers may assume that the group of events (named atomic event group) should be atomically processed, without interruption. However, the atomicity of an atomic event group is not guaranteed by Node.js, and thus other events may interrupt the execution of the atomic event group, break down the atomicity and cause unexpected results. Existing approaches mainly focus on event race among two events, and cannot detect high-level atomicity violations among a group of events. In this paper, we propose NodeAV, which can predictively detect atomicity violations in Node.js applications based on an execution trace. Based on happens-before relations among events in an execution trace, we automatically identify a pair of events that should be atomically processed, and use predefined atomicity violation patterns to detect atomicity violations. We have evaluated NodeAV on real-world Node.js applications. The experimental results show that NodeAV can detect new atomicity violations in these Node.js applications.

Links and resources

Tags

community

  • @gron
  • @dblp
@gron's tags highlighted