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: NewBulk too big: nbit=20196 count=986153 nword=632 size=623248696 #61690

Closed
hammertime1308 opened this issue Aug 1, 2023 · 5 comments
Labels
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. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@hammertime1308
Copy link

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

$ go version
go version go1.20 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mandark/.cache/go-build"
GOENV="/home/mandark/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/mandark/go/pkg/mod"
GONOPROXY="gitlab.com"
GONOSUMDB="gitlab.com"
GOOS="linux"
GOPATH="/home/mandark/go"
GOPRIVATE="gitlab.com"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/mandark/sdk/go1.20"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/mandark/sdk/go1.20/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/mandark/go/src/gitlab.com/shaadi/profile-api/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 -fdebug-prefix-map=/tmp/go-build3971895452=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Tried to debug the golang code by creating a binary using

go build -gcflags="all=-N -l" -o test . 

What did you expect to see?

Creation of debug binary

What did you see instead?

# gitlab.com/xyz/repo/pkg/profile
../../pkg/profile/state_mapping.go:8:5: internal compiler error: NewBulk too big: nbit=20196 count=986153 nword=632 size=623248696

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

Checked the file, originally it contained static mapping, but after removing all the mappings and making it empty it is showing the same error.

Modified file contents:

package profile

type CountryData struct {
	Country     string
	CountryCode string
}

var StateMapping = map[string][]CountryData{}

Still giving internal compiler error: NewBulk too big error message when tried to debug the build.

@hammertime1308 hammertime1308 changed the title affected/package: NewBulk too big: nbit=20196 count=986153 nword=632 size=623248696 Aug 1, 2023
@seankhliao seankhliao changed the title NewBulk too big: nbit=20196 count=986153 nword=632 size=623248696 cmd/compile: NewBulk too big: nbit=20196 count=986153 nword=632 size=623248696 Aug 1, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Aug 1, 2023
@seankhliao
Copy link
Member

cc @golang/compiler

@seankhliao seankhliao added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 1, 2023
@ianlancetaylor
Copy link
Contributor

Is there a way that we can reproduce the problem ourselves? Thanks.

@hammertime1308
Copy link
Author

@ianlancetaylor , I do not think so, as the code base is private and contains multiple static mappings. This is present in a feature branch and after removing the static map it starts giving this issue on other lines which are already there in main branch and debugging is working on the main branch.

@randall77
Copy link
Contributor

This error is the compiler saying "this function is to big for me to compile".
Normally we see this with large map literals, as those compile down to a lot of code. But if you removed the large map literals, there must be something else really large in your code base.

@mknyszek mknyszek added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 2, 2023
@mknyszek mknyszek added this to the Backlog milestone Aug 2, 2023
@gopherbot
Copy link
Contributor

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.)

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. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

6 participants