Optimal prediction of synchronization-preserving races
Umang Mathur, Andreas Pavlogiannis, Mahesh Viswanathan
摘要
Concurrent programs are notoriously hard to write correctly, as scheduling nondeterminism introduces subtle errors that are both hard to detect and to reproduce. The most common concurrency errors are (data) races, which occur when memory-conflicting actions are executed concurrently. Consequently, considerable effort has been made towards developing efficient techniques for race detection. The most common approach is dynamic race prediction: given an observed, race-free trace 𝜎 of a concurrent program, the task is to decide whether events of 𝜎 can be correctly reordered to a trace 𝜎 * that witnesses a race hidden in 𝜎.
In this work we introduce the notion of sync(hronization)-preserving races. A sync-preserving race occurs in 𝜎 when there is a witness 𝜎 * in which synchronization operations (e.g., acquisition and release of locks) appear in the same order as in 𝜎. This is a broad definition that strictly subsumes the famous notion of happens-before races. Our main results are as follows. First, we develop a sound and complete algorithm for predicting sync-preserving races. For moderate values of parameters like the number of threads, the algorithm runs in 𝑂 (N ) time and space, where N is the length of the trace 𝜎. Second, we show that the problem has a Ω(N /log 2 N ) space lower bound, and thus our algorithm is essentially time and space optimal. Third, we show that predicting races with even just a single reversal of two sync operations is NP-complete and even W[1]-hard when parameterized by the number of threads. Thus, sync-preservation characterizes exactly the tractability boundary of race prediction, and our algorithm is nearly optimal for the tractable side. Our experiments show that our algorithm is fast in practice, while sync-preservation characterizes races often missed by state-of-the-art methods.
CCS Concepts: • Software and its engineering → Software verification and validation; • Theory of computation → Theory and algorithms for application domains; Program analysis.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper17
- Sound and efficient concurrency bug predictionYan Cai, Hao Yun, Jinqiu Wang, Lei Qiao 等FSE 2021 · 被引用 29 次
- Greybox Fuzzing for Concurrency TestingDylan Wolff, Zheng Shi, Gregory J. Duck, Umang Mathur 等ASPLOS 2024 · 被引用 19 次
- Sound Dynamic Deadlock Prediction in Linear TimeHünkar Can Tunç, Umang Mathur, Andreas Pavlogiannis, Mahesh ViswanathanPLDI 2023 · 被引用 15 次
- Predictive Monitoring against Pattern Regular LanguagesZhendong Ang, Umang MathurPOPL 2024 · 被引用 12 次
- Optimal Reads-From Consistency Checking for C11-Style Memory ModelsHünkar Can Tunç, Parosh Aziz Abdulla, Soham Chakraborty, Shankaranarayanan Krishna 等PLDI 2023 · 被引用 12 次
它引用的顶会 Paper4
- Fast, sound, and effectively complete dynamic race predictionAndreas PavlogiannisPOPL 2020 · 被引用 46 次
- SmartTrack: efficient predictive race detectionJake Roemer, Kaan Genç, Michael D. BondPLDI 2020 · 被引用 28 次
- The Complexity of Dynamic Data Race PredictionUmang Mathur, Andreas Pavlogiannis, Mahesh ViswanathanLICS 2020 · 被引用 27 次
- Atomicity Checking in Linear Time using Vector ClocksUmang Mathur, Mahesh ViswanathanASPLOS 2020 · 被引用 27 次
相关 Paper
- Optimistic Prediction of Synchronization-Reversal Data RacesZheng Shi, Umang Mathur, Andreas PavlogiannisICSE 2024 · 被引用 8 次
- Predictive Monitoring with Strong Trace PrefixesZhendong Ang, Umang MathurCAV 2024 · 被引用 3 次
- Dynamic Race Detection with O(1) SamplesMosaad Al Thokair, Minjian Zhang, Umang Mathur, Mahesh ViswanathanPOPL 2023 · 被引用 9 次
- Reduce Dependence for Sound Concurrency Bug PredictionShihao Zhu, Yuqi Guo, Yan Cai, Bin Liang 等ICSE 2025 · 被引用 1 次
- Accurate Static Data Race Detection for CEmerson Sales, Omar Inverso, Emilio TuostoFM 2024 · 被引用 1 次
