Skip to content

Downgrade Go 1.26.5 -> 1.25.12 to fix Windows exit-status flake - #4208

Merged
lox merged 1 commit into
mainfrom
downgrade-go-1.25.12
Aug 8, 2026
Merged

Downgrade Go 1.26.5 -> 1.25.12 to fix Windows exit-status flake#4208
lox merged 1 commit into
mainfrom
downgrade-go-1.25.12

Conversation

@lox

@lox lox commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

What

Downgrades Go from 1.26.5 to 1.25.12 in go.mod, mise.toml, and both .buildkite Dockerfiles (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:

*os.SyscallError: GetExitCodeProcess: The handle is invalid.

returned from Cmd.Wait after the process has already exited. This matches the Cmd.Wait/watchCtx process-handle lifetime races tracked in golang/go#78046. Go 1.26 introduced new process-handle machinery in os/os/exec consistent 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

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), and go test ./internal/process/ ./internal/shell/ all pass.

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>
@lox
lox requested review from a team as code owners August 8, 2026 11:14
@lox
lox requested review from DrJosh9000 and catkins August 8, 2026 11:17
@lox lox added the bug label Aug 8, 2026
@lox
lox merged commit dd75ef4 into main Aug 8, 2026
5 of 6 checks passed
@lox
lox deleted the downgrade-go-1.25.12 branch August 8, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants