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

x/tools/cmd/godoc: TestWeb times out #11928

Closed
alexbrainman opened this issue Jul 30, 2015 · 4 comments
Closed

x/tools/cmd/godoc: TestWeb times out #11928

alexbrainman opened this issue Jul 30, 2015 · 4 comments
Milestone

Comments

@alexbrainman
Copy link
Member

From our builder http://build.golang.org/log/54c9acca698538676ae29111ad178a069e1e8997

--- FAIL: TestWeb (319.52s)
    godoc_test.go:160: Server "127.0.0.1:49215" failed to respond in 5m0s
2015/07/30 00:20:59 updateMetadata: open C:\Users\WINGOP~1\AppData\Local\Temp\godoc-analysis513099221\goroot\doc: The system cannot find the file specified.
2015/07/30 00:21:00 updateMetadata: open C:\Users\WINGOP~1\AppData\Local\Temp\godoc-analysis513099221\goroot\doc: The system cannot find the file specified.
2015/07/30 00:21:00 GOROOT=C:\Users\WINGOP~1\AppData\Local\Temp\godoc-analysis513099221\goroot\src\: [lib]
2015/07/30 00:21:00 GOPATH[0]=C:\Users\WINGOP~1\AppData\Local\Temp\godoc-analysis513099221\gopath\src\: [app]
2015/07/30 00:21:00 Loading and type-checking packages...
2015/07/30 00:21:00 Loaded 2 packages.
2015/07/30 00:21:00 Transitively error-free main packages: [package app]
2015/07/30 00:21:00 Constructing SSA form...
2015/07/30 00:21:00 SSA construction complete
2015/07/30 00:21:00 Computing implements relation...
2015/07/30 00:21:00 Extracting type info...
2015/07/30 00:21:00 Visit instructions...
2015/07/30 00:21:00 Visit instructions complete
2015/07/30 00:21:00 Type analysis complete.
FAIL
FAIL    golang.org/x/tools/cmd/godoc    361.558s

I can also reproduce it on my linux-386.

The TestWeb passes if I increase timeout:

# git diff
diff --git a/cmd/godoc/godoc_test.go b/cmd/godoc/godoc_test.go
index 312cfc6..ed493e7 100644
--- a/cmd/godoc/godoc_test.go
+++ b/cmd/godoc/godoc_test.go
@@ -135,7 +135,7 @@ func serverAddress(t *testing.T) string {
 }

 const (
-       startTimeout = 5 * time.Minute
+       startTimeout = 7 * time.Minute
        pollInterval = 200 * time.Millisecond
 )

# go test -run=TestWeb -v
=== RUN   TestWeb
--- PASS: TestWeb (389.22s)
PASS
ok      golang.org/x/tools/cmd/godoc    389.232s
#

Alex

@bradfitz
Copy link
Contributor

@alandonovan, is it really expected to take over 5 minutes to start godoc with SSA analysis? I don't know.

@alandonovan
Copy link
Contributor

No. The analysis takes less than a second, as the logs show. The whole test was supposed to take only five seconds, but the change 8239116, which I wasn't aware of till now, bumped the timeout to 5 minutes and added the -index flag, which makes it very slow and causes it to use ~1GB memory.

Gerrit: https://go-review.googlesource.com/#/c/7267/

@rsc rsc added this to the Go1.5Maybe milestone Aug 6, 2015
@rsc
Copy link
Contributor

rsc commented Aug 6, 2015

@alandonovan, can you prepare a CL to fix this?

@rsc
Copy link
Contributor

rsc commented Aug 10, 2015

Andrew fixed this in https://go-review.googlesource.com/#/c/12917/ but didn't update the issue.

@rsc rsc closed this as completed Aug 10, 2015
@mikioh mikioh modified the milestones: Go1.5, Go1.5Maybe Aug 11, 2015
@golang golang locked and limited conversation to collaborators Aug 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants