paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Deadlock prediction via generalized dependency

基于广义依赖的死锁预测
ISSTA Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis2022匹配度 1/10 · 该论文研究并发程序中的死锁动态检测,属于程序分析与软件测试/调试领域,但与用户关注的静态分析、LLM/Agent、浮点程序分析、贝叶斯程序分析等方向均无直接关联。引用 5 inbox
Jinpeng Zhou, Hanmei Yang, John Lange, Tongping Liu
crossref: 2026-09-12

AI 速览

一句话:将条件变量信号抽象为特殊资源,用广义依赖检测通信死锁,UnHang 工具性能开销约3%。

多线程程序中的死锁难以在部署前完全消除,因其出现依赖特定输入和线程调度,需要动态工具辅助。现有死锁检测工具主要关注锁,无法检测与条件变量相关的死锁。本文把条件变量上的 signal 抽象为一种特殊资源,将经典锁依赖扩展为广义依赖,使通信死锁也能建模为 hold-and-wait 环,并设计多种实用机制记录与分析广义依赖。作者实现了工具 UnHang。在真实应用上的实验表明,UnHang 能找到所有已知死锁并发现两个新死锁,同时仅带来约 3% 性能开销和 8% 内存开销,适合部署环境使用。

问题
现有动态死锁检测主要针对锁,难以发现条件变量导致的通信死锁;这些死锁依赖特定调度,部署前难以清除。
方法
将条件变量的 signal 抽象为特殊资源,把锁依赖推广为广义依赖,使通信死锁建模为 hold-and-wait 环,并设计记录与分析机制实现 UnHang。
评估
在真实多线程应用上运行 UnHang,验证其能发现所有已知死锁和两个新死锁,并测得约 3% 性能开销与 8% 内存开销。
原文摘要(Abstract)

Deadlocks are notorious bugs in multithreaded programs, causing serious reliability issues. However, they are difficult to be fully expunged before deployment, as their appearances typically depend on specific inputs and thread schedules, which require the assistance of dynamic tools. However, existing deadlock detection tools mainly focus on locks, but cannot detect deadlocks related to condition variables. This paper presents a novel approach to fill this gap. It extends the classic lock dependency to generalized dependency by abstracting the signal for the condition variable as a special resource so that communication deadlocks can be modeled as hold-and-wait cycles as well. It further designs multiple practical mechanisms to record and analyze generalized dependencies. In the end, this paper presents the implementation of the tool, called UnHang. Experimental results on real applications show that UnHang is able to find all known deadlocks and uncover two new deadlocks. Overall, UnHang only imposes around 3% performance overhead and 8% memory overhead, making it a practical tool for the deployment environment.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot7419,
  title = {Deadlock prediction via generalized dependency},
  author = {Jinpeng Zhou and Hanmei Yang and John Lange and Tongping Liu},
  booktitle = {ISSTA},
  year = {2022},
  doi = {10.1145/3533767.3534377}
}