一句话:提出 GoPie,利用执行历史做原语约束的定向交错探索,高效检测 Go 并发缺陷。
Go 语言鼓励使用基于 channel 的并发,虽然简化了并发程序开发,却带来了不同于共享内存并发的新问题,而现有针对 Go 特有并发问题的检测工作很少,即使是先进测试工具也会因缺乏细粒度、有效的交错探索而漏掉关键并发缺陷。本文提出 GoPie,一种通过原语约束交错探索来检测 Go 并发缺陷的测试方法。它不依赖穷举探索或随机调度,而是利用执行历史来识别新的交错,从而定向地探索更可能触发缺陷的调度。作者在已有基准和大型开源项目上评估了 GoPie,结果表明它能有效探索并发交错,在基准中检测到显著更多的缺陷,并在真实项目中发现了 11 个此前未知的并发缺陷,其中 9 个已被确认。
The Go language (Go/Golang) has been attracting increasing attention from the industry over recent years due to its strong concurrency support and ease of deployment. This programming language encourages developers to use channel-based concurrency, which simplifies the development of concurrent programs. Unfortunately, it also introduces new concurrency problems that differ from those caused by the mechanism of shared memory concurrency. However, there are only few works that aim to detect such Go-specific concurrency issues. Even state-of-the-art testing tools will miss critical concurrent bugs that require fine-grained and effective interleaving exploration. This paper presents GoPie, a novel testing approach for detecting Go concurrency bugs through primitive-constrained interleaving exploration. GoPie utilizes execution histories to identify new interleavings instead of relying on exhaustive exploration or random scheduling. To evaluate its performance, we applied GoPie to existing benchmarks and large-scale open-source projects. Results show that GoPie can effectively explore concurrent interleavings and detect significantly more bugs in the benchmark. Furthermore, it uncovered 11 unique previously unknown concurrent bugs, and 9 of which have been confirmed.
@inproceedings{JiangWYPYJ23,
title = {Effective Concurrency Testing for Go via Directional Primitive-Constrained Interleaving Exploration},
author = {Zongze Jiang and Ming Wen and Yixin Yang and Chao Peng and Ping Yang and Hai Jin},
booktitle = {ASE},
year = {2023},
doi = {10.1109/ase56229.2023.00086}
}