-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
runtime: new timer causes racy use of timer #35394
Comments
I haven't yet been able to recreate the problem myself. Your code looks like it can make simultaneous calls to the |
@ianlancetaylor The problem appears with very high probability(the test may success), perhaps you will need to run the test many times. The code does not have simultaneous calls to the |
@ianlancetaylor BTW, the test never fails in Go 1.12 and 1.13 releases. The use of runtime.Gosched causes the reported panic, see changkun/pkg@6897eac |
What prevents the |
You are right, However, if so, the previous releases are failed to report this issue. Does it still count as issue report? In Go 1.13:
In Go 1.14:
|
Thanks for figuring it out. No, it's not a bug that the new version reports a race when the old version does not. This kind of race reporting is not deterministic. It might miss some races. The most important thing is that it shouldn't have any false positives: any race that it reports should be a real race. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, it is reproducible in the current master branch(6dc250f), but it does not appear in
go1.13.3 darwin/amd64
.What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Without any panics.
What did you see instead?
Runtime panic.
The text was updated successfully, but these errors were encountered: