arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2501.12618cs.PLcs.DCcs.SE
收藏

Fray:一个高效的 JVM 通用并发测试平台(扩展版)

Fray: An Efficient General-Purpose Concurrency Testing Platform for the JVM (Extended Version)

Ao Li, Byeongjee Kang, Vasudev Vikram, Isabella Laybourn, Samvid Dharanikota, Shrey Tiwari, Rohan Padhye

AI总结:

Fray 是一个针对 JVM 的通用并发测试平台,通过影子锁定机制实现无需替换并发原语的受控线程交错,在基准测试中发现更多错误,并在真实项目中成功发现并发缺陷。

摘要:

并发错误难以发现和复现。先前的工作已经开发了复杂的算法来搜索并发错误,例如部分序采样(POS);然而,现有并发控制平台的局限性阻碍了对真实世界软件的有效测试。我们观察到,在托管代码上进行并发控制的设计空间涉及表达性、适用性和可维护性一方面与错误发现效率另一方面之间的复杂权衡。本文介绍了 Fray,一个用于对无数据竞争 JVM 程序执行一键式并发测试的平台。Fray 背后的关键见解是,有效的受控并发测试需要在不替换现有并发原语的情况下编排线程交错,同时编码其语义以忠实地表达所有可能程序行为的集合。Fray 融入了一种称为影子锁定的新型并发控制机制,旨在使 JVM 程序的受控并发测试变得实用和高效。在 53 个已知错误的基准程序(SCTBench 和 JaConTeBe)上的实证评估中,使用随机搜索的 Fray 比 JPF 多发现 70% 的错误,比 RR 的混沌模式多发现 77% 的错误。我们还展示了 Fray 在 Apache Kafka、Lucene 和 Google Guava 的 2,655 个测试中的一键式适用性。在这些成熟的项目中,Fray 成功发现了 18 个真实世界的并发错误,这些错误可能导致 363 个测试可复现地失败。

英文摘要:

Concurrency bugs are hard to discover and reproduce. Prior work has developed sophisticated algorithms to search for concurrency bugs, such as partial order sampling (POS); however, fundamental limitations with existing platforms for concurrency control hinder effective testing of real-world software. We observe that the design space for concurrency control on managed code involves complex trade-offs between expressibility, applicability, and maintainability on the one hand, and bug-finding efficiency on the other hand. This paper presents Fray, a platform for performing push-button concurrency testing of data-race-free JVM programs. The key insight behind Fray is that effective controlled concurrency testing requires orchestrating thread interleavings without replacing existing concurrency primitives, while encoding their semantics for faithfully expressing the set of all possible program behaviors. Fray incorporates a novel concurrency control mechanism called shadow locking, designed to make controlled concurrency testing practical and efficient for JVM programs. In an empirical evaluation on 53 benchmark programs with known bugs (SCTBench and JaConTeBe), Fray with random search finds 70% more bugs than JPF and 77% more bugs than RR's chaos mode. We also demonstrate Fray's push-button applicability on 2,655 tests from Apache Kafka, Lucene, and Google Guava. In these mature projects, Fray successfully discovered 18 real-world concurrency bugs that can cause 363 tests to fail reproducibly.

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

↑