-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: test -race -covermode=count correctly detects cover races #12118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Note: I've not been able to get the OS X Go 1.5rc1 race detector to raise these race conditions, yet. Only the TravisCI one that is on linux. I've not had a chance to repro on a real linux machine directly. |
Okay, the places I found that were obviously races in the boulder/log package have not fixed those DATA RACEs and the busted constructed stack traces have made it difficult to find the rest of the races. The attempted fixes can be found in this branch: https://github.com/jmhodges/boulder/tree/auditlogger_race/log It's an unusual library, but one that is real and is being deployed to a production-like setting. Sorry for its weirdness. |
Also, this occurs in tip on TravisCI at |
You are using -covermode=count, these are races on coverage counters. |
If you ask for go test -race -covermode=count, then that's what you get. There is even a test case for this in cmd/go. Don't do that. There's no bug for Go 1.5 here. |
Okay, cool. I hadn't thought about those being related. |
There are races in the count cover mode and there is an issue for it: golang/go#12118.
There are races in the count cover mode and that makes spurious-to-us looking race conditions crop up for things that are not races. There is an issue for it: golang/go#12118.
The count covermode is racy and was causing spurious-to-us looking (but not really) race detections in the tests. See golang/go#12118
The count covermode is racy and was causing spurious-to-us looking (but not really) race detections in the tests. See golang/go#12118
This is what covermode -atomic is for. |
Not an issue. The title even says, "correctly". :) |
Looking at https://travis-ci.org/jmhodges/boulder/builds/75187815, the first DATA RACE section has
Notice that both filepaths and line numbers are the same, but the functions referenced are different.
Also, the code at audit-logger_test.go:216 (not my filename choice; don't hate) is:
which does not deal directly log.Dial or log.initializeAuditLogger. You can find this code, currently, at https://github.com/letsencrypt/boulder/blob/2d92b1f348719ab096292308437b88ec0bb31979/log/audit-logger_test.go#L216
The text was updated successfully, but these errors were encountered: