This document summarizes a study of concurrency bugs in popular Go projects. It finds that blocking bugs caused by message passing are more common than those from shared memory. Message passing leads to fewer non-blocking bugs than shared memory synchronization. Common blocking bugs arise from misuse of channels, mutexes, and wait groups. Non-blocking bugs occur through issues like missing timeouts in selects and data races introduced by anonymous functions. The conclusion is that while message passing is believed to be less error-prone, more blocking bugs in the studied projects came from incorrect channel usage than shared memory issues.
Related topics: