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/api: BenchmarkAll fails at head #37951

Closed
bcmills opened this issue Mar 19, 2020 · 3 comments
Closed

cmd/api: BenchmarkAll fails at head #37951

bcmills opened this issue Mar 19, 2020 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Mar 19, 2020

(Discovered while testing #37940.)

The BenchmarkAll function in cmd/api/goapi_test.go is failing at head.
(It appears that we are missing builder coverage for benchmarks in cmd in general, but that's a separate issue.)

It may have been broken when we switched to vendor/golang.org in CL 164623. I'm running a bisection to verify now.

~/go/src$ go version
go version devel +f9f57c4443 Thu Mar 19 16:17:59 2020 +0000 linux/amd64

~/go/src$ go test -bench='.*' cmd/api
2020/03/19 13:35:40 no source in tree for import "golang.org/x/crypto/cryptobyte" (from import golang.org/x/crypto/cryptobyte in /usr/local/google/home/bcmills/go/src/crypto/ecdsa): stat /usr/local/google/home/bcmills/go/src/golang.org/x/crypto/cryptobyte: no such file or directory
panic: no source in tree for import "golang.org/x/crypto/cryptobyte" (from import golang.org/x/crypto/cryptobyte in /usr/local/google/home/bcmills/go/src/crypto/ecdsa): stat /usr/local/google/home/bcmills/go/src/golang.org/x/crypto/cryptobyte: no such file or directory [recovered]
        panic: no source in tree for import "golang.org/x/crypto/cryptobyte" (from import golang.org/x/crypto/cryptobyte in /usr/local/google/home/bcmills/go/src/crypto/ecdsa): stat /usr/local/google/home/bcmills/go/src/golang.org/x/crypto/cryptobyte: no such file or directory

goroutine 14 [running]:
go/types.(*Checker).handleBailout(0xc00300b680, 0xc0012f3b10)
        /usr/local/google/home/bcmills/go/src/go/types/check.go:243 +0x98
panic(0x6284a0, 0xc0031d32f0)
        /usr/local/google/home/bcmills/go/src/runtime/panic.go:967 +0x166
log.Panicf(0x68f69c, 0x3a, 0xc0012f33c8, 0x4, 0x4)
        /usr/local/google/home/bcmills/go/src/log/log.go:358 +0xc0
cmd/api.(*Walker).ImportFrom(0xc00005c5a0, 0xc00301c621, 0x1e, 0xc00302e380, 0x32, 0x0, 0x1c, 0xc00304ed65, 0xffffffffffffffff)
        /usr/local/google/home/bcmills/go/src/cmd/api/goapi.go:541 +0x114d
go/types.(*Checker).importPackage(0xc00300b680, 0x3bd217, 0xc00301c621, 0x1e, 0xc00302e380, 0x32, 0x8)
        /usr/local/google/home/bcmills/go/src/go/types/resolver.go:153 +0x17a
go/types.(*Checker).collectObjects(0xc00300b680)
        /usr/local/google/home/bcmills/go/src/go/types/resolver.go:254 +0x8c6
go/types.(*Checker).checkFiles(0xc00300b680, 0xc002fe4ff8, 0x1, 0x1, 0x0, 0x0)
        /usr/local/google/home/bcmills/go/src/go/types/check.go:255 +0x95
go/types.(*Checker).Files(...)
        /usr/local/google/home/bcmills/go/src/go/types/check.go:248
go/types.(*Config).Check(0xc003054b80, 0xc00039e0d6, 0xc, 0xc00006c5c0, 0xc002fe4ff8, 0x1, 0x1, 0x0, 0x0, 0xc000106550, ...)
        /usr/local/google/home/bcmills/go/src/go/types/api.go:348 +0x14e
cmd/api.(*Walker).ImportFrom(0xc00005c5a0, 0xc00039e0d6, 0xc, 0x0, 0x0, 0x0, 0xc00039e0d6, 0xc, 0x0)
        /usr/local/google/home/bcmills/go/src/cmd/api/goapi.go:597 +0x87d
cmd/api.(*Walker).Import(...)
        /usr/local/google/home/bcmills/go/src/cmd/api/goapi.go:517
cmd/api.BenchmarkAll(0xc0003641c0)
        /usr/local/google/home/bcmills/go/src/cmd/api/goapi_test.go:183 +0x4b6
testing.(*B).runN(0xc0003641c0, 0x1)
        /usr/local/google/home/bcmills/go/src/testing/benchmark.go:191 +0xe8
testing.(*B).run1.func1(0xc0003641c0)
        /usr/local/google/home/bcmills/go/src/testing/benchmark.go:231 +0x57
created by testing.(*B).run1
        /usr/local/google/home/bcmills/go/src/testing/benchmark.go:224 +0x7d
exit status 2
FAIL    cmd/api 0.511s
FAIL
@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsFix The path to resolution is known, but the work has not been done. labels Mar 19, 2020
@bcmills bcmills added this to the Go1.15 milestone Mar 19, 2020
@bcmills bcmills self-assigned this Mar 19, 2020
@bcmills
Copy link
Contributor Author

bcmills commented Mar 20, 2020

Bisected to CL 164623 as expected.

@gopherbot
Copy link

Change https://golang.org/cl/224619 mentions this issue: cmd/api: make NewWatcher populate its own package and import metadata

@gopherbot
Copy link

Change https://golang.org/cl/225662 mentions this issue: cmd/dist: skip API check on plan9 builders

gopherbot pushed a commit that referenced this issue Mar 27, 2020
The plan9-arm builder has a very slow filesystem and frequently times
out on this test. The api check verifies the API for all supported
GOOS/GOARCH/CGO_ENABLED combination anyway, so if we skip it on one
builder (or even most builders) there should be no loss of coverage.

Updates #37951

Change-Id: I86a93df2ec60a6af6d942e3954eef09ce67bb39e
Reviewed-on: https://go-review.googlesource.com/c/go/+/225662
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@golang golang locked and limited conversation to collaborators Mar 26, 2021
@rsc rsc unassigned bcmills Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

2 participants