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: failed to build juju/juju with internal compiler error: Inline_Flood #45503

Closed
johejo opened this issue Apr 11, 2021 · 3 comments
Closed

Comments

@johejo
Copy link

@johejo johejo commented Apr 11, 2021

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

$ go version
go version devel go1.17-3f4977bd58 Sat Apr 10 19:02:08 2021 +0000 linux/amd64

Does this issue reproduce with the latest release?

No, tip only.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/johejo/.cache/go-build"
GOENV="/home/johejo/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/johejo/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/johejo/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/johejo/ghq/github.com/golang/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/johejo/ghq/github.com/golang/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel go1.17-3f4977bd58 Sat Apr 10 19:02:08 2021 +0000"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/johejo/ghq/github.com/juju/juju/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-build2177447849=/tmp/go-build -gno-record-gcc-switches"

What did you do?

git clone https://github.com/juju/juju.git
cd juju/
gotip build ./...

What did you expect to see?

Build succeds

What did you see instead?

# github.com/juju/juju/apiserver/facade
<autogenerated>:1: internal compiler error: Inline_Flood: unexpected WorkloadStatus, NAME, Pxxx

goroutine 1 [running]:
runtime/debug.Stack(0xfa20c0, 0xc0000be008, 0x0)
        /home/johejo/ghq/github.com/golang/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/base.FatalfAt(0x100000000001, 0xe6c6db, 0x23, 0xc0014712a0, 0x3, 0x3)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/base/print.go:227 +0x1ea
cmd/compile/internal/base.Fatalf(...)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/base/print.go:196
cmd/compile/internal/inline.Inline_Flood(0xc000510680, 0xe823e8)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/inline/inl.go:201 +0x105
cmd/compile/internal/inline.Inline_Flood.func1(0xfb7168, 0xc000d18a80)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/inline/inl.go:222 +0x172
cmd/compile/internal/ir.Visit.func1(0xfb7168, 0xc000d18a80, 0xc00052a4b0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:105 +0x42
cmd/compile/internal/ir.doNodes(0xc00078bc10, 0x1, 0x1, 0xc00052a4b0, 0xc000f07d00)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/node_gen.go:1440 +0x73
cmd/compile/internal/ir.(*CallExpr).doChildren(0xc000488360, 0xc00052a4b0, 0x40e4b0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/node_gen.go:263 +0xb8
cmd/compile/internal/ir.DoChildren(...)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:94
cmd/compile/internal/ir.Visit.func1(0xfb56d8, 0xc000488360, 0xc0003b3630)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:106 +0x6f
cmd/compile/internal/ir.doNodes(0xc00078bc20, 0x1, 0x1, 0xc00052a4b0, 0xc000f07d00)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/node_gen.go:1440 +0x73
cmd/compile/internal/ir.(*ReturnStmt).doChildren(0xc001344c30, 0xc00052a4b0, 0x7f9ef76ca501)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/node_gen.go:977 +0x85
cmd/compile/internal/ir.DoChildren(...)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:94
cmd/compile/internal/ir.Visit.func1(0xfb6fd8, 0xc001344c30, 0xc00004e800)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:106 +0x6f
cmd/compile/internal/ir.Visit(0xfb6fd8, 0xc001344c30, 0xc00052a498)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:108 +0xc8
cmd/compile/internal/ir.VisitList(0xc00078bca0, 0x1, 0x1, 0xc00052a498)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:114 +0x72
cmd/compile/internal/inline.Inline_Flood(0xc000f34000, 0xe823e8)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/inline/inl.go:247 +0x271
cmd/compile/internal/gc.(*exporter).markObject(0xc001471ab8, 0xfb6b28, 0xc000f34000)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:92 +0x6d
cmd/compile/internal/gc.(*exporter).markType(0xc001471ab8, 0xc000f19110)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:115 +0x454
cmd/compile/internal/gc.(*exporter).markType(0xc001471ab8, 0xc000fc2c40)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:140 +0x267
cmd/compile/internal/gc.(*exporter).markType(0xc001471ab8, 0xc000fc2cb0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:151 +0x388
cmd/compile/internal/gc.(*exporter).markObject(0xc001471ab8, 0xfb6b28, 0xc000f7be10)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:96 +0x92
cmd/compile/internal/gc.(*exporter).markType(0xc001471ab8, 0xc000760ee0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:115 +0x454
cmd/compile/internal/gc.(*exporter).markType(0xc001471ab8, 0xc000f19180)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:131 +0x168
cmd/compile/internal/gc.(*exporter).markType(0xc001471ab8, 0xc000ff5260)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:151 +0x388
cmd/compile/internal/gc.(*exporter).markType(0xc001471ab8, 0xc00036d810)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:157 +0x2dd
cmd/compile/internal/gc.(*exporter).markObject(0xc001471ab8, 0xfb6b28, 0xc0004d25b0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:96 +0x92
cmd/compile/internal/gc.dumpexport(0xc00065e040)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:33 +0x116
cmd/compile/internal/gc.dumpCompilerObj(0xc00065e040)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/obj.go:106 +0x39
cmd/compile/internal/gc.dumpobj1(0x7fff5c7adb6b, 0x23, 0x3)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/obj.go:62 +0x1cf
cmd/compile/internal/gc.dumpobj()
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/obj.go:43 +0x50
cmd/compile/internal/gc.Main(0xe81ae8)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/main.go:306 +0x12ff
main.main()
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/main.go:54 +0x155

# github.com/juju/juju/core/cache/cachetest
<autogenerated>:1: internal compiler error: Inline_Flood: unexpected WorkloadStatus, NAME, Pxxx

goroutine 1 [running]:
runtime/debug.Stack(0xfa20c0, 0xc0000be008, 0x0)
        /home/johejo/ghq/github.com/golang/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/base.FatalfAt(0x100000000001, 0xe6c6db, 0x23, 0xc001487148, 0x3, 0x3)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/base/print.go:227 +0x1ea
cmd/compile/internal/base.Fatalf(...)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/base/print.go:196
cmd/compile/internal/inline.Inline_Flood(0xc0017489c0, 0xe823e8)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/inline/inl.go:201 +0x105
cmd/compile/internal/inline.Inline_Flood.func1(0xfb7168, 0xc00166bbc0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/inline/inl.go:222 +0x172
cmd/compile/internal/ir.Visit.func1(0xfb7168, 0xc00166bbc0, 0xc001746468)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:105 +0x42
cmd/compile/internal/ir.doNodes(0xc00128abd0, 0x1, 0x1, 0xc001746468, 0xc001281100)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/node_gen.go:1440 +0x73
cmd/compile/internal/ir.(*CallExpr).doChildren(0xc00105bb00, 0xc001746468, 0x40e4b0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/node_gen.go:263 +0xb8
cmd/compile/internal/ir.DoChildren(...)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:94
cmd/compile/internal/ir.Visit.func1(0xfb56d8, 0xc00105bb00, 0xc0003bc7d0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:106 +0x6f
cmd/compile/internal/ir.doNodes(0xc00128abe0, 0x1, 0x1, 0xc001746468, 0xc001281100)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/node_gen.go:1440 +0x73
cmd/compile/internal/ir.(*ReturnStmt).doChildren(0xc001743310, 0xc001746468, 0x7f7f47c95801)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/node_gen.go:977 +0x85
cmd/compile/internal/ir.DoChildren(...)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:94
cmd/compile/internal/ir.Visit.func1(0xfb6fd8, 0xc001743310, 0xc00004e400)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:106 +0x6f
cmd/compile/internal/ir.Visit(0xfb6fd8, 0xc001743310, 0xc001746450)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:108 +0xc8
cmd/compile/internal/ir.VisitList(0xc00128abf0, 0x1, 0x1, 0xc001746450)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/ir/visit.go:114 +0x72
cmd/compile/internal/inline.Inline_Flood(0xc0007f2a90, 0xe823e8)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/inline/inl.go:247 +0x271
cmd/compile/internal/gc.(*exporter).markObject(0xc001487ab8, 0xfb6b28, 0xc0007f2a90)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:92 +0x6d
cmd/compile/internal/gc.(*exporter).markType(0xc001487ab8, 0xc000796a10)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:115 +0x454
cmd/compile/internal/gc.(*exporter).markType(0xc001487ab8, 0xc0000cfe30)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:140 +0x267
cmd/compile/internal/gc.(*exporter).markType(0xc001487ab8, 0xc0000cfea0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:151 +0x388
cmd/compile/internal/gc.(*exporter).markObject(0xc001487ab8, 0xfb6b28, 0xc0000a3c70)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:96 +0x92
cmd/compile/internal/gc.(*exporter).markType(0xc001487ab8, 0xc0005489a0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:115 +0x454
cmd/compile/internal/gc.(*exporter).markType(0xc001487ab8, 0xc000796a80)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:131 +0x168
cmd/compile/internal/gc.(*exporter).markType(0xc001487ab8, 0xc000371ea0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:151 +0x388
cmd/compile/internal/gc.(*exporter).markObject(0xc001487ab8, 0xfb6b28, 0xc0003ecf70)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:96 +0x92
cmd/compile/internal/gc.(*exporter).markType(0xc001487ab8, 0xc00036d180)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:115 +0x454
cmd/compile/internal/gc.(*exporter).markType(0xc001487ab8, 0xc000370c40)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:131 +0x168
cmd/compile/internal/gc.(*exporter).markType(0xc001487ab8, 0xc00036d110)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:145 +0x35f
cmd/compile/internal/gc.(*exporter).markObject(0xc001487ab8, 0xfb6b28, 0xc0003bbba0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:96 +0x92
cmd/compile/internal/gc.dumpexport(0xc000d0c9a0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/export.go:33 +0x116
cmd/compile/internal/gc.dumpCompilerObj(0xc000d0c9a0)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/obj.go:106 +0x39
cmd/compile/internal/gc.dumpobj1(0x7ffc80d6cb0e, 0x24, 0x3)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/obj.go:62 +0x1cf
cmd/compile/internal/gc.dumpobj()
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/obj.go:43 +0x50
cmd/compile/internal/gc.Main(0xe81ae8)
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/internal/gc/main.go:306 +0x12ff
main.main()
        /home/johejo/ghq/github.com/golang/go/src/cmd/compile/main.go:54 +0x155
@ALTree ALTree added this to the Go1.17 milestone Apr 11, 2021
@mvdan
Copy link
Member

@mvdan mvdan commented Apr 12, 2021

This also affects cuelang.org/go/internal/core/eval:

<autogenerated>:1: internal compiler error: Inline_Flood: unexpected Div, NAME, Pxxx

Loading

@cuonglm
Copy link
Member

@cuonglm cuonglm commented Apr 12, 2021

A simple reproducer:

$ cat go.mod 
module t

go 1.17
$ cat t.go 
package t

import "t/p"

func F() {
	s := p.S{}
	s.M()
}
$ cat p/p.go 
package p

type S struct{}

func (s *S) M() {
	s.m((*S).N)
}

func (s *S) N() {}

func (s *S) m(func(*S)) {}

Seems that typecheck information is not {export,import}ed correctly. For field which is function parameter, we currently generate associated ONAME node without its corresponding FUNC.

git bisect points to 1129a60

cc @randall77

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented Apr 13, 2021

Change https://golang.org/cl/309831 mentions this issue: cmd/compile: fix importing of method expressions

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants