-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: data race in concurrent compiler #20144
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
Previous read at 0x00c420671ab8 by goroutine 35: I'd say we have two bugs. |
CL https://golang.org/cl/41973 mentions this issue. |
It disturbs me that I haven't been able to reproduce this locally. My past experience is that such issues reproduce very readily. It seems very likely that I've done this to myself, by packing Node.Used into a single field with other Node data, notably Class. But before attempting to fix it, I'd like to reproduce it... |
There's been one failure on the race builder so far, before we started sorting functions by length. The race detector can only detect actual races, and ordering functions by length might reduce the odds of catching some kinds of races. Give it more to chew on. Updates #20144 Change-Id: I0206ac182cb98b70a729dea9703ecb0fef54d2d0 Reviewed-on: https://go-review.googlesource.com/41973 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
CL https://golang.org/cl/42015 mentions this issue. |
Node.Used was written to from the backend concurrently with reads of Node.Class for the same ONAME Nodes. I do not know why it was not failing consistently under the race detector, but it is a race. This is likely also a problem with Node.HasVal and Node.HasOpt. They will be handled in a separate CL. Fix Used by moving it to gc.Name and making it a separate bool. There was one non-Name use of Used, marking OLABELs as used. That is no longer needed, now that goto and label checking happens early in the front end. Leave the getters and setters in place, to ease changing the representation in the future (or changing to an interface!). Updates #20144 Change-Id: I9bec7c6d33dcb129a4cfa9d338462ea33087f9f7 Reviewed-on: https://go-review.googlesource.com/42015 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
I manually instrumented Node.flags with a poison pill, so as to be sure I've caught all such races. There were legit races with Node.Used and Node.HasOpt. CL 42015 fixed Node.Used. I'm working on Node.HasOpt. |
CL https://golang.org/cl/42135 mentions this issue. |
There's been one failure on the race builder so far, before we started sorting functions by length. The race detector can only detect actual races, and ordering functions by length might reduce the odds of catching some kinds of races. Give it more to chew on. Updates golang#20144 Change-Id: I0206ac182cb98b70a729dea9703ecb0fef54d2d0
Thanks to the new racecompile builder (#19962), we have our first data race failure bug report for the new cmd/compile -c concurrent compilation:
https://build.golang.org/log/16ef1dc48a907d5a57439aa9475f727a04f86a88
The text was updated successfully, but these errors were encountered: