Skip to content

Under go 1.23, golangci-lint uses all available memory #4909

Closed
@jaevans

Description

@jaevans

Welcome

  • Yes, I'm using a binary release within 2 latest releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've read the typecheck section of the FAQ.
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.).
  • I agree to follow this project's Code of Conduct

Description of the problem

Updating the toolchain line to 1.23.0 in go.mod causes the linter to run out of memory. I've duplicated this on both linux x86_64 and darwin arm64. I haven't yet identified which linter is causing the problem, but it's one of the default set

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version 1.59.1 built with go1.22.4 from 1a55854 on 2024-06-08T22:05:49Z

Configuration

No configuration file or command line arguments passed.

Go environment

$ go version && go env
go version go1.23.0 darwin/arm64
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/jaevans/Library/Caches/go-build'
GOENV='/Users/jaevans/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/jaevans/go/pkg/mod'
GONOPROXY='gitlab.sicura.dev/*'
GONOSUMDB='gitlab.sicura.dev/*'
GOOS='darwin'
GOPATH='/Users/jaevans/go'
GOPRIVATE='gitlab.sicura.dev/*'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/jaevans/go/pkg/mod/golang.org/[email protected]'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/jaevans/go/pkg/mod/golang.org/[email protected]/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.23.0'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/jaevans/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/jaevans/git/test-app/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/f3/1lg41dsx5cqc1vnt1x37x6_40000gn/T/go-build785670845=/tmp/go-build -gno-record-gcc-switches -fno-common'

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
INFO golangci-lint has version 1.59.1 built with go1.22.4 from 1a55854 on 2024-06-08T22:05:49Z
INFO [config_reader] Config search paths: [./ /Users/jaevans/git/test-appller /Users/jaevans/git/saas /Users/jaevans/git /Users/jaevans /Users /]
INFO [lintersdb] Active 6 linters: [errcheck gosimple govet ineffassign staticcheck unused]
INFO [loader] Go packages loading at mode 575 (imports|name|types_sizes|compiled_files|deps|exports_file|files) took 428.207ms
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 1.086542ms
^C (after memory usage grew above 32Gig

A minimal reproducible example or link to a public repository

semvertool (golangci-lint-issue branch)

Validation

  • Yes, I've included all information above (version, config, etc.).

Supporter

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions