x/build: create builder that runs with GOEXPERIMENT set to 'staticlockranking' (once lock ranking change is in) #37937
Once my changes https://go-review.googlesource.com/c/go/+/222925 (enable build tag corresponding to
This will not only test that the lock ranking is not being violated in the runtime (hence helping to avoid deadlocks related to lock acquisition ordering), but will also test that the buildtags are correctly set for a different
The text was updated successfully, but these errors were encountered:
Yes, I think a post-submit builder will be fine. This static lock ranking will only affect people who do fairly significant changes to the Go runtime, and those folks will hopefully also know when it will be useful to run the static lock ranking checks before checkin (because they changed the way certain runtime locks are used).
I see. For those CLs, it'll be possible to run the new builder via SlowBots by asking for that builder specifically with something like
I understand it should test only the main Go repository. Let me know if think it would be helpful to test some/many/all golang.org/x repos as well.
No, there will be no need to run such a builder for any other repo other than the main Go repo.
Thanks for figuring out the necessary builder work!
I hope to get my first change (222925) submitted today or tomorrow, and then it may be a few more days before I get the full 'static lock ranking' change (207619) submitted.
Thinking about it more, it should be useful to get the builder up and running starting with the latest existing commit on master, and ensure it's passing (or failing, if setting GOEXPERIMENT to a not-yet-supported value causes an explicit failure). Then, when you're ready to land your changes, you can use the builder via SlowBots to confirm everything is working as expected (your changes and the builder).
I'll update the CL to remove the DNS.
CL 224078 is deployed now, and the
For each experiment that has been enabled in the toolchain, define a build tag with the same name (but prefixed by "goexperiment.") which can be used for compiling alternative files for the experiment. This allows changes for the experiment, like extra struct fields in the runtime, without affecting the base non-experiment code at all. I use this capability in my CL for static lock ranking (https://go-review.googlesource.com/c/go/+/207619), so that static lock ranking can be fully enabled as a GOEXPERIMENT, but there is no overhead in the runtime when the experiment is not enabled. I added a test in cmd/go/testdata/scripts to make sure the build tags are being defined properly. In order to implement the test, I needed to provide environment variable GOEXPSTRING to the test scripts (with its value set from objabi.Expstring(), so that it can determine the experiments baked into the toolchain. I filed #37937 to make a builder with GOEXPERIMENT set to 'staticlockranking'. This builder will ensure another variant of GOEXPERIMENT is being tested regularly for this change, as well as checking static lock ranking in the runtime. Change-Id: Ieb4b86107238febd105558c1e639d30cfe57ab5c Reviewed-on: https://go-review.googlesource.com/c/go/+/222925 Run-TryBot: Dan Scales <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com> Reviewed-by: Jay Conrod <firstname.lastname@example.org> Reviewed-by: Bryan C. Mills <email@example.com>
…lder The linux-amd64-staticlockranking builder was added pre-emptively so that it could be tested and used during the development of a CL that implements a new feature. It's expected to fail until that work is completed. Mark it as a builder with a known issue, golang/go#38029. The new BuildConfig.KnownIssue field can be used by builders being added in the future so that if they fail at first, it doesn't take away time for people looking at build.golang.org, which we always aim to have as green as possible¹. ¹ https://groups.google.com/d/msg/golang-dev/y0yM_Xi665Q/hUpBiUPiCAAJ Fixes golang/go#38283 For golang/go#38029 For golang/go#37937 For golang/go#11811 Change-Id: Iba1606c7021ffa7e67ddbaae2fc6b65f4e46ab34 Reviewed-on: https://go-review.googlesource.com/c/build/+/227379 Reviewed-by: Alexander Rakoczy <firstname.lastname@example.org>
CL 207619 has been submitted to master, fixing golang.org/issue/38029. The linux-amd64-staticlockranking builder has been passing since then. Unset its known issue so that if there are regressions in the future, they can be investigated. For golang/go#38029. For golang/go#37937. Change-Id: I0de8e4ac122effee56aac73c741fab41512ff0c2 Reviewed-on: https://go-review.googlesource.com/c/build/+/227544 Run-TryBot: Dmitri Shuralyov <email@example.com> TryBot-Result: Gobot Gobot <firstname.lastname@example.org> Reviewed-by: Dan Scales <email@example.com>