Unlocking Real-World Go Mutex Usage Patterns by Writing a Mutex Linter

At GopherCon 2026, in Seattle, Washington, United States
Cover for Unlocking Real-World Go Mutex Usage Patterns by Writing a Mutex Linter
Unlocking Real-World Go Mutex Usage Patterns by Writing a Mutex Linter

The trickiest and hardest-to-identify bugs are often those fixable with a single line of code. Hours, days, or months can be spent only to find a missing Unlock() in the (dead) end. After I suffered such a case, I asked myself two questions: “Am I using mutexes wrong?” and “How can I prevent bugs like this in the future?”.

The search for answers led me to the depths of static analysis and an exploration of Go mutex usage patterns in the wild.

In my talk, I want to share my findings and present a new linter for detecting mutex misuse.”

Slides

Explore more events