Lune

PLDI2023Top-tier venue

Sound Dynamic Deadlock Prediction in Linear Time

Hünkar Can Tunç, Umang Mathur, Andreas Pavlogiannis, Mahesh Viswanathan

Abstract

Deadlocks are one of the most notorious concurrency bugs, and significant research has focused on detecting them efficiently. Dynamic predictive analyses work by observing concurrent executions, and reason about alternative interleavings that can witness concurrency bugs. Such techniques offer scalability and sound bug reports, and have emerged as an effective approach for concurrency bug detection, such as data races. Effective dynamic deadlock prediction, however, has proven a challenging task, as no deadlock predictor currently meets the requirements of soundness, high-precision, and efficiency.

In this paper, we first formally establish that this tradeoff is unavoidable, by showing that (a) sound and complete deadlock prediction is intractable, in general, and (b) even the seemingly simpler task of determining the presence of potential deadlocks, which often serve as unsound witnesses for actual predictable deadlocks, is intractable. The main contribution of this work is a new class of predictable deadlocks, called sync(hronization)preserving deadlocks. Informally, these are deadlocks that can be predicted by reordering the observed execution while preserving the relative order of conflicting critical sections. We present two algorithms for sound deadlock prediction based on this notion. Our first algorithm SPDOffline detects all sync-preserving deadlocks, with running time that is linear per abstract deadlock pattern, a novel notion also introduced in this work. Our second algorithm SPDOnline predicts all sync-preserving deadlocks that involve two threads in a strictly online fashion, runs in overall linear time, and is better suited for a runtime monitoring setting.

We implemented both our algorithms and evaluated their ability to perform offline and online deadlockprediction on a large dataset of standard benchmarks. Our results indicate that our new notion of syncpreserving deadlocks is highly effective, as (i) it can characterize the vast majority of deadlocks and (ii) it can be detected using an online, sound, complete and highly efficient algorithm.

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.

14 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • The Complexity of Dynamic Data Race Prediction cites Fast, sound, and effectively complete dynamic race prediction
  • CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis cites The Complexity of Dynamic Data Race Prediction
  • CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis cites Fast, sound, and effectively complete dynamic race prediction
  • CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis cites SmartTrack: efficient predictive race detection
  • CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis cites Sound and efficient concurrency bug prediction
  • CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis cites Optimistic Prediction of Synchronization-Reversal Data Races
  • Coarser Equivalences for Causal Concurrency cites The Complexity of Dynamic Data Race Prediction
  • Coarser Equivalences for Causal Concurrency cites Fast, sound, and effectively complete dynamic race prediction
  • Coarser Equivalences for Causal Concurrency cites Optimal prediction of synchronization-preserving races
  • Greybox Fuzzing for Concurrency Testing cites Fast, sound, and effectively complete dynamic race prediction
  • Greybox Fuzzing for Concurrency Testing cites SmartTrack: efficient predictive race detection
  • Greybox Fuzzing for Concurrency Testing cites Predictive Monitoring against Pattern Regular Languages
  • Greybox Fuzzing for Concurrency Testing cites Optimal prediction of synchronization-preserving races
  • SmartTrack: efficient predictive race detection cites Fast, sound, and effectively complete dynamic race prediction
  • Predictive Monitoring against Pattern Regular Languages cites The Complexity of Dynamic Data Race Prediction
  • Predictive Monitoring against Pattern Regular Languages cites Fast, sound, and effectively complete dynamic race prediction
  • Predictive Monitoring against Pattern Regular Languages cites SmartTrack: efficient predictive race detection
  • Predictive Monitoring against Pattern Regular Languages cites Sound and efficient concurrency bug prediction
  • Predictive Monitoring against Pattern Regular Languages cites Optimal prediction of synchronization-preserving races
  • Sound and efficient concurrency bug prediction cites Fast, sound, and effectively complete dynamic race prediction
  • Sound and efficient concurrency bug prediction cites Optimal prediction of synchronization-preserving races
  • Optimal prediction of synchronization-preserving races cites The Complexity of Dynamic Data Race Prediction
  • Optimal prediction of synchronization-preserving races cites Fast, sound, and effectively complete dynamic race prediction
  • Optimal prediction of synchronization-preserving races cites SmartTrack: efficient predictive race detection
  • Optimistic Prediction of Synchronization-Reversal Data Races cites The Complexity of Dynamic Data Race Prediction
  • Optimistic Prediction of Synchronization-Reversal Data Races cites Coarser Equivalences for Causal Concurrency
  • Optimistic Prediction of Synchronization-Reversal Data Races cites Fast, sound, and effectively complete dynamic race prediction
  • Optimistic Prediction of Synchronization-Reversal Data Races cites SmartTrack: efficient predictive race detection
  • Optimistic Prediction of Synchronization-Reversal Data Races cites Predictive Monitoring against Pattern Regular Languages
  • Optimistic Prediction of Synchronization-Reversal Data Races cites Optimal prediction of synchronization-preserving races
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers14

  1. Greybox Fuzzing for Concurrency TestingDylan Wolff, Zheng Shi, Gregory J. Duck, Umang Mathur et al.ASPLOS 2024 · 19 citations
  2. Predictive Monitoring against Pattern Regular LanguagesZhendong Ang, Umang MathurPOPL 2024 · 12 citations
  3. Coarser Equivalences for Causal ConcurrencyAzadeh Farzan, Umang MathurPOPL 2024 · 8 citations
  4. Optimistic Prediction of Synchronization-Reversal Data RacesZheng Shi, Umang Mathur, Andreas PavlogiannisICSE 2024 · 8 citations
  5. 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

Builds on8

  1. Fast, sound, and effectively complete dynamic race predictionAndreas PavlogiannisPOPL 2020 · 46 citations
  2. Optimal prediction of synchronization-preserving racesUmang Mathur, Andreas Pavlogiannis, Mahesh ViswanathanPOPL 2021 · 36 citations
  3. Sound and efficient concurrency bug predictionYan Cai, Hao Yun, Jinqiu Wang, Lei Qiao et al.FSE 2021 · 29 citations
  4. SmartTrack: efficient predictive race detectionJake Roemer, Kaan Genç, Michael D. BondPLDI 2020 · 28 citations
  5. The Complexity of Dynamic Data Race PredictionUmang Mathur, Andreas Pavlogiannis, Mahesh ViswanathanLICS 2020 · 27 citations

Related papers

  1. Predictive Monitoring with Strong Trace PrefixesZhendong Ang, Umang MathurCAV 2024 · 3 citations
  2. A Predictive Analysis for Detecting Deadlock in MPI ProgramsYu Huang, Benjamin Ogles, Eric MercerASE 2020 · 3 citations
  3. Soundness of Predictive Concurrency AnalysesShuyang Liu, Doug Lea, Jens PalsbergOOPSLA 2025
  4. An ownership policy and deadlock detector for promisesCaleb Voss, Vivek SarkarPPoPP 2021 · 2 citations
  5. DLOS: Effective Static Detection of Deadlocks in OS KernelsJia-Ju Bai, Tuo Li, Shi-Min HuUSENIX ATC 2022 · 10 citations
Dusk over the sea between two cliffs drawn in fine vertical lines