Skip to content

cmd/compile: internal compiler error: devirtualization failed (x/text, x/build, protobuf) #42279

@zikaeroh

Description

@zikaeroh

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

$ go version
go version devel +5cc43c51c9 Thu Oct 29 19:06:32 2020 +0000 linux/amd64

Does this issue reproduce with the latest release?

On tip, yes.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jake/.cache/go-build"
GOENV="/home/jake/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/jake/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/jake/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/jake/sdk/gotip"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/jake/sdk/gotip/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/jake/zikaeroh/hortbot/hortbot2/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 -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build236306354=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version devel +5cc43c51c9 Thu Oct 29 19:06:32 2020 +0000 linux/amd64
GOROOT/bin/go tool compile -V: compile version devel +5cc43c51c9 Thu Oct 29 19:06:32 2020 +0000
uname -sr: Linux 5.9.1-zen2-1-zen
/usr/lib/libc.so.6: GNU C Library (GNU libc) release release version 2.32.
gdb --version: GNU gdb (GDB) 9.2

What did you do?

Ran gotip test in my project to check for performance changes from the new inlining/devirtualization changes.

I don't think I need to provide the exact code; the error message shows which files in my module cache are failing to be built.

I'm guessing a build dashboard will reveal this, I'm just probably too quick to test changes I'm excited to see...

What did you expect to see?

A build success.

What did you see instead?

An ICE:

# golang.org/x/text/encoding
../../../go/pkg/mod/golang.org/x/[email protected]/encoding/encoding.go:293:5: internal compiler error: devirtualization failed: transform.t.(*Decoder).Transformer.Reset

goroutine 1 [running]:
runtime/debug.Stack(0xdaf700, 0xc00012a008, 0x0)
	/home/jake/sdk/gotip/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/gc.Fatalf(0xca427c, 0x1b, 0xc0004c95c0, 0x1, 0x1)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/subr.go:199 +0x1b0
cmd/compile/internal/gc.devirtualizeCall(0xc0004b8080)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/inl.go:1454 +0x2ab
cmd/compile/internal/gc.devirtualize.func1(0xc0004b8080, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/inl.go:1428 +0x45
cmd/compile/internal/gc.inspect(0xc0004b8080, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1072 +0x43
cmd/compile/internal/gc.inspectList(0xc0004b2480, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1085 +0x58
cmd/compile/internal/gc.inspect(0xc0004b8880, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1075 +0x66
cmd/compile/internal/gc.inspect(0xc00048d680, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1076 +0x85
cmd/compile/internal/gc.inspectList(0xc00011d8c0, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1085 +0x58
cmd/compile/internal/gc.inspect(0xc00046fb00, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1078 +0xc5
cmd/compile/internal/gc.inspectList(0xc00011d8d8, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1085 +0x58
cmd/compile/internal/gc.devirtualize(0xc000192580)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/inl.go:1426 +0x4b
cmd/compile/internal/gc.Main(0xcbbce0)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/main.go:706 +0x324b
main.main()
	/home/jake/sdk/gotip/src/cmd/compile/main.go:52 +0xb1

# github.com/golang/protobuf/proto
../../../go/pkg/mod/github.com/golang/[email protected]/proto/deprecated.go:18:2: internal compiler error: devirtualization failed: xtd.(*impl.extensionTypeDescriptor).ExtensionDescriptor.HasDefault

goroutine 1 [running]:
runtime/debug.Stack(0xdaf700, 0xc00000e018, 0x0)
	/home/jake/sdk/gotip/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/gc.Fatalf(0xca427c, 0x1b, 0xc0007235e0, 0x1, 0x1)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/subr.go:199 +0x1b0
cmd/compile/internal/gc.devirtualizeCall(0xc000429e80)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/inl.go:1454 +0x2ab
cmd/compile/internal/gc.devirtualize.func1(0xc000429e80, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/inl.go:1428 +0x45
cmd/compile/internal/gc.inspect(0xc000429e80, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1072 +0x43
cmd/compile/internal/gc.inspectList(0xc00000d8f0, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1085 +0x58
cmd/compile/internal/gc.inspect(0xc000429d80, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1078 +0xc5
cmd/compile/internal/gc.inspectList(0xc00000d950, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1085 +0x58
cmd/compile/internal/gc.inspect(0xc000429a00, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1078 +0xc5
cmd/compile/internal/gc.inspectList(0xc00000da58, 0xcbbe50)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/syntax.go:1085 +0x58
cmd/compile/internal/gc.devirtualize(0xc0001542c0)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/inl.go:1426 +0x4b
cmd/compile/internal/gc.Main(0xcbbce0)
	/home/jake/sdk/gotip/src/cmd/compile/internal/gc/main.go:706 +0x324b
main.main()
	/home/jake/sdk/gotip/src/cmd/compile/main.go:52 +0xb1

FAIL	github.com/hortbot/hortbot/internal/bot [build failed]
FAIL

cc @mdempsky

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions