Comment by thwarted
3 days ago
The race detector has always only worked at run time, and is documented to detect concurrent memory accesses. This means the memory has to actually be accessed in order for it to see the race condition. It does not do static analysis.
https://go.dev/blog/race-detector
> Because of its design, the race detector can detect race conditions only when they are actually triggered by running code, which means it’s important to run race-enabled binaries under realistic workloads.
This isn't a mutex blind spot. It is a side effect of goroutine/thread scheduling, which will obviously be based on workload and other factors. There are a bunch of other cases, that are not mutex related, that it won't see unless execution actually triggers them.
No comments yet
Contribute on Hacker News ↗