Awaiting Trouble: Characterizing Concurrency Issues in Modern Promise-Based JavaScript Applications
Resumo
JavaScript is one of the most widely used programming languages, powering both client-side and server-side applications. Its modern asynchronous features with promises and async/await syntax enable cleaner and more scalable code for concurrent computations. However, JavaScript applications remain prone to concurrency issues, ranging from internal event races due to event handlers’ interleavings, to nondeterminism in interactions with external systems. Existing studies have mainly focused on callback-based event races, leaving a gap in understanding how such issues manifest in modern Promise-based code. This paper presents an empirical study that analyzes, classifies, and tries to reproduce merged modifications that contain concurrency issues in modern JavaScript applications. To do so, we assessed 22 pull requests from open source Promisebased JavaScript projects, and classified them using bug patterns proposed in the literature. Furthermore, we introduce four manifestation patterns that characterize how such issues occur in modern scenarios. Our results give evidence that these concurrency issues frequently manifest as flaky tests, but are difficult to reproduce. We anticipate that the analyzed cases can assist the development of newer tools and approaches for detecting concurrency issues in modern JavaScript applications.
Referências
Saba Alimadadi, Di Zhong, Magnus Madsen, and Frank Tip. 2018. Finding broken promises in asynchronous JavaScript programs. In Proceedings of the ACM on Programming Languages, Vol. 2. ACM, Boston, MA, USA, 1–26. DOI: 10.1145/3276532
Ellen Arteca, Sebastian Harner, Michael Pradel, and Frank Tip. 2022. Nessie: Automatically testing JavaScript apis with asynchronous callbacks. In Proceedings of the 44th International Conference on Software Engineering. ACM, Pittsburgh, PA, USA, 1494–1505. DOI: 10.1145/3510003.3510106
Branko Krstic. 2023. Node JS Stats that Prove Its Awesomeness in 2023. Available at: [link].
Xiaoning Chang, Wensheng Dou, Jun Wei, Tao Huang, Jinhui Xie, Yuetang Deng, Jianbo Yang, and Jiaheng Yang. 2021. Race detection for event-driven node. js applications. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, Melbourne, Australia, 480–491. DOI: 10.1109/ASE51524.2021.9678814
James Davis, Arun Thekumparampil, and Dongyoon Lee. 2017. Node. fz: Fuzzing the server-side event-driven architecture. In Proceedings of the Twelfth European Conference on Computer Systems. ACM, Belgrade, Serbia, 145–160. DOI: 10.1145/3064176.3064188
Ecma International. 2017. ECMAScript 2017 Language Specification. [link].
Ecma International. 2025. ECMAScript 2025 Language Specification. [link].
André Takeshi Endo and Anders Møller. 2020. Noderacer: Event race detection for node. js applications. In 2020 IEEE 13th International Conference on Software Testing, Validation and Verification (ICST). IEEE, Porto, Portugal, 120–130. DOI: 10.1109/ICST46399.2020.00022
Andre Takeshi Endo and Anders Møller. 2025. Event Race Detection for Node.js Using Delay Injections. In 39th European Conference on Object-Oriented Programming (ECOOP 2025) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 333), Jonathan Aldrich and Alexandra Silva (Eds.). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 9:1–9:28. DOI: 10.4230/LIPIcs.ECOOP.2025.9
Mohammad Ganji, Saba Alimadadi, and Frank Tip. 2023. Code coverage criteria for asynchronous programs. In Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering. ACM, San Francisco, CA, USA, 1307–1319. DOI: 10.1145/3611643.3616292
Thananon Leesatapornwongsa, Jeffrey F. Lukman, Shan Lu, and Haryadi S. Gunawi. 2016. TaxDC: A Taxonomy of Non-Deterministic Concurrency Bugs in Datacenter Distributed Systems. In Proceedings of the Eleventh European Conference on Computer Systems (EuroSys 2016). ACM, Bordeaux, France, 1–16. DOI: 10.1145/2872362.2872374
Shan Lu, Soyeon Park, Eunsoo Seo, and Yuanyuan Zhou. 2008. Learning from Mistakes - A Comprehensive Study on Real World Concurrency Bug Characteristics. In Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS 2008). ACM, Seattle, WA, USA, 329–339. DOI: 10.1145/1346281.1346323
Walter Lucas, Rafael Nunes, Rodrigo Bonifácio, Fausto Carvalho, Ricardo Lima, Michael Silva, Adriano Torres, Paola Accioly, Eduardo Monteiro, and João Saraiva. 2025. Understanding the adoption of modern Javascript features: An empirical study on open-source systems. Empirical Software Engineering 30, 4 (2025), 107. DOI: 10.1007/s10664-025-10663-9
Qingzhou Luo, Farah Hariri, Lamyaa Eloussi, and Darko Marinov. 2014. An empirical analysis of flaky tests. In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, (FSE-22), Hong Kong, China, November 16 - 22, 2014, Shing-Chi Cheung, Alessandro Orso, and Margaret-Anne D. Storey (Eds.). ACM, 643–653. DOI: 10.1145/2635868.2635920
Magnus Madsen, Ondřej Lhoták, and Frank Tip. 2017. A model for reasoning about JavaScript promises. In Proceedings of the ACM on Programming Languages, Vol. 1. ACM, Vancouver, Canada, 1–24. DOI: 10.1145/3133910
Mozilla Developer Network. 2025. Async Function. [link].
Mozilla Developer Network. 2025. Promise. [link].
Per Runeson and Martin Höst. 2009. Guidelines for conducting and reporting case study research in software engineering. Empirical Software Engineering 14, 2 (2009), 131–164. DOI: 10.1007/s10664-008-9102-8
Sindresorhus. 2019. Curating the best Node.js modules and resources. [link].
Sqreen. 2019. Curated list of awesome open-source applications made with Node.js. [link].
Stack Exchange, Inc. 2025. 2025 Developer Survey. Available at: [link].
TIOBE Software BV. 2026. TIOBE Index for December 2026. Available at: [link].
Alexi Turcotte, Michael D. Shah, MarkW. Aldrich, and Frank Tip. 2022. DrAsync: Identifying and Visualizing Anti-Patterns in Asynchronous JavaScript. In 2022 IEEE/ACM 44th International Conference on Software Engineering (ICSE). 774–785. DOI: 10.1145/3510003.3510097
Jie Wang, Wensheng Dou, Yu Gao, Chushu Gao, Feng Qin, Kang Yin, and Jun Wei. 2017. A comprehensive study on real world concurrency bugs in Node. js. In 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, Urbana Champaign, IL, USA, 520–531. DOI: 10.1109/ASE.2017.8115663
Jingyao Zhou, Lei Xu, Gongzheng Lu, Weifeng Zhang, and Xiangyu Zhang. 2023. NodeRT: Detecting races in node. js applications practically. In Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis. ACM, Seattle, WA, USA, 1332–1344. DOI: 10.1145/3597926.3598139
