-
Notifications
You must be signed in to change notification settings - Fork 18k
go/types: data race due to lazy interface completion #47726
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
Is this because Interface.Complete is not doing anything anymore? That is, would it be sufficient to revert that change? Or is it a bigger problem? |
Necessary but not sufficient. Here's a failure at the dev.typeparams merge: |
Change https://golang.org/cl/342710 mentions this issue: |
Change https://golang.org/cl/342749 mentions this issue: |
This reverts commit fda8ee8. Reason for revert: Interface.Complete is still necessary for safe concurrency. For #47726 Change-Id: I8b924ca5f4af8c7d7e2b5a27bb03a5a5ed9b1d22 Reviewed-on: https://go-review.googlesource.com/c/go/+/342710 Trust: Robert Findley <[email protected]> Run-TryBot: Robert Findley <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
Once Interfaces have been completed they must never be written again, as they may be used concurrently. Avoid writing Interface.complete unnecessarily in Complete. Also, update documentation to reflect that Complete must be called before the Interface may be considered safe for concurrent use. For #47726 Change-Id: Ic9fd1395ab0dd6d3499f7a698dadf315abcddab8 Reviewed-on: https://go-review.googlesource.com/c/go/+/342749 Trust: Robert Findley <[email protected]> Run-TryBot: Robert Findley <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
I believe this is fixed now, but I'll leave it open for visibility in case there are any additional flakes in the race builders. Will close tomorrow if no additional failures. |
Closing as the build dashboard looks clean. |
Sample failure:
https://build.golang.org/log/66aed38eb7030ee6db09e17179d26ce42d59b316
Lazy interface completion causes data races in x/tools. We need to either make interface completion concurrency-safe, or ensure that all interfaces that escape the Checker have been completed.
CC @griesemer
The text was updated successfully, but these errors were encountered: