Go module download flaky in CI: `local error: tls: bad record MAC`
Open
Nobody has claimed this yet.
Flaky
Test
- Dominant language
- Go
- Stars
- 431
- Forks
- 44
- Avg merge
- 21h 18m
- Merged PRs (30d)
- 30
Description
In util self-tests, darwin-amd64 devscript [nosystemcrypto]:
---- Running command: /Users/runner/Library/Application Support/microsoft-go/go1.25.0-1/bin/go [/Users/runner/Library/Application Support/microsoft-go/go1.25.0-1/bin/go test ./...] in `eng/_util`
go: downloading github.com/golang-jwt/jwt/v5 v5.3.1
go: downloading github.com/google/go-github/v65 v65.0.0
go: downloading golang.org/x/oauth2 v0.36.0
go: downloading golang.org/x/text v0.35.0
go: downloading github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b5
go: downloading github.com/google/uuid v1.6.0
# github.com/microsoft/go/_util/cmd/createbuildassetjson
/Users/runner/go/pkg/mod/github.com/microsoft/go-infra@v0.0.9/stringutil/stringutil.go:12:2: golang.org/x/text@v0.35.0: read "[https://proxy.golang.org/golang.org/x/text/@v/v0.35.0.zip"](https://proxy.golang.org/golang.org/x/text/@v/v0.35.0.zip%22): local error: tls: bad record MAC
# github.com/microsoft/go/_util/cmd/createbuildassetjson
/Users/runner/go/pkg/mod/github.com/microsoft/go-infra@v0.0.9/stringutil/stringutil.go:13:2: golang.org/x/text@v0.35.0: read "[https://proxy.golang.org/golang.org/x/text/@v/v0.35.0.zip"](https://proxy.golang.org/golang.org/x/text/@v/v0.35.0.zip%22): local error: tls: bad record MAC
# github.com/microsoft/go/_util/cmd/createbuildassetjson
/Users/runner/go/pkg/mod/github.com/microsoft/go-infra@v0.0.9/githubutil/auth.go:17:2: github.com/golang-jwt/jwt/v5@v5.3.1: Get "[https://proxy.golang.org/github.com/golang-jwt/jwt/v5/@v/v5.3.1.mod"](https://proxy.golang.org/github.com/golang-jwt/jwt/v5/@v/v5.3.1.mod%22): local error: tls: bad record MAC
# github.com/microsoft/go/_util/cmd/createbuildassetjson
/Users/runner/go/pkg/mod/github.com/microsoft/go-infra@v0.0.9/githubutil/fs.go:12:2: github.com/google/go-github/v65@v65.0.0: read "[https://proxy.golang.org/github.com/google/go-github/v65/@v/v65.0.0.zip"](https://proxy.golang.org/github.com/google/go-github/v65/@v/v65.0.0.zip%22): local error: tls: bad record MAC
# github.com/microsoft/go/_util/cmd/createbuildassetjson
/Users/runner/go/pkg/mod/github.com/microsoft/go-infra@v0.0.9/githubutil/githubutil.go:17:2: golang.org/x/oauth2@v0.36.0: read "[https://proxy.golang.org/golang.org/x/oauth2/@v/v0.36.0.zip"](https://proxy.golang.org/golang.org/x/oauth2/@v/v0.36.0.zip%22): local error: tls: bad record MAC
FAIL github.com/microsoft/go/_util/cmd/createbuildassetjson [setup failed]
...
This would be using the stage 0 Go, which is go1.25.0-1 here.
We've seen a similar error in:
curl: (56) OpenSSL SSL_read: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac, errno 0
https://github.com/microsoft/go/issues/657
This didn't occur in other jobs in the same CI run.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the darwin-amd64 util self-test that runs go test ./... in eng/_util using stage 0 Go go1.25.0-1, and review the linked Azure log. Investigate the intermittent module downloads from proxy.golang.org and compare this run with other jobs in the same CI run. Done means the self-test no longer fails with tls: bad record MAC.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100