-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
testing: data race in testing.go #15976
Comments
This is actually intended behavior. If you read the panic in https://travis-ci.org/fsnotify/fsnotify/jobs/135335818, you see the message: Prior to Go 1.7, the testing package would silently ignore this situation, but in Go1.7 it would now complain loudly when this happened. If this is not the case, feel free to re-open this issue! |
@dsnet a data race can never be intented behaviour; data race means "all bets are off" and should be fixed -- or at least not brushed off with a "I don't think this is an issue anymore". There are two issues in the log above. I have no access to reopen this issue, so please do. |
@bep, the issue is in the fsnotify code, you should raise the error there. |
The data race is in the Go code. |
@bep i'm sorry it is not. The race is because the fsnotify test is calling Fatal in a goroutine it has spawned from the main testing goroutine. This is specifically prohibited, and noted explicitly when running under the race detector. |
It is intended behavior in the sense that calling Thus, correct Go tests must ensure that they don't call |
@bep FYI see #15654 and https://golang.org/cl/23320 for more info. |
Russ' comment on that CL is helpful:
|
Thanks for the context, will track this on fsnotify. |
Please answer these questions before submitting your issue. Thanks!
go version
)?tip
go env
)?Linux.
See https://travis-ci.org/fsnotify/fsnotify/jobs/124355194
There have been several related issues with the fsnotify build on Linux on tip lately.
See fsnotify/fsnotify#150
The text was updated successfully, but these errors were encountered: