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: NewBulk too big: nbit=32224 count=544369 nword=1007 size=548179583 #67916

Open
jeevan449 opened this issue Jun 10, 2024 · 6 comments
Assignees
Labels
BadErrorMessage Issues related compiler error messages that should be better. compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@jeevan449
Copy link

jeevan449 commented Jun 10, 2024

Go version

go version go1.21.4 darwin/arm64

Output of go env in your module/workspace:

j.koppuravuri@VQCHYTV457 global % go env
GO111MODULE='on'
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/j.koppuravuri/Library/Caches/go-build'
GOENV='/Users/j.koppuravuri/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE='*f5net.com,gitlab.com/f5/volterra'
GOMODCACHE='/Users/j.koppuravuri/go/pkg/mod'
GONOPROXY='*f5net.com,gitlab.com/f5/volterra'
GONOSUMDB='*f5net.com,gitlab.com/f5/volterra'
GOOS='darwin'
GOPATH='/Users/j.koppuravuri/go'
GOPRIVATE='*f5net.com,gitlab.com/f5/volterra'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/opt/go/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/opt/go/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/j.koppuravuri/go/src/gopkg.volterra.us/test/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 -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/nl/0rff3dld4454171s50nptppc0000gq/T/go-build2197977164=/tmp/go-build -gno-record-gcc-switches -fno-common'
j.koppuravuri@VQCHYTV457 globa

What did you do?

j.koppuravuri@VQCHYTV457 global % dlv test -- -test.run Testxyz -test.v

# gopkg.x.us/test/pbgo/extschema/schema/combined
<autogenerated>:1: internal compiler error: NewBulk too big: nbit=32224 count=544369 nword=1007 size=548179583

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

What did you see happen?

Unable to compile with dlv

What did you expect to see?

Test should run

@rsc
Copy link
Contributor

rsc commented Jun 10, 2024

It'd be nice if this error at least printed the name of the function that is too big.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/591675 mentions this issue: cmd/compile: give function position on function-too-big error

@seankhliao seankhliao changed the title internal compiler error: NewBulk too big: nbit=32224 count=544369 nword=1007 size=548179583 cmd/compile: internal compiler error: NewBulk too big: nbit=32224 count=544369 nword=1007 size=548179583 Jun 10, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jun 10, 2024
@prattmic prattmic added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 12, 2024
@prattmic prattmic added this to the Backlog milestone Jun 12, 2024
@prattmic
Copy link
Member

cc @golang/compiler

@mknyszek mknyszek added the BadErrorMessage Issues related compiler error messages that should be better. label Jun 12, 2024
@mknyszek mknyszek modified the milestones: Backlog, Go1.24 Jun 12, 2024
@randall77
Copy link
Contributor

I'm not sure there's anything we can do here except make the error better.
This compilation is running into the fact that this function needs more than 2GB of live/notlive bits to describe its stack frame.
We could conceivably handle compiling functions this big, but that would take a fair amount of work for not much benefit.
I'm going to make this issue about just the error message, for which there is a CL out.

@cherrymui
Copy link
Member

Is this only failing in -N build (I think dlv test makes it build with -N)? We already enable some optimizations for very large functions even in -N mode. Maybe we can enable more (or all) optimizations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BadErrorMessage Issues related compiler error messages that should be better. compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: All-But-Submitted
Development

No branches or pull requests

8 participants