🤖 AI Summary
Concurrency bugs—arising from improper synchronization of shared resources—pose severe reliability threats to multithreaded and distributed systems, yet remain notoriously difficult to detect and localize precisely. This paper introduces the first deep learning framework for concurrent bug detection and code-level precise localization. First, we construct a large-scale, diverse, and domain-specific dataset of concurrency bugs. Second, we design a concurrency-aware Code Property Graph (CCPG) and an associated heterogeneous Graph Neural Network (GNN) that explicitly models critical semantic features, including thread interactions, lock ordering, and data races. Third, we integrate SubgraphX, a model-agnostic explainability technique, to enable end-to-end transition from binary classification to line-level fault localization. Experimental evaluation demonstrates that our approach achieves average improvements of 10% in accuracy and precision, and 26% in recall over state-of-the-art methods.
📝 Abstract
Concurrency bugs, caused by improper synchronization of shared resources in multi-threaded or distributed systems, are notoriously hard to detect and thus compromise software reliability and security. The existing deep learning methods face three main limitations. First, there is an absence of large and dedicated datasets of diverse concurrency bugs for them. Second, they lack sufficient representation of concurrency semantics. Third, binary classification results fail to provide finer-grained debug information such as precise bug lines. To address these problems, we propose a novel method for effective concurrency bug detection as well as localization. We construct a dedicated concurrency bug dataset to facilitate model training and evaluation. We then integrate a pre-trained model with a heterogeneous graph neural network (GNN), by incorporating a new Concurrency-Aware Code Property Graph (CCPG) that concisely and effectively characterizes concurrency semantics. To further facilitate debugging, we employ SubgraphX, a GNN-based interpretability method, which explores the graphs to precisely localize concurrency bugs, mapping them to specific lines of source code. On average, our method demonstrates an improvement of 10% in accuracy and precision and 26% in recall compared to state-of-the-art methods across diverse evaluation settings.