Analyzing Data Race Vulnerabilities in Go's Concurrency Model
By
ingve
If you only eat one bagel today, this is the bagel.
Summary
This article is a technical critique of Go programming language's concurrency model, focusing on how easily developers can create data races despite Go's reputation for making concurrent programming simple. The author, with years of production Go experience, discusses various ways data races occur in Go programs, highlighting the language's 'footguns' and sharing insights from encountering and fixing numerous data race issues in real-world applications.
Key quotes
· 3 pulledGo is often touted for its ease to write highly concurrent programs. However, it is also mind-boggling how many ways Go happily gives us developers to shoot ourselves in the foot.
I have been writing production applications in Go for a few years now. I like some aspects of Go. One aspect I do not like is how easy it is to create data races in Go.
Over the years I have encountered and fixed many interesting kinds of data races in Go.
You might also wanna read
Dynamic Borrow-Checking in a Toy Programming Language: Implementing Rust-like Memory Safety Without Static Types
This article presents a demonstration of a toy programming language that implements borrow-checking without static type-checking. The langua
C++26 Standard Draft Finalized with Reflection, Memory Safety, Contracts, and New Concurrency Framework
The C++26 standard draft has been completed, introducing major new features including reflection capabilities that allow C++ to describe its
Understanding Fil-C: A Simplified Model of Memory-Safe C/C++ Implementation
The article presents a simplified model of Fil-C, a memory-safe implementation of C/C++. It explains that while the real Fil-C uses a compil
Sky: An Experimental Elm-Inspired Programming Language That Compiles to Go
Sky is an experimental programming language that combines Go's pragmatism with Elm's elegance to create a fullstack functional programming l
Analyzing Rust's Coherence and Orphan Rules: Ecosystem Development Challenges and Proposed Solutions
This article critiques Rust programming language's coherence rules and orphan rules, which prevent implementing traits for types defined in
SBCL Fibers: Implementation Design for Lightweight Cooperative Threads
This is a draft design document describing the implementation of lightweight userland cooperative threads (called 'fibers') for SBCL (Steel
