Deadlocks are a major source of bugs in concurrent programs. They are hard to predict, because they may only occur under specific scheduling conditions. Dynamic analysis attempts to identify potential deadlocks by examining a single execution trace of the program. A standard approach involves monitoring sequences of lock acquisitions in each thread, with the goal of identifying deadlock patterns. A deadlock pattern is characterized by a cyclic chain of lock acquisitions, where each lock is held by one thread while being requested by the next. However, it is well known that not all deadlock patterns identified in this way correspond to true deadlocks, as they may be impossible to manifest under any schedule. We tackle this deficiency by proposing a new method based on partial orders to eliminate false positives: lock acquisitions must be unordered under a given partial order, and not preceded by other deadlock patterns. We prove soundness (no falsely predicted deadlocks) for the novel TRW partial order, and completeness (no deadlocks missed) for a slightly weakened variant of TRW. Both partial orders can be computed efficiently and report the same deadlocks for an extensive benchmark suite.


翻译:死锁是并发程序中错误的主要来源。由于死锁可能仅在特定调度条件下出现,因此难以预测。动态分析通过检查程序的单次执行轨迹来尝试识别潜在死锁。标准方法涉及监控每个线程中锁获取的顺序,旨在识别死锁模式。死锁模式表现为锁获取的循环链,其中每个锁被一个线程持有,同时被另一个线程请求。然而,众所周知,通过这种方式识别的死锁模式并非全部对应真实死锁,因为它们在任意调度下可能无法复现。为解决这一缺陷,我们提出了一种基于偏序关系的新方法,用于消除误报:在给定偏序关系下,锁获取必须是无序的,且不能先于其他死锁模式出现。我们证明了新型TRW偏序关系的完备性(无错误预测死锁),并证明了其弱化变体TRW的完全性(无遗漏死锁)。两种偏序关系均可高效计算,并在广泛的基准测试集上报告相同的死锁结果。

0
下载
关闭预览

相关内容

深度学习在时间序列异常检测中的应用综述
专知会员服务
110+阅读 · 2022年11月11日
12篇顶会论文,深度学习时间序列预测经典方案汇总!
专知会员服务
55+阅读 · 2022年4月11日
专知会员服务
237+阅读 · 2020年12月15日
【KDD2020】动态知识图谱的多事件预测
专知
88+阅读 · 2020年8月31日
异常检测论文大列表:方法、应用、综述
专知
126+阅读 · 2019年7月15日
时序异常检测算法概览
论智
29+阅读 · 2018年8月30日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关VIP内容
深度学习在时间序列异常检测中的应用综述
专知会员服务
110+阅读 · 2022年11月11日
12篇顶会论文,深度学习时间序列预测经典方案汇总!
专知会员服务
55+阅读 · 2022年4月11日
专知会员服务
237+阅读 · 2020年12月15日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员