skip to main content
10.1145/3297858.3304069acmconferencesArticle/Chapter ViewAbstractPublication PagesasplosConference Proceedingsconference-collections
research-article

Understanding Real-World Concurrency Bugs in Go

Authors:
Tengfei Tu
Pennsylvania State University, State College, PA, USA
,
Xiaoyu Liu
Purdue University, West Lafayette, IN, USA
,
Linhai Song
Pennsylvania State University, State College, PA, USA
,
Yiying Zhang
Purdue University, West Lafayette, IN, USA
Authors Info & Claims
Published: 04 April 2019 Publication History

Abstract

Go is a statically-typed programming language that aims to provide a simple, efficient, and safe way to build multi-threaded software. Since its creation in 2009, Go has matured and gained significant adoption in production and open-source software. Go advocates for the usage of message passing as the means of inter-thread communication and provides several new concurrency mechanisms and libraries to ease multi-threading programming. It is important to understand the implication of these new proposals and the comparison of message passing and shared memory synchronization in terms of program errors, or bugs. Unfortunately, as far as we know, there has been no study on Go's concurrency bugs. In this paper, we perform the first systematic study on concurrency bugs in real Go programs. We studied six popular Go software including Docker, Kubernetes, and gRPC. We analyzed 171 concurrency bugs in total, with more than half of them caused by non-traditional, Go-specific problems. Apart from root causes of these bugs, we also studied their fixes, performed experiments to reproduce them, and evaluated them with two publicly-available Go bug detectors. Overall, our study provides a better understanding on Go's concurrency models and can guide future researchers and practitioners in writing better, more reliable Go software and in developing debugging and diagnosis tools for Go.

References

[1]
Principles of designing Go APIs with channels. URL: https://inconshreveable.com/07-08--2014/principles-of-designing-go-apis-with-channels/.
[2]
The Go Blog: Share Memory By Communicating. URL: https://blog.golang.org/share-memory-by-communicating.
[3]
Sameer Ajmani. Advanced Go Concurrency Patterns. URL: https://talks.golang.org/2013/advconc.slide.
[4]
Joy Arulraj, Po-Chun Chang, Guoliang Jin, and Shan Lu. Production-run software failure diagnosis via hardware performance counters. In Proceedings of the 18th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '13), Houston, Texas, USA, March 2013.

Cited By

View all
  • (2025)Black-Box Bug Amplification for Multithreaded SoftwareMathematics10.3390/math1318292113:18(2921)Online publication date: 9-Sep-2025
  • (2025)GoPV: A Static Analyzer for Finding Blocking Concurrency Bugs Due to Misuse of Shared-Memory Synchronization in GoProceedings of the 34th ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3713081.3731734(36-40)Online publication date: 25-Jun-2025
  • (2025)GoPV: Detecting Blocking Concurrency Bugs Related to Shared-Memory Synchronization in GoProceedings of the ACM on Software Engineering10.1145/37289792:ISSTA(2319-2339)Online publication date: 22-Jun-2025
  • Show More Cited By

Recommendations

Comments