Skip to content

cmd/compile: cmd/compile/internal/gc.buildssa panic #38463

@howardjohn

Description

@howardjohn

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

$ go version
go version go1.14.2 linux/amd64

Does this issue reproduce with the latest release?

Yes, this was done on 1.14.2

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

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/gobin"
GOCACHE="/gocache"
GOENV="/home/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build048816231=/tmp/go-build -gno-record-gcc-switches"

This was built inside a docker image: gcr.io/istio-testing/build-tools:master-2020-04-10T20-55-56.

What did you do?

Tried to build our application.

What did you expect to see?

Build succeeds

What did you see instead?

STATIC=0 GOOS=windows LDFLAGS='-extldflags -static -s -w' common/scripts/gobuild.sh /tmp/tmp.W9NXZv7L5L/build/work/src/istio.io/istio/out/linux_amd64/release/istioctl-win.exe ./istioctl/cmd/istioctl
go: downloading github.com/inconshreveable/mousetrap v1.0.0
# k8s.io/apimachinery/pkg/util/runtime
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x74 pc=0xce6f4f]
goroutine 8 [running]:
cmd/compile/internal/gc.buildssa(0x0, 0x3, 0x0)
	/usr/local/go/src/cmd/compile/internal/gc/ssa.go:297 +0xdf
cmd/compile/internal/gc.compileSSA(0x0, 0x3)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:298 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc0000ef4a0, 0xc000018e10, 0x3)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:363 +0x49
created by cmd/compile/internal/gc.compileFunctions
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:361 +0x128

Full CI log: https://prow.istio.io/view/gcs/istio-prow/pr-logs/pull/istio_istio/22958/release-test_istio/11141
Rerunning the job with the same code the build succeeds: https://prow.istio.io/view/gcs/istio-prow/pr-logs/pull/istio_istio/22958/release-test_istio/11153

The referenced gobuild.sh script is https://github.com/istio/istio/blob/master/common/scripts/gobuild.sh.

I think the fact its in the compile code path means its a golang bug and not an issue with our code, but maybe not. Let me know if more info is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.release-blocker

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions