Lune

ASPLOS2021Top-tier venue

Automatically detecting and fixing concurrency bugs in go software systems

Ziheng Liu, Shuofei Zhu, Boqin Qin, Hao Chen, Linhai Song

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

10 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Compiling Distributed System Models with PGo cites Who goes first? detecting go concurrency bugs via message reordering
  • Detecting Blocking Errors in Go Programs using Localized Abstract Interpretation cites Who goes first? detecting go concurrency bugs via message reordering
  • Detecting Blocking Errors in Go Programs using Localized Abstract Interpretation cites Automated Verification of Go Programs via Bounded Model Checking
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers10

  1. Controlled Concurrency Testing via Periodical SchedulingCheng Wen, Mengda He, Bohao Wu, Zhiwu Xu et al.ICSE 2022 · 25 citations
  2. Who goes first? detecting go concurrency bugs via message reorderingZiheng Liu, Shihao Xia, Yu Liang, Linhai Song et al.ASPLOS 2022 · 21 citations
  3. Automated Verification of Go Programs via Bounded Model CheckingNicolas Dilley, Julien LangeASE 2021 · 21 citations
  4. Compiling Distributed System Models with PGoA. Finn Hackett, Shayan Hosseini, Renato Costa, Matthew Do et al.ASPLOS 2023 · 13 citations
  5. Detecting Blocking Errors in Go Programs using Localized Abstract InterpretationOskar Haarklou Veileborg, Georgian-Vlad Saioc, Anders MøllerASE 2022 · 12 citations

Related papers

  1. GoPV: Detecting Blocking Concurrency Bugs Related to Shared-Memory Synchronization in GoWei Song, Xiaofan Xu, Jeff HuangISSTA 2025
  2. Effective Concurrency Testing for Go via Directional Primitive-Constrained Interleaving ExplorationZongze Jiang, Ming Wen, Yixin Yang, Chao Peng et al.ASE 2023 · 6 citations
  3. A study of real-world data races in GolangMilind Chabbi, Murali Krishna RamanathanPLDI 2022 · 34 citations
  4. Fuzzing channel-based concurrency runtimes using types and effectsQuentin Stiévenart, Magnus MadsenOOPSLA 2020 · 2 citations
  5. DR.FIX: Automatically Fixing Data Races at Industry ScaleFarnaz Behrang, Zhizhou Zhang, Georgian-Vlad Saioc, Peng Liu et al.PLDI 2025 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines