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

runtime/debug: internal compiler error when building Kubernetes introduced in commit fdecaa8 #23179

Closed
laboger opened this issue Dec 19, 2017 · 14 comments

Comments

@laboger
Copy link
Contributor

@laboger laboger commented Dec 19, 2017

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

go version devel +fdecaa8 Fri Dec 15 17:59:32 2017 +0000 linux/ppc64le

Does this issue reproduce with the latest release?

yes with latest upstream

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

linux ppc64le, amd64

What did you do?

We have continuous builds of Kubernetes on upstream golang on ppc64le.

What did you expect to see?

successful builds

What did you see instead?

build failures (ICE) starting with commit fdecaa8

To reproduce:

clone latest from github.com/kubernetes/kubernetes.git
build golang after commit specified above and use it for the kubernetes build

~/kub/kublatest/kubernetes$ make all 2>&1 | tee make.log
+++ [1219 08:40:56] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
    k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata
+++ [1219 08:40:57] Generating bindata:
    test/e2e/generated/gobindata_util.go
~/kub/kublatest/kubernetes ~/kub/kublatest/kubernetes/test/e2e/generated
~/kub/kublatest/kubernetes/test/e2e/generated
+++ [1219 08:40:57] Building go targets for linux/ppc64le:
    ./vendor/k8s.io/code-generator/cmd/deepcopy-gen
+++ [1219 08:41:06] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
    k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata
+++ [1219 08:41:07] Generating bindata:
    test/e2e/generated/gobindata_util.go
~/kub/kublatest/kubernetes ~/kub/kublatest/kubernetes/test/e2e/generated
~/kub/kublatest/kubernetes/test/e2e/generated
+++ [1219 08:41:08] Building go targets for linux/ppc64le:
    ./vendor/k8s.io/code-generator/cmd/defaulter-gen
+++ [1219 08:41:13] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
    k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata
+++ [1219 08:41:14] Generating bindata:
    test/e2e/generated/gobindata_util.go
~/kub/kublatest/kubernetes ~/kub/kublatest/kubernetes/test/e2e/generated
~/kub/kublatest/kubernetes/test/e2e/generated
+++ [1219 08:41:15] Building go targets for linux/ppc64le:
    ./vendor/k8s.io/code-generator/cmd/conversion-gen
+++ [1219 08:41:22] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
    k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata
+++ [1219 08:41:22] Generating bindata:
    test/e2e/generated/gobindata_util.go
~/kub/kublatest/kubernetes ~/kub/kublatest/kubernetes/test/e2e/generated
~/kub/kublatest/kubernetes/test/e2e/generated
+++ [1219 08:41:23] Building go targets for linux/ppc64le:
    ./vendor/k8s.io/code-generator/cmd/openapi-gen
+++ [1219 08:41:32] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
    k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata
+++ [1219 08:41:32] Generating bindata:
    test/e2e/generated/gobindata_util.go
~/kub/kublatest/kubernetes ~/kub/kublatest/kubernetes/test/e2e/generated
~/kub/kublatest/kubernetes/test/e2e/generated
+++ [1219 08:41:33] Building go targets for linux/ppc64le:
    cmd/kube-proxy
    cmd/kube-apiserver
    cmd/kube-controller-manager
    cmd/cloud-controller-manager
    cmd/kubelet
    cmd/kubeadm
    cmd/hyperkube
    vendor/k8s.io/kube-aggregator
    vendor/k8s.io/apiextensions-apiserver
    plugin/cmd/kube-scheduler
    cluster/gce/gci/mounter
    cmd/kubectl
    cmd/gendocs
    cmd/genkubedocs
    cmd/genman
    cmd/genyaml
    cmd/genswaggertypedocs
    cmd/linkcheck
    vendor/github.com/onsi/ginkgo/ginkgo
    test/e2e/e2e.test
    cmd/kubemark
    vendor/github.com/onsi/ginkgo/ginkgo
    test/e2e_node/e2e_node.test
    cmd/gke-certificates-controller
# k8s.io/kubernetes/vendor/github.com/docker/docker/client
<autogenerated>:1:0: internal compiler error: child dcl collision on symbol _·4 within k8s.io/kubernetes/vendor/github.com/docker/go-connections/sockets.DialPipe


goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
	/home/boger/golang/plain/go/src/runtime/debug/stack.go:24 +0x94
cmd/compile/internal/gc.Fatalf(0x7c7d79, 0x2b, 0xc422c4ce08, 0x2, 0x2)
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/subr.go:182 +0x1c8
cmd/compile/internal/gc.makePreinlineDclMap(0xc420751730, 0xc422105f00)
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/dwinl.go:229 +0x2ac
cmd/compile/internal/gc.assembleInlines(0xc420751730, 0xc420d2dd10, 0xc421a07c50, 0x2, 0x2, 0xc422d97eb8, 0x2, 0x2)
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/dwinl.go:108 +0x5e4
cmd/compile/internal/gc.debuginfo(0xc420751730, 0x7a7260, 0xc420d2dd10, 0x0, 0x0, 0x1, 0x0, 0x0, 0x3a128)
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/pgen.go:375 +0x68c
cmd/internal/obj.(*Link).DwarfAbstractFunc(0xc420310000, 0x7a7260, 0xc420d2dd10, 0xc420751730, 0x3fffc8339d01, 0x38)
	/home/boger/golang/plain/go/src/cmd/internal/obj/objfile.go:605 +0x8c
cmd/compile/internal/gc.genAbstractFunc(0xc420751730)
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/dwinl.go:200 +0xbc
cmd/internal/obj.(*DwarfFixupTable).Finalize(0xc42003f0c0, 0x3fffc8339d01, 0x38, 0xc42074f200)
	/home/boger/golang/plain/go/src/cmd/internal/obj/objfile.go:856 +0x248
cmd/compile/internal/gc.Main(0x7d0070)
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/main.go:655 +0x2e1c
main.main()
	/home/boger/golang/plain/go/src/cmd/compile/main.go:49 +0x94

As noted above, we found this on ppc64le but it does also get an ICE on linux/amd64.

@mvdan
Copy link
Member

@mvdan mvdan commented Dec 19, 2017

@laboger could you please make sure it's still broken with the latest master? Asking because a similar regression was fixed recently in #23046.

@mkumatag
Copy link

@mkumatag mkumatag commented Dec 19, 2017

@mvdan yes it is reproduced with latest golang master

@laboger
Copy link
Contributor Author

@laboger laboger commented Dec 19, 2017

Yes, it failed with latest upstream right before I opened this issue.

go version
go version devel +3aeb395 Mon Dec 18 20:24:12 2017 +0000 linux/ppc64le

go version
go version devel +3aeb395 Mon Dec 18 20:24:12 2017 +0000 linux/amd64

@thanm
Copy link
Member

@thanm thanm commented Dec 19, 2017

I am taking a look

@gopherbot
Copy link

@gopherbot gopherbot commented Dec 19, 2017

Change https://golang.org/cl/84755 mentions this issue: cmd/compile: fix corner case in DWARF inline info generation

@laboger
Copy link
Contributor Author

@laboger laboger commented Dec 19, 2017

I'm now hitting a new error.

# k8s.io/kubernetes/pkg/generated/openapi
<autogenerated>:1:0: internal compiler error: unexpected: can't find var _·2 in preInliningDcls for k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource.resource.Quantity.OpenAPIDefinition


goroutine 20 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
	/home/boger/golang/plain/go/src/runtime/debug/stack.go:24 +0x94
cmd/compile/internal/gc.Fatalf(0x7cb83e, 0x38, 0xc427f997e0, 0x2, 0x2)
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/subr.go:182 +0x1c8
cmd/compile/internal/gc.assembleInlines(0xc424130150, 0xc420450780, 0xc426fa4240, 0x7, 0x8, 0xc42f1718c0, 0x7, 0x8)
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/dwinl.go:145 +0x8a0
cmd/compile/internal/gc.debuginfo(0xc424130150, 0x7a7260, 0xc420450780, 0x0, 0xc424130230, 0x0, 0x7b3104, 0xda164, 0x628f0)
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/pgen.go:375 +0x68c
cmd/internal/obj.(*Link).populateDWARF(0xc42000e240, 0x7a7260, 0xc420450780, 0xc424130150, 0x3fffc2d2d648, 0x27)
	/home/boger/golang/plain/go/src/cmd/internal/obj/objfile.go:551 +0x444
cmd/internal/obj.Flushplist(0xc42000e240, 0xc427f99ea0, 0xc420650020, 0x3fffc2d2d648, 0x27)
	/home/boger/golang/plain/go/src/cmd/internal/obj/plist.go:109 +0x6d0
cmd/compile/internal/gc.(*Progs).Flush(0xc4288f0550)
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/gsubr.go:87 +0xbc
cmd/compile/internal/gc.compileSSA(0xc420450780, 0x0)
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/pgen.go:248 +0x1a8
cmd/compile/internal/gc.compileFunctions.func2(0xc424133860, 0xc42411c4a0, 0x0)
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/pgen.go:289 +0x40
created by cmd/compile/internal/gc.compileFunctions
	/home/boger/golang/plain/go/src/cmd/compile/internal/gc/pgen.go:287 +0x11c

!!! [1219 13:30:08] Call tree:
!!! [1219 13:30:08]  1: /home/boger/kub/kublatest/kubernetes/hack/lib/golang.sh:707 kube::golang::build_binaries_for_platform(...)
!!! [1219 13:30:08]  2: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [1219 13:30:08] Call tree:
!!! [1219 13:30:08]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [1219 13:30:08] Call tree:
!!! [1219 13:30:08]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
Makefile:92: recipe for target 'all' failed
make: *** [all] Error 1
@gopherbot gopherbot closed this in 0447216 Dec 19, 2017
@thanm
Copy link
Member

@thanm thanm commented Dec 20, 2017

@laboger , I redid the kubernetes build according to your instructions (using tip with the fix) and I don't see any build errors. Are you still seeing this new problem?

@mkumatag
Copy link

@mkumatag mkumatag commented Dec 20, 2017

@thanm this error is happening only on the ppc64le arch.

@thanm
Copy link
Member

@thanm thanm commented Dec 20, 2017

Thanks for the clarification. That is somewhat surprising given that the inliner is (more or less) target-independent, but I'll see what I can do about reproducing it.

@laboger
Copy link
Contributor Author

@laboger laboger commented Dec 20, 2017

If I can help narrow it down let me know what I can do.

@thanm
Copy link
Member

@thanm thanm commented Dec 20, 2017

OK, I finally have a handle on it now. Working on a fix.

@thanm thanm reopened this Dec 20, 2017
@gopherbot
Copy link

@gopherbot gopherbot commented Dec 20, 2017

Change https://golang.org/cl/84975 mentions this issue: cmd/compile: second attempt at fix for issue 23179

@laboger
Copy link
Contributor Author

@laboger laboger commented Dec 20, 2017

Your latest CL allows the Kubernetes build to finish without error. Thanks.

@thanm
Copy link
Member

@thanm thanm commented Dec 20, 2017

Good to hear. Thanks for doing the additional testing.

@gopherbot gopherbot closed this in 841d865 Dec 20, 2017
@golang golang locked and limited conversation to collaborators Dec 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants