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

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

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

ccahoon opened this issue Sep 19, 2018 · 1 comment
Labels
modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@ccahoon
Copy link
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 bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. modules labels Sep 22, 2018
@bcmills bcmills added this to the Go1.12 milestone Sep 22, 2018
@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 13, 2018
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 13, 2018
@bcmills
Copy link
Contributor

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
@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 modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants