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/vet/all: build failures affecting misc-vet-vetall #30971

Closed
erifan opened this issue Mar 21, 2019 · 25 comments
Closed

cmd/vet/all: build failures affecting misc-vet-vetall #30971

erifan opened this issue Mar 21, 2019 · 25 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.

Comments

@erifan
Copy link

erifan commented Mar 21, 2019

What version of Go are you using (go version)?

go version devel +0fe1986a72 Thu Mar 21 01:35:21 2019 +0000 linux/arm64

Does this issue reproduce with the latest release?

no

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

GOARCH="arm64"
GOBIN=""
GOCACHE="/home//.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/
/go"
GOPROXY=""
GORACE=""
GOROOT="/home//go-master"
GOTMPDIR=""
GOTOOLDIR="/home//go-master/pkg/tool/linux_arm64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home//go-master/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build580593418=/tmp/go-build -gno-record-gcc-switches"

The problem also occurs on amd64.

What did you do?

GO_BUILDER_NAME=*-vetall ../bin/go tool dist test -run arm64$

What did you expect to see?

Testing packages.

ok cmd/internal/obj/arm64 0.056s

ALL TESTS PASSED (some were excluded)

What did you see instead?

cmd/vet/all

go run main.go -p darwin/arm64
encoding/xml/marshal.go:104: method MarshalXML(e *xml.Encoder, start xml.StartElement) error should have signature MarshalXML(*xml.Encoder, xml.StartElement) error
encoding/xml/read.go:175: method UnmarshalXML(d *xml.Decoder, start xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
encoding/xml/marshal_test.go:317: method MarshalXML(e *xml.Encoder, start xml.StartElement) error should have signature MarshalXML(*xml.Encoder, xml.StartElement) error
encoding/xml/read_test.go:630: method UnmarshalXML(d *xml.Decoder, start xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
encoding/xml/xml_test.go:887: method UnmarshalXML(*xml.Decoder, xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
exit status 1
2019/03/21 06:14:58 Failed: exit status 1
go run main.go -p android/arm64
encoding/xml/marshal.go:104: method MarshalXML(e *xml.Encoder, start xml.StartElement) error should have signature MarshalXML(*xml.Encoder, xml.StartElement) error
encoding/xml/read.go:175: method UnmarshalXML(d *xml.Decoder, start xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
encoding/xml/marshal_test.go:317: method MarshalXML(e *xml.Encoder, start xml.StartElement) error should have signature MarshalXML(*xml.Encoder, xml.StartElement) error
encoding/xml/read_test.go:630: method UnmarshalXML(d *xml.Decoder, start xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
encoding/xml/xml_test.go:887: method UnmarshalXML(*xml.Decoder, xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
exit status 1
2019/03/21 06:14:59 Failed: exit status 1
go run main.go -p linux/arm64
encoding/xml/marshal.go:104: method MarshalXML(e *xml.Encoder, start xml.StartElement) error should have signature MarshalXML(*xml.Encoder, xml.StartElement) error
encoding/xml/read.go:175: method UnmarshalXML(d *xml.Decoder, start xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
encoding/xml/marshal_test.go:317: method MarshalXML(e *xml.Encoder, start xml.StartElement) error should have signature MarshalXML(*xml.Encoder, xml.StartElement) error
encoding/xml/read_test.go:630: method UnmarshalXML(d *xml.Decoder, start xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
encoding/xml/xml_test.go:887: method UnmarshalXML(*xml.Decoder, xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
exit status 1
2019/03/21 06:14:59 Failed: exit status 1
2019/03/21 06:15:00 FAILED

@erifan
Copy link
Author

erifan commented Mar 21, 2019

The problem seems to be related with https://go-review.googlesource.com/c/go/+/168458

@agnivade
Copy link
Contributor

@mvdan

@mvdan
Copy link
Member

mvdan commented Mar 21, 2019

Sorry, I cannot reproduce this issue. On a newly built go version devel +277609f844 Thu Mar 21 08:41:51 2019 +0000 linux/amd64:

$ cd src/cmd/vet/all/
$ go run main.go -p linux/arm64
[no error]

Are you positive you're on a clean clone? Also, main.go now downloads the latest version from x/tools via Go modules, so perhaps your module cache is somehow broken or out of date. Try go clean -modcache before trying again.

@mvdan mvdan added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 21, 2019
@erifan
Copy link
Author

erifan commented Mar 22, 2019

Sorry for late reply. After running go clean -modcache, I can still reproduce this error.

go version devel +4906a00cdd Fri Mar 22 09:07:09 2019 +0000 linux/arm64
$ GO_BUILDER_NAME=*-vetall ~/go-master/bin/go tool dist test -run linux/arm64

cmd/vet/all

go run main.go -p linux/arm64
encoding/xml/marshal.go:104: method MarshalXML(e *xml.Encoder, start xml.StartElement) error should have signature MarshalXML(*xml.Encoder, xml.StartElement) error
encoding/xml/read.go:175: method UnmarshalXML(d *xml.Decoder, start xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
encoding/xml/marshal_test.go:317: method MarshalXML(e *xml.Encoder, start xml.StartElement) error should have signature MarshalXML(*xml.Encoder, xml.StartElement) error
encoding/xml/read_test.go:630: method UnmarshalXML(d *xml.Decoder, start xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
encoding/xml/xml_test.go:887: method UnmarshalXML(*xml.Decoder, xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
exit status 1
2019/03/22 10:50:27 Failed: exit status 1
2019/03/22 10:50:28 FAILED

go version devel +4906a00cdd Fri Mar 22 09:07:09 2019 +0000 linux/amd64
$ GO_BUILDER_NAME=*-vetall ~/go-master/bin/go tool dist test -run linux/amd64

cmd/vet/all

go: finding golang.org/x/tools/go/analysis/cmd/vet latest
go: finding golang.org/x/tools/go/analysis/cmd latest
go: finding golang.org/x/tools/go/analysis latest
go: finding golang.org/x/tools/go latest
go: finding golang.org/x/tools latest
go: downloading golang.org/x/tools v0.0.0-20190321232350-e250d351ecad
go: extracting golang.org/x/tools v0.0.0-20190321232350-e250d351ecad
go: finding golang.org/x/net v0.0.0-20190311183353-d8887717615a
go: finding golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: finding golang.org/x/text v0.3.0
go: finding golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go run main.go -p linux/amd64
compress/gzip/example_test.go:58: ExampleReader_Multistream refers to unknown field or method: Reader.Multistream
net/http/example_test.go:116: ExampleServer_Shutdown refers to unknown field or method: Server.Shutdown
exit status 1
2019/03/22 10:51:47 Failed: exit status 1
2019/03/22 10:51:47 FAILED

Do you export GO_BUILDER_NAME=*-vetall ?

@mvdan
Copy link
Member

mvdan commented Mar 22, 2019

GO_BUILDER_NAME=*-vetall go run main.go -p linux/arm64 succeeds just as fine.

Can you try that exact command? go tool dist test does way more work, so I don't want to run that every time I want to try to reproduce.

Also /cc @bcmills, since he rewrote cmd/vet/all/main.go to be module-aware. Though I believe he's on holiday at the moment.

@erifan
Copy link
Author

erifan commented Mar 22, 2019

Yeah, @bcmills

$ ~/go-master/bin/go clean -modcache
$ GO_BUILDER_NAME=*-vetall ~/go-master/bin/go run main.go -p 

linux/arm64
go: finding golang.org/x/tools/go/analysis/cmd/vet latest
go: finding golang.org/x/tools/go/analysis/cmd latest
go: finding golang.org/x/tools/go/analysis latest
go: finding golang.org/x/tools/go latest
go: finding golang.org/x/tools latest
go: downloading golang.org/x/tools v0.0.0-20190321232350-e250d351ecad
go: extracting golang.org/x/tools v0.0.0-20190321232350-e250d351ecad
go: finding golang.org/x/net v0.0.0-20190311183353-d8887717615a
go: finding golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: finding golang.org/x/text v0.3.0
go: finding golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go run main.go -p linux/arm64
compress/gzip/example_test.go:58: ExampleReader_Multistream refers to unknown field or method: Reader.Multistream
net/http/example_test.go:116: ExampleServer_Shutdown refers to unknown field or method: Server.Shutdown
exit status 1

@mvdan
Copy link
Member

mvdan commented Mar 22, 2019

Hmm, this trybot run ran into the same ExampleReader_Multistream failure: https://storage.googleapis.com/go-build-log/f424e025/misc-vet-vetall_a955c34e.log

@mvdan
Copy link
Member

mvdan commented Mar 22, 2019

This is worse than I thought; the misc-vet-vetall builder has been red for a few hours:

2019-03-22-12:33:00

/cc @matloob @dmitshur

@mvdan mvdan added NeedsFix The path to resolution is known, but the work has not been done. Soon This needs to be done soon. (regressions, serious bugs, outages) and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Mar 22, 2019
@mvdan
Copy link
Member

mvdan commented Mar 22, 2019

All trybot runs are failing now because of this, so I'm pinning the issue to ensure others find it.

@mvdan mvdan pinned this issue Mar 22, 2019
@mvdan mvdan changed the title cmd/vet/all: go vet test from x/tools/repo fail cmd/vet/all: build failures affecting misc-vet-vetall Mar 22, 2019
@mvdan
Copy link
Member

mvdan commented Mar 22, 2019

The error itself doesn't make much sense to me; these methods have existed for many Go releases.

api/go1.4.txt:11:pkg compress/gzip, method (*Reader) Multistream(bool)
api/go1.8.txt:196:pkg net/http, method (*Server) Shutdown(context.Context) error

Even if the build was somehow happening with the Go 1.4 bootstrap version, we wouldn't be seeing the gzip error.

@ianlancetaylor
Copy link
Contributor

The cause is a bug in https://golang.org/cl/168404. I added a comment to the CL. CC @matloob

@mvdan
Copy link
Member

mvdan commented Mar 22, 2019

Nice find! Seeing as the fix is trivial, we should probably push it to master as soon as possible, to get the trybots green again. We can always add a test later.

@ianlancetaylor
Copy link
Contributor

I'm going to give myself 10 minutes to write a test.

@gopherbot
Copy link

Change https://golang.org/cl/168803 mentions this issue: go/analysis/passes/tests: don't warn about missing method for each type

@mvdan mvdan unpinned this issue Mar 22, 2019
@gopherbot
Copy link

Change https://golang.org/cl/168804 mentions this issue: go/analysis/passes/tests: break out of loop when we find a method

gopherbot pushed a commit to golang/tools that referenced this issue Mar 22, 2019
Updates golang/go#30971

Change-Id: I7c9250c46fede553689cdc5007b6f330a006b867
Reviewed-on: https://go-review.googlesource.com/c/tools/+/168804
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@jayconrod
Copy link
Contributor

I'm still seeing this failure on CL 168404, which I rebased a few minutes ago. The log is here.

encoding/xml/marshal.go:104: method MarshalXML(e *xml.Encoder, start xml.StartElement) error should have signature MarshalXML(*xml.Encoder, xml.StartElement) error
encoding/xml/read.go:175: method UnmarshalXML(d *xml.Decoder, start xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
encoding/xml/marshal_test.go:317: method MarshalXML(e *xml.Encoder, start xml.StartElement) error should have signature MarshalXML(*xml.Encoder, xml.StartElement) error
encoding/xml/read_test.go:630: method UnmarshalXML(d *xml.Decoder, start xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error
encoding/xml/xml_test.go:887: method UnmarshalXML(*xml.Decoder, xml.StartElement) error should have signature UnmarshalXML(*xml.Decoder, xml.StartElement) error

@mvdan
Copy link
Member

mvdan commented Mar 22, 2019

That's the original failure, though. It should be fixed if vet/all is really using the latest x/tools.

@dmitshur
Copy link
Contributor

I'm seeing this failure, or a failure similar to this one, on latest tip commit on https://build.golang.org/ from CL 168697 that was submitted 15 minutes ago:

https://build.golang.org/log/62231cd4bf3fcb3d2c5a2e425240a31ad258b79c

Also in a CL to release-branch.go1.12 that I rebased today (CL 168958).

It looks identical to what @jayconrod posted above in #30971 (comment).

@dmitshur dmitshur reopened this Mar 25, 2019
@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed NeedsFix The path to resolution is known, but the work has not been done. labels Mar 25, 2019
@dmitshur dmitshur added the Testing An issue that has been verified to require only test changes, not just a test failure. label Mar 25, 2019
@dmitshur
Copy link
Contributor

I can't reproduce this locally so far; GO_BUILDER_NAME=*-vetall ../bin/go tool dist test -run arm64 and GO_BUILDER_NAME=*-vetall ../bin/go tool dist test -run js/wasm succeed locally for me both at CL 168697 and its parent commit.

@dmitshur dmitshur pinned this issue Mar 25, 2019
@bradfitz
Copy link
Contributor

Plan:

  • temporarily disable the vetall builders & trybots
  • remove the vetall special cases in x/build/cmd/coordinator
  • rewrite src/cmd/vet/all to use modules and not $GOPATH. (I suspect our bug is somewhere in this step, or a bad interaction with the $GOPATH the coordinator lays down)
  • re-enable the vetall builders.

/cc @josharian

@gopherbot
Copy link

Change https://golang.org/cl/169197 mentions this issue: dashboard: temporarily disable the vetall builders

@gopherbot
Copy link

Change https://golang.org/cl/169198 mentions this issue: cmd/coordinator: remove special cases for misc-vet-vetall

@mvdan
Copy link
Member

mvdan commented Mar 25, 2019

Note that I think part of the problem is that cmd/vet/all/main.go currently pulls the latest version from x/tools via module mode, instead of using the pinned version from cmd/go.mod. It's hard to reason about which exact version of go/analysis the test is running with.

@gopherbot
Copy link

Change https://golang.org/cl/169217 mentions this issue: cmd/dist: move GOPATH setting from init to bootstrap

@dmitshur dmitshur unpinned this issue Mar 25, 2019
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed Soon This needs to be done soon. (regressions, serious bugs, outages) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Mar 25, 2019
@gopherbot
Copy link

Change https://golang.org/cl/169239 mentions this issue: cmd: update go.mod versions for vetall bug

gopherbot pushed a commit that referenced this issue Mar 26, 2019
Updates #30971
Updates #31040

Change-Id: I305fbddb6f79cbe3d7e29225841309ab00b1e7dd
Reviewed-on: https://go-review.googlesource.com/c/go/+/169239
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
gopherbot pushed a commit to golang/build that referenced this issue Mar 26, 2019
See plan at golang/go#30971 (comment)

Updates golang/go#31040

Change-Id: I160d671670094c3ab4f9d7ba825235a865ad3376
Reviewed-on: https://go-review.googlesource.com/c/build/+/169198
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@golang golang locked and limited conversation to collaborators Mar 24, 2020
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

8 participants