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 Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
7 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis cites Sound Dynamic Deadlock Prediction in Linear Time
- CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis cites Fast, sound, and effectively complete dynamic race prediction
- Sound Dynamic Deadlock Prediction in Linear Time cites Fast, sound, and effectively complete dynamic race prediction
- Sound Dynamic Deadlock Prediction in Linear Time cites Optimal prediction of synchronization-preserving races
- Predictive Monitoring against Pattern Regular Languages cites Sound Dynamic Deadlock Prediction in Linear Time
- Predictive Monitoring against Pattern Regular Languages cites Fast, sound, and effectively complete dynamic race prediction
- Predictive Monitoring against Pattern Regular Languages cites Optimal prediction of synchronization-preserving races
- Optimal prediction of synchronization-preserving races cites Fast, sound, and effectively complete dynamic race prediction
Cited 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
- 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
- Controlled Concurrency Testing via Periodical SchedulingCheng Wen, Mengda He, Bohao Wu, Zhiwu Xu et al.ICSE 2022 · 25 citations
- SegFuzz: Segmentizing Thread Interleaving to Discover Kernel Concurrency Bugs through FuzzingDae R. Jeong, Byoungyoung Lee, Insik Shin, Youngjin KwonS&P 2023
- OFence: Pairing Barriers to Find Concurrency Bugs in the Linux KernelBaptiste Lepers, Josselin Giet, Willy Zwaenepoel, Julia LawallEuroSys 2023 · 1 citation
