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 compiler error: 'UpdateByQueryRequest.Do': panic during regalloc while compiling UpdateByQueryRequest.Do: #64631

Closed
harshavardhana opened this issue Dec 9, 2023 · 7 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@harshavardhana
Copy link
Contributor

Go version

go version 1.21.5

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

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/builder/.cache/go-build'
GOENV='/home/builder/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/builder/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/builder/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/builder/sdk/go1.21.5'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/builder/sdk/go1.21.5/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.5'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/builder/go/src/github.com/minio/mc/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2004049258=/tmp/go-build -gno-record-gcc-switches'

What did you do?

Unable to reproduce this consistently i.e not reproducible always

What did you expect to see?

No build errors or crashes

What did you see instead?

command: -s\ -w\ -X\ github.com/minio/minio/cmd.Version=2023-12-08T20:26:01Z\ -X\ github.com/minio/minio/cmd.CopyrightYear=2023\ -X\ github.com/minio/minio/cmd.ReleaseTag=RELEASE.2023-12-08T20-26-01Z\ -X\ github.com/minio/minio/cmd.CommitID=196e7e072bd5f881455f079201f01062b7da08ee\ -X\ github.com/minio/minio/cmd.ShortCommitID=196e7e072bd5\ -X\ github.com/minio/minio/cmd.GOPATH=/root/.q/sources/gopath\ -X\ github.com/minio/minio/cmd.GOROOT=/opt/go
command: -o
command: minio-release/darwin-arm64/minio.RELEASE.2023-12-08T20-26-01Z
console output:
# github.com/elastic/go-elasticsearch/v7/esapi
github.com/elastic/go-elasticsearch/v7@v7.17.10/esapi/api.update_by_query.go:111:21: internal compiler error: 'UpdateByQueryRequest.Do': panic during regalloc while compiling UpdateByQueryRequest.Do:

runtime error: index out of range [898151240] with length 338

goroutine 19016 [running]:
cmd/compile/internal/ssa.Compile.func1()
	cmd/compile/internal/ssa/compile.go:49 +0x6c
panic({0xd31dc0?, 0xc0358bd1e8?})
	runtime/panic.go:914 +0x21f
cmd/compile/internal/ssa.(*regAllocState).regalloc(0xc0358d6680, 0xc03576c4e0)
	cmd/compile/internal/ssa/regalloc.go:923 +0xccd4
cmd/compile/internal/ssa.regalloc(0xc03576c4e0?)
	cmd/compile/internal/ssa/regalloc.go:148 +0x3d
cmd/compile/internal/ssa.Compile(0xc03576c4e0)
	cmd/compile/internal/ssa/compile.go:97 +0x9ab
cmd/compile/internal/ssagen.buildssa(0xc006b97600, 0x3)
	cmd/compile/internal/ssagen/ssa.go:568 +0x2ae9
cmd/compile/internal/ssagen.Compile(0xc006b97600, 0x0?)
	cmd/compile/internal/ssagen/pgen.go:187 +0x45
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
	cmd/compile/internal/gc/compile.go:184 +0x34
cmd/compile/internal/gc.compileFunctions.func3.1()
	cmd/compile/internal/gc/compile.go:166 +0x30
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 472
	cmd/compile/internal/gc/compile.go:165 +0x23a



Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
@harshavardhana
Copy link
Contributor Author

Second attempt throws an entirely different error

# github.com/minio/console/restapi
../../../../pkg/mod/github.com/minio/console@v0.42.1/restapi/admin_users.go:250:27: internal compiler error: unexpected expression: &{ctx {{{0xc000501110 250 27}} {{0xc0020933b0 <nil> 104}}}} (*syntax.Name)

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new

@randall77
Copy link
Contributor

Please show us the commands you ran. That's going to make it a whole lot easier for us to reproduce.

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Dec 9, 2023
@seankhliao seankhliao changed the title go build internal compiler error: 'UpdateByQueryRequest.Do': panic during regalloc while compiling UpdateByQueryRequest.Do: cmd/compile: internal compiler error: 'UpdateByQueryRequest.Do': panic during regalloc while compiling UpdateByQueryRequest.Do: Dec 9, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Dec 9, 2023
@harshavardhana
Copy link
Contributor Author

Please show us the commands you ran. That's going to make it a whole lot easier for us to reproduce.

I was trying to make a release from Linux amd64 and cross-compiling to darwin/arm64

-->    darwin/arm64:github.com/minio/minio
command: go
command: build
command: -trimpath
command: -tags
command: kqueue
command: --ldflags
command: -s\ -w\ -X\ github.com/minio/minio/cmd.Version=2023-12-09T18:17:51Z\ -X\ github.com/minio/minio/cmd.CopyrightYear=2023\ -X\ github.com/minio/minio/cmd.ReleaseTag=RELEASE.2023-12-09T18-17-51Z\ -X\ github.com/minio/minio/cmd.CommitID=65f34cd823337e85bd6f9e7ee31cca8758de7cd1\ -X\ github.com/minio/minio/cmd.ShortCommitID=65f34cd82333\ -X\ github.com/minio/minio/cmd.GOPATH=/root/.q/sources/gopath\ -X\ github.com/minio/minio/cmd.GOROOT=/opt/go
command: -o
command: minio-release/darwin-arm64/minio.RELEASE.2023-12-09T18-17-51Z
console output:
# github.com/minio/minio/cmd

Its consistently reproducible but with different errors.

@harshavardhana
Copy link
Contributor Author

Switching back to go1.21.4 it seems to be fine.

@randall77
Copy link
Contributor

I cannot reproduce. I did, on a linux/amd64 machine,

git clone https://github.com/minio/minio
cd minio
GOARCH=arm64 GOOS=darwin ~/go1.21.5/bin/go build -trimpath -tags kqueue --ldflags -s\ -w\ -X\ github.com/minio/minio/cmd.Version=2023-12-09T18:17:51Z\ -X\ github.com/minio/minio/cmd.CopyrightYear=2023\ -X\ github.com/minio/minio/cmd.ReleaseTag=RELEASE.2023-12-09T18-17-51Z\ -X\ github.com/minio/minio/cmd.CommitID=65f34cd823337e85bd6f9e7ee31cca8758de7cd1\ -X\ github.com/minio/minio/cmd.ShortCommitID=65f34cd82333\ -X\ github.com/minio/minio/cmd.GOPATH=/root/.q/sources/gopath\ -X\ github.com/minio/minio/cmd.GOROOT=/opt/go -o minio-release/darwin-arm64/minio.RELEASE.2023-12-09T18-17-51Z

and it worked fine.

I think we need to figure out what's different about your setup and mine.
Try blowing away your go1.21.5 installation and reinstall it.
What commit of minio are you at?

@harshavardhana
Copy link
Contributor Author

I think we need to figure out what's different about your setup and mine.
Try blowing away your go1.21.5 installation and reinstall it.
What commit of minio are you at?

I am on the latest master; as I said, it runs fine for the most part, but it is not consistently reproducible.

  • Re-installed go1.21.5, then it went away for 10-12 attempts, then resurfaced again
  • Tried removing all build flags it happened once, not consistently
  • Tested on an entirely fresh node, unable to reproduce till now

So I don't know If I have something concrete to reproduce. Looks like other random factors are involved, so won't be entirely sure.

@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jan 28, 2024
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants