Go program debug error: NewBulk too big: nbit=20196 count=986153 nword=632 size=623248696

138 views Asked by At

currently using go version go1.20 linux/amd64

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"

I Tried to create a debug build using go build -gcflags="all=-N -l" -o test .

But it is giving me

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

Tried to create a debug build for go service. Wanted to debug the code.

0

There are 0 answers