Skip to content
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

proxy.golang.org: Intermittent TLS/Network errors with Google's Module Proxy #69826

Open
aaomidi opened this issue Oct 9, 2024 · 17 comments
Open
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. proxy.golang.org
Milestone

Comments

@aaomidi
Copy link

aaomidi commented Oct 9, 2024

Go version

go version go1.23.1 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/amir/Library/Caches/go-build'
GOENV='/Users/amir/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/amir/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/amir/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/private/var/tmp/_bazel_amir/3dbd0b78d662a8a6e641b2d6e1f7442e/external/rules_go~~go_sdk~go_sdk'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/private/var/tmp/_bazel_amir/3dbd0b78d662a8a6e641b2d6e1f7442e/external/rules_go~~go_sdk~go_sdk/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.23.1'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/amir/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/private/var/tmp/_bazel_amir/3dbd0b78d662a8a6e641b2d6e1f7442e/execroot/_main/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/l8/54vw83s15sn1h80rkn3xxl1c0000gn/T/go-build1795123535=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

Environment:

  • Bazel with latest rules_go.
  • GitHub actions

Ran a bazel build ${some_target}

Note that I'm not sure if this problem is limited to bazel, or happens with normal go invocations as well.

What did you see happen?

Intermittently, some modules fail to download from Google's Go Module Proxy:

(22:42:44) ERROR: /home/runner/.bazel/external/gazelle~~go_deps~com_github_aws_aws_sdk_go_v2_service_s3/BUILD.bazel:5:11: @@gazelle~~go_deps~com_github_aws_aws_sdk_go_v2_service_s3//:s3 depends on @@gazelle~~go_deps~com_github_aws_aws_sdk_go_v2_service_internal_checksum//:checksum in repository @@gazelle~~go_deps~com_github_aws_aws_sdk_go_v2_service_internal_checksum which failed to fetch. no such package '@@gazelle~~go_deps~com_github_aws_aws_sdk_go_v2_service_internal_checksum//': gazelle~~go_deps~com_github_aws_aws_sdk_go_v2_service_internal_checksum: fetch_repo: github.com/aws/aws-sdk-go-v2/service/internal/[email protected]: Get "https://proxy.golang.org/github.com/aws/aws-sdk-go-v2/service/internal/checksum/@v/v1.4.1.info": net/http: TLS handshake timeout

What did you expect to see?

No errors.

@aaomidi aaomidi changed the title Intermittent errors with Google's Module Proxy Intermittent TLS/Network errors with Google's Module Proxy Oct 9, 2024
@aaomidi
Copy link
Author

aaomidi commented Oct 9, 2024

Just had it happen again:

/home/runner/work/spirl/spirl/spirlctl/BUILD.bazel:7:11: //spirlctl:spirlctl_lib depends on @@gazelle~~go_deps~com_github_spf13_cobra//:cobra in repository @@gazelle~~go_deps~com_github_spf13_cobra which failed to fetch. no such package '@@gazelle~~go_deps~com_github_spf13_cobra//': gazelle~~go_deps~com_github_spf13_cobra: fetch_repo: github.com/spf13/[email protected]: Get "https://proxy.golang.org/github.com/spf13/cobra/@v/v1.8.1.info": dial tcp 142.250.176.17:443: i/o timeout

@seankhliao
Copy link
Member

isn't this more likely to be a network issue in your local network?

@cherrymui cherrymui added proxy.golang.org WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Oct 9, 2024
@aaomidi
Copy link
Author

aaomidi commented Oct 9, 2024

isn't this more likely to be a network issue in your local network?

This is happening in GitHub actions primarily. I've also confirmed its happening to someone who is using self-hosted AWS runners.

This issue seems similar to #63562

@aaomidi aaomidi changed the title Intermittent TLS/Network errors with Google's Module Proxy proxy.golang.org: Intermittent TLS/Network errors with Google's Module Proxy Oct 9, 2024
@aaomidi
Copy link
Author

aaomidi commented Oct 9, 2024

I've now added

common '--repo_env=GOPROXY=https://goproxy.io,https://proxy.golang.org,direct'

To my bazelrc, which effectively just changes GOPROXY. So far it seems we've not hit these errors. I'll keep an eye out on this and see if it fixes it. If it does, I suspect some load balancer at Google is struggling.

@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Oct 9, 2024
@aaomidi
Copy link
Author

aaomidi commented Oct 11, 2024

I have not seen this issue happen since we’ve changed GOPROXY.

I’ll still keep an eye out on it.

@jfirebaugh
Copy link

We experienced similar errors at Figma with rules_go until we set up a mirror to use as GOPROXY. #63244

@FiloSottile FiloSottile removed the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Oct 12, 2024
@voxeljorge
Copy link

We're hitting this issue today, from AWS EC2 hosted CI runners (not from github actions).

@aaomidi
Copy link
Author

aaomidi commented Oct 14, 2024

I've switched us over to the following bazelrc incantation:

common '--repo_env=GOPROXY=https://proxy.golang.org|https://goproxy.io|direct'

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 14, 2024
@dmitshur dmitshur added this to the Unreleased milestone Oct 14, 2024
@dmitshur
Copy link
Contributor

CC @golang/tools-team.

@findleyr
Copy link
Member

We suspect this is a transient network issue. Are folks still experiencing this?

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Oct 16, 2024
@aaomidi
Copy link
Author

aaomidi commented Oct 19, 2024

I've for now switched to using multiple proxies, so I dont think I'll be able to know for certain..

@aaomidi
Copy link
Author

aaomidi commented Oct 22, 2024

I just ran into this locally again when using only proxy.golang.org.

loading failure: com.google.devtools.build.lib.rules.repository.RepositoryFunction$AlreadyReportedRepositoryAccessException: gazelle~~go_deps~com_github_aws_aws_sdk_go_v2_service_internal_presigned_url: fetch_repo: github.com/aws/aws-sdk-go
-v2/service/internal/[email protected]: Get "https://proxy.golang.org/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/@v/v1.12.2.info": dial tcp 142.250.81.241:443: i/o timeout

@hyangah
Copy link
Contributor

hyangah commented Oct 23, 2024

Thanks @aaomidi
How frequently do you see this failure? If you retry, does it succeed?

@aaomidi
Copy link
Author

aaomidi commented Oct 23, 2024

If I retry it does succeed. I don't see it that often, but that's partially because of heavy caching on my end. I no longer see this in CI after adding goproxy.io to the list of proxies it can retrieve data from.

I do think this is specifically an issue with how gazelle interacts with the go module proxy, on a subset of the Google LBs.

@Ryang20718
Copy link

Ryang20718 commented Oct 23, 2024

I frequently see this on CI runners hosted on aws ec2. At least multiple times per day this past week. It does succeed when retrying, but sometimes may fail again if we retry

@seankhliao seankhliao removed the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 3, 2024
@ansaba
Copy link

ansaba commented Nov 7, 2024

cc: @samthanawalla

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. proxy.golang.org
Projects
None yet
Development

No branches or pull requests