Skip to content

Excessive memory usage #3565

Closed
upbound/build
#226
@andig

Description

@andig

Welcome

  • Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc.).
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.). (https://golangci-lint.run/usage/linters/)

Description of the problem

After upgrading to Go1.20 and linter 1.51 I'm no longer able to complete linting:

golangci-lint run -v
INFO [config_reader] Config search paths: [./ /Users/andig/htdocs/evcc /Users/andig/htdocs /Users/andig /Users /]
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 7 linters: [errcheck gosimple govet ineffassign staticcheck typecheck unused]
INFO [loader] Go packages loading at mode 575 (deps|exports_file|types_sizes|compiled_files|imports|name|files) took 1.386105083s
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 27.571125ms
INFO Memory: 251 samples, avg is 37174.6MB, max is 58915.1MB
INFO Execution took 1m0.028549834s
^C

at this point the whole machine (M1 mac, 16GB) comes to a screeching halt.

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version 1.51.0 built from 6d3f06c on 2023-02-02T08:18:45Z

Configuration file

$ cat .golangci.yml
run:
  go: 1.18
issues:
  exclude:
    - .regActualCurrent. is unused
    - "`routeLogger` is unused"
linters-settings:
  staticcheck:
    checks:
      - "-SA1019"

Go environment

$ go version && go env
go version go1.20 darwin/arm64
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/andig/Library/Caches/go-build"
GOENV="/Users/andig/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/andig/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/andig/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.20"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/andig/htdocs/evcc/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 -fdebug-prefix-map=/var/folders/sv/rs_453y57xj86xsbz3kw1mbc0000gn/T/go-build3753112973=/tmp/go-build -gno-record-gcc-switches -fno-common"

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
golangci-lint run -v
INFO [config_reader] Config search paths: [./ /Users/andig/htdocs/evcc /Users/andig/htdocs /Users/andig /Users /]
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 7 linters: [errcheck gosimple govet ineffassign staticcheck typecheck unused]
INFO [loader] Go packages loading at mode 575 (compiled_files|files|name|deps|exports_file|imports|types_sizes) took 831.370125ms
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 21.327125ms
^C

Killed at 4GB memory and 200% cpu.

Code example or link to a public repository

https://github.com/evcc-io/evcc

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions