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

cmd/go: describe stuck ops when terminated by signal #27761

ccahoon opened this issue Sep 19, 2018 · 1 comment

cmd/go: describe stuck ops when terminated by signal #27761

ccahoon opened this issue Sep 19, 2018 · 1 comment
modules NeedsFix


Copy link

@ccahoon 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?


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


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
  2. Within that module, I import a package at, 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
  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:


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 cannot find module for path

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 bcmills added NeedsInvestigation modules labels Sep 22, 2018
@bcmills bcmills added this to the Go1.12 milestone Sep 22, 2018
@bcmills bcmills added the NeedsFix label Nov 13, 2018
@gopherbot gopherbot removed the NeedsInvestigation label Nov 13, 2018
Copy link

@bcmills bcmills commented Nov 13, 2018 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 removed this from the Go1.12 milestone Nov 13, 2018
@bcmills bcmills added this to the Go1.13 milestone Nov 13, 2018
@bcmills bcmills changed the title cmd/go: go build quietly hangs trying to download invalid module URL cmd/go: describe stuck ops when terminated by signal Jan 17, 2019
@andybons andybons removed this from the Go1.13 milestone Jul 8, 2019
@andybons andybons added this to the Go1.14 milestone Jul 8, 2019
@rsc rsc removed this from the Go1.14 milestone Oct 9, 2019
@rsc rsc added this to the Backlog milestone Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
modules NeedsFix
None yet

No branches or pull requests

5 participants