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日
异常检测(Anomaly Detection)综述
极市平台
20+阅读 · 2020年10月24日
【KDD2020】动态知识图谱的多事件预测
专知
88+阅读 · 2020年8月31日
异常检测论文大列表:方法、应用、综述
专知
126+阅读 · 2019年7月15日
时序异常检测算法概览
论智
29+阅读 · 2018年8月30日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
相关VIP内容
深度学习在时间序列异常检测中的应用综述
专知会员服务
110+阅读 · 2022年11月11日
12篇顶会论文,深度学习时间序列预测经典方案汇总!
专知会员服务
55+阅读 · 2022年4月11日
专知会员服务
237+阅读 · 2020年12月15日
相关基金
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员