一句话:为 JVM 并发测试框架 Lincheck 开发 IntelliJ IDEA 插件,支持执行轨迹的记录回放式调试。
本文介绍了一个面向 Lincheck 的 IntelliJ IDEA 插件。Lincheck 是 JVM 上广泛使用的并发数据结构测试框架,它能自动生成并发场景并用模型检查器检验,在发现错误时给出包含所有共享内存访问与同步事件的详细执行轨迹。然而,仅有轨迹并不便于开发者定位问题。该插件提供记录-回放(record-and-replay)调试能力,在 IDE 中原生复现失败执行:它会在失败执行的起点暂停,并通过额外面板可视化失败场景、执行轨迹和数据结构当前状态。开发者可以沿轨迹前后步进,观察数据结构如何变化,从而复现并定位错误。作者认为这些新能力显著改善了调试流程,使复杂并发缺陷的识别与修复更加容易。
This paper presents an IntelliJ IDEA plugin for Lincheck -- a popular framework for testing concurrent data structures on JVM. The Lincheck framework automatically generates concurrent scenarios and examines them with a model checker, providing a detailed execution trace that reproduces the detected error. This trace includes all shared memory access and synchronization events. The IntelliJ IDEA plugin offers record-and-replay debugging to study the execution trace, providing native debugging experience in the IDE. The Lincheck plugin pauses the failed execution at the beginning and provides additional panels that visualize the failed scenario, the execution trace, and the current state of the data structure. One can step through the trace and reproduce the error, moving forward and backward and observing how the data structure changes. These novel capabilities significantly improve the debugging process, making identifying and fixing complex concurrency bugs easier.