-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: Race detector causes exit status 0xc0000139 on Windows 11 with 1.21rc2 running gcc 9.2.0 #61058
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
After reading through #35006 it seems like the recommendation is to use llvm. Downloading the latest ucrt from https://github.com/mstorsjo/llvm-mingw/releases and putting that in my path seems to also be working. |
Given that the binary works with a newer GCC, this sounds like a GCC bug rather than a Go bug. That said, if we know of specific compilers that do or do not work with the race detector, or with Go in general, then probably we should add that detail to https://go.dev/wiki/MinimumRequirements and/or https://go.dev/doc/articles/race_detector#Requirements. (CC @golang/windows, @golang/runtime) |
GCC 9.2 is still widely used, we should understand what happened before the final go1.22 release, I'll investigate if SEH or the frame pointer changes have anything to do with this issue. |
Did some archeology and found the culprit: the program fails to load the The issue is that the missing symbols are not part of
This was discussed and rejected in #35006. This comment made by @thanm gives a good reasoning: #35006 (comment). |
@qmuntal thank you for the in-depth analysis and explanation! Does it make sense to mention this in the release notes at all if GCC 9 is still fairly popular? |
This is not a problem with GCC or Mingw-w64 9, they are both fine, but with tdm-gcc 9. I don't know how popular is tdm-gcc and if it worth adding this issue to the release notes, as add this kind of things in there. |
I agree with that reasoning, but https://go.dev/wiki/MinimumRequirements#cgo is currently pretty unambiguous that “gcc 4.6 or newer is required”, implying that every version higher than that one is supported. I don't think it's accurate at this point. I think what we really mean is “ |
Change https://go.dev/cl/508461 mentions this issue: |
After upgrading to Go v1.21, Go Windows unit tests (which we run with the race detector enabled) cannot be run: go exists immediately with `exit status 0xc0000139`. That may be caused by older mingw-w64 runtime libraries. See golang/go#61058. Signed-off-by: Antonin Bas <[email protected]>
After upgrading to Go v1.21, Go Windows unit tests (which we run with the race detector enabled) cannot be run: go exists immediately with `exit status 0xc0000139`. That may be caused by older mingw-w64 runtime libraries. See golang/go#61058. Signed-off-by: Antonin Bas <[email protected]>
After upgrading to Go v1.21, Go Windows unit tests (which we run with the race detector enabled) cannot be run: go exists immediately with `exit status 0xc0000139`. That may be caused by older mingw-w64 runtime libraries. See golang/go#61058. Signed-off-by: Antonin Bas <[email protected]>
* Replace usage of "golang.org/x/exp/slices" with new "slices" package. * Remove calls to "rand.Seed": starting with Go v1.20, the generator is seeded randomly at program startup, and we no longer need to do it manually. * The codegen image has been updated to kubernetes-1.26.4-build.0 to include the updated version of Go. No changes im generated files. * Stop using "golang.org/x/exp/rand" in test/e2e/performance_test.go: this is unrelated to the Go update. * Use windows-2022 runners for Go Windows unit tests After upgrading to Go v1.21, Go Windows unit tests (which we run with the race detector enabled) cannot be run: go exists immediately with `exit status 0xc0000139`. That may be caused by older mingw-w64 runtime libraries. See golang/go#61058. * Fix Dockerfile for integrations tests image The Dockerfile should install the latest patch release for the minor Go version currently supported by Antrea. Fixes #5371 Signed-off-by: Antonin Bas <[email protected]>
I am currently facing this on github CI with gcc 12.2 from mingw64, any tips on debugging this? @qmuntal do you remember how you found out what the issue was? |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Reproducible with 1.21rc2 but not reproducible with 1.20.5. I'm not sure how to download 1.21rc1 to test that.
What operating system and processor architecture are you using (
go env
)?Windows 11 Pro Version 10.0.22621 Build 22621
go env
OutputI had previously installed tdm-gcc 9.2.0 which causes the error:
gcc -v
OutputBut upon upgrading to tdm-gcc 10.3.0 the error no longer occurs:
gcc -v
OutputWhat did you do?
Trying to run any tests with
-race
and gcc 9.2.0 ends up failing withexit status 0xc0000139
.https://go.dev/play/p/RFjBrSPywGg
But upon upgrading to gcc 10.3.0:
What did you expect to see?
I expected for the race detector not to break between versions without something in the release notes pointing out an expectation of breakage. All I noticed in the release notes for 1.21 that might be related is:
But it's not obvious that this would require an upgraded gcc. It wasn't until after several hours of Googling and debugging that I ended up attempting to update gcc.
What did you see instead?
Instead I saw a bizarre exit status that led me down a deep rabbit hole on Google to try and figure out why my go tests suddenly don't work.
The text was updated successfully, but these errors were encountered: