Downgrade Go 1.26.5 -> 1.25.12 to fix Windows exit-status flake - #4208
Merged
Conversation
Since the Go 1.26.5 bump (#4134, merge build 13445), Windows AMD64 CI has intermittently failed with: *os.SyscallError: GetExitCodeProcess: The handle is invalid. from Cmd.Wait after the process has exited. This matches the Cmd.Wait / watchCtx process-handle races tracked in golang/go#78046, whose fixes landed on master for Go 1.27 but have not been backported to 1.26.x. Go 1.26 introduced new process-handle lifetime machinery in os/exec that is consistent with this failure mode; Go 1.25 does not have it. Downgrade to Go 1.25.12 (current supported patch release of the 1.25 line) as a stopgap. We should re-upgrade directly to Go 1.27 once it is released with the golang/go#78046 fixes. Amp-Thread-ID: https://ampcode.com/threads/T-019fe0a2-982c-74fa-830c-5aa0c249369e Co-authored-by: Lachlan Donald <lachlan@buildkite.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Downgrades Go from 1.26.5 to 1.25.12 in
go.mod,mise.toml, and both.buildkiteDockerfiles (image digest verified against ECR Public).Why
Since the Go 1.26.5 bump (#4134 — first seen in its merge build, 13445), Windows AMD64 CI has intermittently failed with:
returned from
Cmd.Waitafter the process has already exited. This matches theCmd.Wait/watchCtxprocess-handle lifetime races tracked in golang/go#78046. Go 1.26 introduced new process-handle machinery inos/os/execconsistent with this failure mode; Go 1.25 predates it and doesn't exhibit the flake.The upstream fixes have landed on Go master for 1.27 but have not been backported to any released 1.26.x (1.26.5 is the latest). Rather than working around an unreadable exit status in our process package (risking reporting a failed command as successful), downgrade until a fixed Go is released.
Notes
WaitDelay.Validation
With a local Go 1.25.12 toolchain (
GOTOOLCHAIN=local):go build ./...,GOOS=windows GOARCH=amd64 go build ./...,go vet ./...,go mod tidy(no-op), andgo test ./internal/process/ ./internal/shell/all pass.