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

cmd/go: go build quietly hangs trying to download invalid module URL #27761

Open
ccahoon opened this Issue Sep 19, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@ccahoon
Contributor

ccahoon commented Sep 19, 2018

What version of Go are you using (go version)?

go version go1.11 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOCACHE="/Users/ccahoon/Library/Caches/go-build"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"

What did you do?

Note: I am building with GO111MODULE=on, from within my GOPATH.

  1. I am building a command that imports a module defined as: module github.com/Figure53/figure53.com
  2. Within that module, I import a package at github.com/Figure53/figure53.com/backend/remote, and it builds without issues.
  3. I created a new file within a pre-existing package, and copy and pasted that import path. Somewhere along the way, I introduced a typo into the import path. The domain name in the import path was misspelled as gitdub.com.
  4. I ran go build with GO111MODULE=on, and it hung silently until I cancelled it. I tried again a few times and got confused. It didn't seem to be CPU issue and I haven't experienced a feedback-less slow build for a while. After I stashed my changes, it built fine.
  5. I read my diff, discovered my typo, fixed it, and the build worked again.

What did you expect to see?

I expected some indicator that go build was hung on trying to fetch a module, after shorter period of time. I also thought some sort of shorter timeout might make sense.

What did you see instead?

go build hung indefinitely.

Once I ran go build -v [...], I could see what it was working on, and the build hung indefinitely at:

Fetching https://gitdub.com/Figure53/figure53.com/backend/remote?go-get=1

It also is not a problem when the request returns quickly (as in an experiment I did to try to understand the problem where I changed the domain to one I control which will 404 quickly):

build github.com/Figure53/figure53.com/backend/act: cannot find module for path figure53.com/Figure53/figure53.com/backend/remote


I am loving this module system, by the way. It's gone very smoothly for the most part. Thanks for all the great work!

@bcmills

This comment has been minimized.

Member

bcmills commented Nov 13, 2018

gitdub.com is a parked domain, and appears to hang indefinitely for HTTPS requests. We probably can't fix the hang, because we can't distinguish between a slow server and an invalid one, but we can at least do something to clarify which operation is hung.

@bcmills bcmills modified the milestones: Go1.12, Go1.13 Nov 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment