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: failures with junk at end of line: on linux-s390x-ibm #52408

Closed
bcmills opened this issue Apr 18, 2022 · 5 comments
Closed

x/tools: failures with junk at end of line: on linux-s390x-ibm #52408

bcmills opened this issue Apr 18, 2022 · 5 comments
Labels
arch-s390x NeedsInvestigation Tools
Milestone

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented Apr 18, 2022

package nosuchpkg is not in GOROOT (/data/golang/workdir/go/src/nosuchpkg)
package nosuchpkg is not in GOROOT (/data/golang/workdir/go/src/nosuchpkg)
open /data/golang/workdir/gopath/src/golang.org/x/tools/go/loader/missing.go: no such file or directory
open /data/golang/workdir/gopath/src/golang.org/x/tools/go/loader/missing.go: no such file or directory
/data/golang/workdir/gopath/src/golang.org/x/tools/go/loader/testdata/badpkgdecl.go:1:34: expected 'package', found 'EOF'
/data/golang/workdir/gopath/src/golang.org/x/tools/go/loader/testdata/badpkgdecl.go:1:34: expected 'package', found 'EOF'
/go/src/b/x.go:1:21: could not import c (cannot find package "c" in any of:
	/go/src/c (from $GOROOT)
	($GOPATH not set. For more details see: 'go help gopath'))
/go/src/b/x.go:1:21: could not import c (cannot find package "c" in any of:
	/go/src/c (from $GOROOT)
	($GOPATH not set. For more details see: 'go help gopath'))
/go/src/b/x.go:1:21: could not import c (/go/src/c/x.go:1:8: expected 'IDENT', found 'EOF')
/go/src/c/x.go:1:20: expected operand, found 'EOF'
cannot find package "two/three" in any of:
	/go/src/two/three (from $GOROOT)
	($GOPATH not set. For more details see: 'go help gopath')
cannot find package "http" in any of:
	/go/src/vendor/http (vendor tree)
	/go/src/http (from $GOROOT)
	($GOPATH not set. For more details see: 'go help gopath')
/go/src/c/x.go:1:31: cannot convert false (untyped bool constant) to int
/data/golang/workdir/tmp/ccgcZQ7Z.s: Assembler messages:
/data/golang/workdir/tmp/ccgcZQ7Z.s:26: Error: junk at end of line: `,3'
/data/golang/workdir/tmp/ccgcZQ7Z.s:27: Error: junk at end of line: `,3'
/data/golang/workdir/tmp/ccgcZQ7Z.s:63: Error: junk at end of line: `,3'
/data/golang/workdir/tmp/ccgcZQ7Z.s:64: Error: junk at end of line: `,3'
cgo failed: [go tool cgo -objdir /data/golang/workdir/tmp/golang.org_x_tools_go_loader_testdata_issue46877_C2592312503 -- -I /data/golang/workdir/tmp/golang.org_x_tools_go_loader_testdata_issue46877_C2592312503 x.go]: exit status 1
--- FAIL: TestCgoCwdIssue46877 (0.22s)
    loader_test.go:842: Load failed: couldn't load packages due to errors: golang.org/x/tools/go/loader/testdata/issue46877
FAIL
FAIL	golang.org/x/tools/go/loader	2.196s

This error message is also seen in several other tests, probably from the same root cause.

greplogs --dashboard -md -l -e 'junk at end of line' --since=2022-01-01

2022-04-18T12:04:50-46bc274-91b9915/linux-s390x-ibm
2022-04-17T00:58:13-46bc274-e948c33/linux-s390x-ibm
2022-04-16T02:01:19-46bc274-5e4543c/linux-s390x-ibm
2022-04-15T23:25:46-46bc274-e398266/linux-s390x-ibm

@gopherbot gopherbot added the Tools label Apr 18, 2022
@gopherbot gopherbot added this to the Unreleased milestone Apr 18, 2022
@bcmills
Copy link
Member Author

@bcmills bcmills commented Apr 18, 2022

(attn @jonathan-albrecht-ibm)

@bcmills bcmills added arch-s390x NeedsInvestigation labels Apr 18, 2022
@jonathan-albrecht-ibm
Copy link
Contributor

@jonathan-albrecht-ibm jonathan-albrecht-ibm commented Apr 18, 2022

So far these failures are only happening on one of the builders (go02). I can reproduce it manually on go02 as well.

It's not happening on the other builder (go01) either as part of the build farm builds or when I build and test manually.

I've stopped the go02 builder service while I try and figure out what's going wrong.

@jonathan-albrecht-ibm
Copy link
Contributor

@jonathan-albrecht-ibm jonathan-albrecht-ibm commented Apr 18, 2022

The problem with the go02 build seems to be because some of the gcc* packages were updated due to: https://go-review.googlesource.com/c/build/+/399996. I think it left the gcc toolchain in a bad state. I rolled back the updated packages and tested locally and everything worked again.

I've restarted the buildlet service on go02 and I'll watch it for problems. I've left a comment on https://go-review.googlesource.com/c/go/+/336549/comments/eb61ef44_7b74dba0 and I'll try and get things set up properly on the current builders. I'll try and set up the new builders I'm provisioning to avoid this mess.

@gopherbot
Copy link

@gopherbot gopherbot commented Apr 20, 2022

Change https://go.dev/cl/400817 mentions this issue: go/internal/srcimporter: add context to cgo errors

gopherbot pushed a commit that referenced this issue Apr 20, 2022
An error message like "could not import os/user (exit status 1)"
(observed in https://go.dev/issue/52407) is fairly inscrutable.

On the other hand, srcimporter doesn't report errors with quite enough
structure to dump the entire stderr output from 'go tool cgo' without
potentially overwhelming the caller. Here, we split the difference by
describing which command failed but not printing the output of that
command.

For #52407, that would at least provide a stronger clue connecting
to #52408.

Change-Id: Iabdc95b17ba20a0f6ff38e5c7084e5081e1ef5e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/400817
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
@jonathan-albrecht-ibm
Copy link
Contributor

@jonathan-albrecht-ibm jonathan-albrecht-ibm commented May 27, 2022

Sorry I should have closed this earlier. Reinstalling the gcc-c++ and related packages at the correct versions on the builder fixed this issue back on Apr 18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-s390x NeedsInvestigation Tools
Projects
None yet
Development

No branches or pull requests

3 participants