paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Automatically detecting and fixing concurrency bugs in go software systems

自动检测并修复 Go 软件系统中的并发缺陷
ASPLOS Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems2021匹配度 3/10 · 该论文属于静态程序分析与自动化修复,并有 Docker/Kubernetes/gRPC 等工业落地案例,与用户对‘兼具理论与工程实现’的偏好部分相符;但它面向 Go 并发缺陷,不涉及 LLM/Agentic 程序、AI 改进静态分析、浮点程序分析或贝叶斯程序分析,因此不在当前研究画像的核心交叉范围内。引用 31 inbox
Ziheng Liu, Shuofei Zhu, Boqin Qin, Hao Chen, Linhai Song
crossref: 2026-09-12

AI 速览

一句话:提出 GCatch 与 GFix,自动检测并修复 Go 中因 channel 误用导致的阻塞型并发缺陷。

Go 语言鼓励使用轻量级 goroutine 和 channel 进行并发编程,但实证研究表明,channel 误用引发的并发缺陷在 Go 生态中广泛存在,严重损害系统可靠性。针对这类缺陷,本文提出静态检测系统 GCatch 与自动修复系统 GFix。GCatch 先对输入的 Go 程序进行解缠,再用一种新颖的约束系统对复杂的 channel 操作建模,并调用约束求解器识别阻塞型缺陷;GFix 则利用 Go 中与 channel 相关的语言特性,为 GCatch 检测出的阻塞缺陷自动生成补丁。作者将二者应用于 21 个流行 Go 应用,包括 Docker、Kubernetes 和 gRPC 等,共发现 149 个此前未知的 channel 误用阻塞缺陷,GFix 成功修复其中 124 个;开发者已基于报告修复 125 个缺陷,其中 87 个直接采用了 GFix 生成的补丁。

问题
Go 中因 channel 误用导致的并发缺陷广泛存在并影响可靠性,现有方法难以自动检测和修复这类阻塞缺陷。
方法
GCatch 对 Go 程序解缠并用约束系统建模复杂 channel 操作,通过约束求解识别阻塞缺陷;GFix 基于 Go 的 channel 语言特性自动生成修复补丁。
评估
在 21 个流行 Go 应用(如 Docker、Kubernetes、gRPC)上评估,GCatch 发现 149 个新缺陷,GFix 修复 124 个;开发者已确认修复 125 个,其中 87 个直接采用 GFix 补丁。
原文摘要(Abstract)

Go is a statically typed programming language designed for efficient and reliable concurrent programming. For this purpose, Go provides lightweight goroutines and recommends passing messages using channels as a less error-prone means of thread communication. Go has become increasingly popular in recent years and has been adopted to build many important infrastructure software systems. However, a recent empirical study shows that concurrency bugs, especially those due to misuse of channels, exist widely in Go. These bugs severely hurt the reliability of Go concurrent systems. To fight Go concurrency bugs caused by misuse of channels, this paper proposes a static concurrency bug detection system, GCatch, and an automated concurrency bug fixing system, GFix. After disentangling an input Go program, GCatch models the complex channel operations in Go using a novel constraint system and applies a constraint solver to identify blocking bugs. GFix automatically patches blocking bugs detected by GCatch using Go’s channel-related language features. We apply GCatch and GFix to 21 popular Go applications, including Docker, Kubernetes, and gRPC. In total, GCatch finds 149 previously unknown blocking bugs due to misuse of channels and GFix successfully fixes 124 of them. We have reported all detected bugs and generated patches to developers. So far, developers have fixed 125 blocking misuse-of-channel bugs based on our reporting. Among them, 87 bugs are fixed by applying GFix’s patches directly.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6094,
  title = {Automatically detecting and fixing concurrency bugs in go software systems},
  author = {Ziheng Liu and Shuofei Zhu and Boqin Qin and Hao Chen and Linhai Song},
  booktitle = {ASPLOS},
  year = {2021},
  doi = {10.1145/3445814.3446756}
}