Automatically Detecting and Fixing Deadlocks in Go Code with GoDDaR
Gustavo Feio, Jorge Coelho, Miguel Flor, Jo\~ao M. Louren\c{c}o, Ant\'onio Ravara
Key points
From the paper's conclusion- We evaluate GoDDaR on a benchmark suite of representative deadlock examples from literature and git repositories to validate algorithm correctness and compare performance against the state of the art.
Abstract
The Go programming language provides a lightweight abstraction for concurrent programming through goroutines, which are prone to deadlocks. Go includes a runtime detector that aborts execution when all threads are blocked (a global deadlock). However, due to nondeterministic thread scheduling, this runtime mechanism only detects global deadlocks that manifest during execution and cannot identify partial deadlocks, where a subset of goroutines is permanently blocked while at least one remains runnable. Statically detecting local deadlocks is essential for developing dependable concurrent software. While several tools statically detect deadlocks in concurrent programs, few assist developers in fixing them. Detecting and resolving partial deadlocks requires reasoning about complex interleavings and communication patterns, an inherently challenging task. In this paper, we present GoDDaR, a tool that detects unobserved global or partial deadlocks in Go programs and suggests concrete fixes. GoDDaR translates Go source code into an intermediate representation reflecting message-passing communication events and composition patterns. Partial deadlocks are identified through symbolic analysis over this representation. To resolve detected deadlocks, our algorithms transform the intermediate representation to eliminate problematic synchronization patterns, allowing GoDDaR to generate fix suggestions for the original Go source code as a diff. We evaluate GoDDaR on a benchmark suite of representative deadlock examples from literature and git repositories to validate algorithm correctness and compare performance against the state of the art. Results demonstrate that GoDDaR is competitive with top approaches in partial deadlock detection and advances the state of the art in automated deadlock fixing.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Interrupt-Aware Static Detection of Deadlocks in Rust Operating SystemsarXiv · 2026
- AtomicFaaS: Offloading Side-Effect Compensation to the Serverless PlatformarXiv · 2026
- Petri Nets-based Methods on Automatically Detecting for Concurrency Bugs in Rust ProgramsACM Transactions on Autonomous and Adaptive Systems · 2026
- CONCUR: Benchmarking LLMs for Concurrent Code GenerationProceedings of the ACM on Software Engineering · 2026
- VerusWeave: A Benchmark for Proof Repair in Concurrent Verus ProgramsarXiv · 2026
- From Ripple to Boundary: Deterministic Impact Boundaries for LLM-Based Software EvolutionarXiv · 2026