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/compile: internal error: importsForRootNode err (type error) recorded as live on entry, p.Pc=1209 when building Kubernetes on ppc64le #17194

Closed
laboger opened this issue Sep 22, 2016 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@laboger
Copy link
Contributor

laboger commented Sep 22, 2016

Please answer these questions before submitting your issue. Thanks!

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

go version devel +cddddbc Thu Sep 22 17:36:39 2016 +0000 linux/ppc64le

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

Ubuntu 16.04

What did you do?

Tried to build Kubernetes for ppc64le with latest

What did you expect to see?

Successful build.

What did you see instead?

Build errors

This is needed to create go-bindata needed by the kubernetes build. Add go-bindata to your PATH:
go get -u github.com/jteeuwen/go-bindata/go-bindata

Use this patch to modify hack/lib/golang.sh so it will build ppc64le. It sets -x -work to save the tmp build files and see what's building.

kubscript.diff.txt

git clone https://github.com/kubernetes/kubernetes.git
cd kubernetes
apply the patch
make

This is the compile command that fails:
/home/boger/golang/latest/go/pkg/tool/linux_ppc64le/compile -o $WORK/k8s.io/kubernetes/vendor/github.com/onsi/ginkgo/ginkgo/convert.a -trimpath $WORK -p k8s.io/kubernetes/vendor/github.com/onsi/ginkgo/ginkgo/convert -complete -buildid 012aed0fb8b7f70a3adf3f0ea5a764bef88f917c -D _/home/boger/kublatest/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/onsi/ginkgo/ginkgo/convert -I $WORK -pack ./ginkgo_ast_nodes.go ./import.go ./package_rewriter.go ./test_finder.go ./testfile_rewriter.go ./testing_t_rewriter.go
./import.go:13: internal error: importsForRootNode err (type error) recorded as live on entry, p.Pc=1209

I didn't try the build on other platforms so I'm not sure if it fails elsewhere. This error didn't occur about 2 weeks ago because I've been doing this build regularly but I don't have an exact date as to when it last worked.

@laboger
Copy link
Contributor Author

laboger commented Sep 29, 2016

I found out this error was introduced with this commit:
commit 3134ab3
Author: Keith Randall khr@golang.org
Date: Tue Sep 13 17:01:01 2016 -0700

cmd/compile: redo nil checks

The file causing the error is here in the kubernetes source repository:

vendor/github.com/onsi/ginkgo/ginkgo/convert/import.go

Create a file with just the first function from that file and the problem is reproduced:
go build import.go
//# command-line-arguments
./import.go:13: internal error: importsForRootNode err (type error) recorded as live on entry, p.Pc=0

go version
go version devel +3134ab3 Thu Sep 15 02:42:13 2016 +0000 linux/ppc64le

@randall77 randall77 self-assigned this Sep 30, 2016
@randall77
Copy link
Contributor

(Just on PPC64)
Looks like we need to fold more MOVDaddr into other ops (MOVDstorezero, in this case).
Without that, we have

  v1 = (MOVDaddr {some symbol})
  v2 = (VARDEF {some symbol})
  v3 = (MOVDstorezero v1 v2)

The liveness pass treats the address taking as a read of the symbol, so it thinks the symbol is live a the start of the function.

@gopherbot
Copy link

CL https://golang.org/cl/30086 mentions this issue.

@quentinmit quentinmit added this to the Go1.8 milestone Oct 3, 2016
@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 3, 2016
@golang golang locked and limited conversation to collaborators Oct 4, 2017
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.
Projects
None yet
Development

No branches or pull requests

4 participants