A Compositional Deadlock Detector for Android Java
James Brotherston, Paul Brunet, Nikos Gorogiannis, Max I. Kanovich
摘要
We develop a static deadlock analysis for commercial Android Java applications, of sizes in the tens of millions of LoC, under active development at Facebook. The analysis runs primarily at code-review time, on only the modified code and its dependents; we aim at reporting to developers in under 15 minutes. To detect deadlocks in this setting, we first model the real language as an abstract language with balanced re-entrant locks, nondeterministic iteration and branching, and non-recursive procedure calls. We show that the existence of a deadlock in this abstract language is equivalent to a certain condition over the sets of critical pairs of each program thread; these record, for all possible executions of the thread, which locks are currently held at the point when a fresh lock is acquired. Since the critical pairs of any program thread is finite and computable, the deadlock detection problem for our language is decidable, and in NP. We then leverage these results to develop an open-source implementation of our analysis adapted to deal with real Java code. The core of the implementation is an algorithm which computes critical pairs in a compositional, abstract interpretation style, running in quasi-exponential time. Our analyser is built in the INFER verification framework and has been in industrial deployment for over two years; it has seen over two hundred fixed deadlock reports with a report fix rate of ∼54%.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Place Your Locks Well: Understanding and Detecting Lock Misuse Bugs 引用了 Peahen: fast and precise static deadlock detection via context reduction
- Peahen: fast and precise static deadlock detection via context reduction 引用了 Low-overhead deadlock prediction
- When Threads Meet Interrupts: Effective Static Detection of Interrupt-Based Deadlocks in Linux 引用了 Place Your Locks Well: Understanding and Detecting Lock Misuse Bugs
- When Threads Meet Interrupts: Effective Static Detection of Interrupt-Based Deadlocks in Linux 引用了 Low-overhead deadlock prediction
- When Threads Meet Interrupts: Effective Static Detection of Interrupt-Based Deadlocks in Linux 引用了 Peahen: fast and precise static deadlock detection via context reduction
引用它的顶会 Paper4
- Concurrent incorrectness separation logicAzalea Raad, Josh Berdine, Derek Dreyer, Peter W. O'HearnPOPL 2022 · 24 次引用
- Peahen: fast and precise static deadlock detection via context reductionYuandao Cai, Chengfeng Ye, Qingkai Shi, Charles ZhangFSE 2022 · 16 次引用
- When Threads Meet Interrupts: Effective Static Detection of Interrupt-Based Deadlocks in LinuxChengfeng Ye, Yuandao Cai, Charles ZhangUSENIX Security 2024 · 5 次引用
- Place Your Locks Well: Understanding and Detecting Lock Misuse BugsYuandao Cai, Peisen Yao, Chengfeng Ye, Charles ZhangUSENIX Security 2023
它引用的 Paper1
相关 Paper
- DLOS: Effective Static Detection of Deadlocks in OS KernelsJia-Ju Bai, Tuo Li, Shi-Min HuUSENIX ATC 2022 · 10 次引用
- Static executes-before analysis for event driven programsRekha R. Pai, Abhishek Uppar, Akshatha Shenoy, Pranshul Kushwaha 等FSE 2022
- Static asynchronous component misuse detection for Android applicationsLinjie Pan, Baoquan Cui, Hao Liu, Jiwei Yan 等FSE 2020 · 10 次引用
- Database Deadlock Diagnosis for Large-Scale ORM-Based Web ApplicationsZhiyuan Dong, Zhaoguo Wang, Chuanwei Yi, Xian Xu 等ICDE 2023 · 7 次引用
- A Predictive Analysis for Detecting Deadlock in MPI ProgramsYu Huang, Benjamin Ogles, Eric MercerASE 2020 · 3 次引用
