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: internal/modload TestImport stuck in infinite loop(?) #27080

Closed
ALTree opened this issue Aug 19, 2018 · 5 comments
Closed

cmd/go: internal/modload TestImport stuck in infinite loop(?) #27080

ALTree opened this issue Aug 19, 2018 · 5 comments
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ALTree
Copy link
Member

ALTree commented Aug 19, 2018

$ gotip version
go version devel +bf80e3b564 Sat Aug 18 18:23:06 2018 +0000 linux/amd64
$ cd src/cmd/go/internal/modload

$ gotip test -run=TestImport -v
=== RUN   TestImport
=== RUN   TestImport/golang.org_x_net_context

and then it's stuck there, spinning at 100% cpu. I've let it run for about an hour on my machine, and it didn't finish. On the longtest builder it times out, and there's a stacktrace:

https://build.golang.org/log/8b2c6c726faf3a87bc5862a0e3192d66df682810

@ALTree ALTree added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. modules labels Aug 19, 2018
@ALTree ALTree added this to the Go1.11 milestone Aug 19, 2018
@ALTree ALTree changed the title cmd/go: internal/modload test stuck in infinite loop(?) cmd/go: internal/modload TestImport stuck in infinite loop(?) Aug 19, 2018
@mvdan
Copy link
Member

mvdan commented Aug 19, 2018

Every time we fix a long test, there's another one popping up :) Hopefully we'll have linux-amd64-longtest green soon.

@gopherbot
Copy link

Change https://golang.org/cl/129778 mentions this issue: cmd/go: fix modload infinite directory loop

@ALTree
Copy link
Member Author

ALTree commented Aug 19, 2018

Every time we fix a long test, there's another one popping up

That's how you know the longtest builder is doing its job :^)

@mvdan
Copy link
Member

mvdan commented Aug 19, 2018

Now we just need brave heroes to do the same work with darwin and windows longtest builders.

@gopherbot
Copy link

Change https://golang.org/cl/130275 mentions this issue: [release-branch.go1.11] cmd/go: fix modload infinite directory loop

gopherbot pushed a commit that referenced this issue Aug 21, 2018
It is possible to enter the parent-walking directory loop in a way that
it will loop forever - if mdir is empty, and d reaches ".". To avoid
this, make sure that the 'd = filepath.Dir(d)' step only happens if the
parent directory is actually different than the current directory.

This fixes some of the tests like TestImport/golang.org_x_net_context,
which were never finishing before.

While at it, also fix TestImport/golang.org_x_net, which seems to have
the wrong expected error. The root of the x/net repo doesn't have a
go.mod file, nor is part of a module itself, so it seems like the
expected error should reflect that.

After these two changes, 'go test cmd/go/internal/modload' passes on my
linux/amd64 machine.

Fixes #27080.

Change-Id: Ie8bab0f9fbc9f447844cbbc64117420d9087db1b
Reviewed-on: https://go-review.googlesource.com/129778
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 692307a)
Reviewed-on: https://go-review.googlesource.com/130275
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
@golang golang locked and limited conversation to collaborators Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants