arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.20070cs.PL
收藏

部分序用于精确且高效的动态死锁预测

Partial Orders for Precise and Efficient Dynamic Deadlock Prediction

Bas van den Heuvel, Martin Sulzmann, Peter Thiemann

AI总结:

本文提出基于部分序的方法消除死锁预测中的假阳性,通过TRW部分序保证预测的正确性和完整性,提升动态死锁分析的准确性。

摘要:

死锁是并发程序中主要的bug来源,因其可能仅在特定调度条件下发生,动态分析通过单次执行轨迹识别潜在死锁。传统方法通过监控线程中锁获取序列寻找死锁模式,但并非所有识别出的死锁模式都对应真实死锁。本文提出基于部分序的新方法,要求锁获取在给定部分序下无序且不被其他死锁模式preceded,证明TRW部分序的正确性和弱化变体的完整性,两者能高效计算并在基准套件中报告相同死锁。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑