Sound and efficient concurrency bug prediction
Yan Cai, Hao Yun, Jinqiu Wang, Lei Qiao, Jens Palsberg
Abstract
Concurrency bugs are extremely difficult to detect. Recently, several dynamic techniques achieve sound analysis. M2 is even complete for two threads. It is designed to decide whether two events can occur consecutively. However, real-world concurrency bugs can involve more events and threads. Some can occur when the order of two or more events can be exchanged even if they occur not consecutively. We propose a new technique SeqChec to soundly decide whether a sequence of events can occur in a specified order. The ordered sequence represents a potential concurrency bug. And several known forms of concurrency bugs can be easily encoded into event sequences where each represents a way that the bug can occur. To achieve it, SeqChec explicitly analyzes branch events and includes a set of efficient algorithms. We show that SeqChec is sound; and it is also complete on traces of two threads.
We have implemented SeqChec to detect three types of concurrency bugs and evaluated it on 51 Java benchmarks producing up to billions of events. Compared with M2 and other three recent sound race detectors, SeqChec detected 333 races in 30 minutes; while others detected from 130 to 285 races in 6 to 12 hours. SeqChec detected 20 deadlocks in 6 seconds. This is only one less than Dirk; but Dirk spent more than one hour. SeqChec also detected 30 atomicity violations in 20 minutes. The evaluation shows SeqChec can significantly outperform existing concurrency bug detectors.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext b95700d1-9d5d-4cf3-94fd-8a9d9b095a53Cited by top-tier papers7
- Peahen: fast and precise static deadlock detection via context reductionYuandao Cai, Chengfeng Ye, Qingkai Shi, Charles ZhangFSE 2022 · 16 citations
- Sound Dynamic Deadlock Prediction in Linear TimeHünkar Can Tunç, Umang Mathur, Andreas Pavlogiannis, Mahesh ViswanathanPLDI 2023 · 15 citations
- Predictive Monitoring against Pattern Regular LanguagesZhendong Ang, Umang MathurPOPL 2024 · 12 citations
- CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution AnalysisHünkar Can Tunç, Ameya Prashant Deshmukh, Berk Çirisci, Constantin Enea et al.ASPLOS 2024 · 6 citations
- Effective Concurrency Testing for Go via Directional Primitive-Constrained Interleaving ExplorationZongze Jiang, Ming Wen, Yixin Yang, Chao Peng et al.ASE 2023 · 6 citations
Builds on2
Related papers
- Controlled Concurrency Testing via Periodical SchedulingCheng Wen, Mengda He, Bohao Wu, Zhiwu Xu et al.ICSE 2022 · 25 citations
- Tolerate Control-Flow Changes for Sound Data Race PredictionShihao Zhu, Yuqi Guo, Long Zhang, Yan CaiICSE 2023 · 5 citations
- Reduce Dependence for Sound Concurrency Bug PredictionShihao Zhu, Yuqi Guo, Yan Cai, Bin Liang et al.ICSE 2025 · 1 citation
- SegFuzz: Segmentizing Thread Interleaving to Discover Kernel Concurrency Bugs through FuzzingDae R. Jeong, Byoungyoung Lee, Insik Shin, Youngjin KwonS&P 2023
- Themis: Detecting Distributed Concurrency Bugs through RPC-Driven Race-Directed Test Generation and FuzzingHongchen Cao, Jingzhu He, Ting Dai, Guoliang JinNSDI 2026 · 1 citation
