一句话:提出必要一致读事件(NRE)与混合分析算法,用静态语义精化读依赖,在不牺牲可靠性的前提下扩大线程交错空间,发现更多并发缺陷。
动态并发缺陷预测通常只依赖 trace 的动态信息,为保证可靠性而假设任意内存读都能通过控制流/数据流影响后续执行;该假设过度近似了写读约束,压缩线程交错的重排序空间,导致漏报。本文提出必要一致读事件(NRE)概念与混合分析算法:NRE 基于静态程序语义精化读与其后续事件的依赖,仅保留读可能影响后续执行时的必要约束;算法将 trace 事件映射到程序 SSA 指令并基于原 trace 模拟执行,为每个事件精确高效地计算 NRE。作者以数据竞争为对象实现原型 RECONP,在 MySQL 上与 M2、Seqcheck 对比,数据竞争检出数分别提升 46.9% 和 22.4%,混合算法仅占 34% 总时间开销。
Recently, dynamic concurrency bug predictions have kept making notable progress in improving concurrency coverage while ensuring soundness. Most of them rely solely on dynamic information in traces and overlook the static semantics of the program when predicting bugs. To ensure soundness, they assume that any (memory) read can fully affect subsequent program execution via control-flow and data-flow. However, the assumption over-approximates constraints among (memory) writes and reads and hence limits reordering space over thread interleaving, ultimately leading to false negatives. From program semantics, only a subset of reads actually affect their subsequent executions. Therefore, by refining dependencies between reads and subsequent executions based on static program semantics, one can refine the assumption and eliminate unnecessary constraints. This can bring a chance to explore more thread interleaving space and uncover more concurrency bugs. However, refining dependencies can compromise soundness and bring heavy overhead. To tackle these challenges, this paper introduces the concept of Necessary Consistent Read Event (NRE) and a hybrid analysis algorithm. NRE refines dependencies between reads and their subsequent events and is used to identify necessary constraints where a read probably affects the execution of its subsequent events. Next, we design an efficient and accurate hybrid analysis algorithm to calculate NREs for each event in the trace. The hybrid analysis algorithm maps events to program SSA instructions and simulates executions based on the original trace. NRE and the algorithm can enhance the capabilities of existing concurrency bug prediction methods at a low cost, regardless of the type of concurrency bug they target. In this paper, we focused on data race and developed NRE and the algorithm as a prototype tool RECONP. We conducted a set of comparative experiments on MySQL with M2 and Seqcheck. The results show that RECONP can detect 46.9% and 22.4% more data races than M2 and Seqcheck, respectively. And the hybrid algorithm only accounts for 34% of the total time cost.
DOI 原文 ·
@inproceedings{paperbot8744,
title = {Reduce Dependence for Sound Concurrency Bug Prediction},
author = {Shihao Zhu and Yuqi Guo and Yan Cai and Bin Liang and Long Zhang and Rui Chen and Tingting Yu},
booktitle = {ICSE},
year = {2025},
doi = {10.1109/icse55347.2025.00149}
}