Good news, everyone!
Go race detector is in pretty stable state now, and I am looking for beta users before Go1.1 release.
To date the race detector has found 100+ bugs in various Go code, including 33 bugs in std lib.
Currently it works on linux/windows/darwin amd64. You need tip >= r14902.
The usage is very simple -- you just need to add -race flag to go command:
$ go test -race mypkg // to test the package
$ go run -race mycmd // to run the command
$ go build -race mycmd // to build the command
$ go install -race mypkg // to install the package
You may start with running your tests. However sometimes tests have limited coverage, especially with respect to concurrency. So it may be beneficial to run the whole program built with -race under a realistic workload. If it find a data race, it prints an informative report to stderr explaining where the race has happened.
I would appreciate any feedback, in particular:
- if it does not work for you for any reason
- if you find anything non-obvious regarding the detector
- your success stories
And, yeah, it significantly increases both memory consumption (~5-10x) and execution time (~2-20x).
Please post comments here:https://groups.google.com/forum/?fromgroups=#!topic/golang-dev/CLsy3zmf9Ec