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

CircleCI 4GB Limit OOM Kills #1012

Closed
3 tasks done
kensipe opened this issue Apr 3, 2020 · 7 comments
Closed
3 tasks done

CircleCI 4GB Limit OOM Kills #1012

kensipe opened this issue Apr 3, 2020 · 7 comments
Labels
topic: memory Huge memory consumption

Comments

@kensipe
Copy link

kensipe commented Apr 3, 2020

Thank you for creating the issue!

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

Our OSS project circleci account is limited to 4GB. A recent bump to golangci-lint v1.24.0 caused our lint tests to consistently fail due to OOM. I switched back to v1.23.8 and all is well. Happy to digger deeper if needed/desired.

CI Config: https://github.com/kudobuilder/kuttl/blob/master/.circleci/config.yml
Uses a docker image:kudobuilder/golang:1.13 which is defined: https://github.com/kudobuilder/kudo/blob/master/build/Dockerfile

Please include the following information:

Version of golangci-lint
$ golangci-lint --version
golangci-lint has version 1.24.0 built from 6fd4383 on 2020-03-15T11:30:52Z
Config file
$ cat .golangci.yml 
linters:
  auto-fix: false
  enable:
    - errcheck
    - goimports
    - golint
    - gosec
    - misspell
    - scopelint
    - unconvert
    - unparam
    - interfacer
    - nakedret
    - gocyclo
    - dupl
    - goconst
    - lll
run:
  skip-dirs:
    # autogenerated clientset by client-gen
    - pkg/client
linters-settings:
  errcheck:
    check-type-assertions: true
  lll:
    line-length: 250
  dupl:
    threshold: 400
  goimports:
    # Don't use 'github.com/kudobuilder/kuttl', it'll result in unreliable output!
    local-prefixes: github.com/kudobuilder
Go environment
$ go version && go env
go version go1.14.1 darwin/amd64
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/kensipe/Library/Caches/go-build"
GOENV="/Users/kensipe/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/kensipe/projects/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.14.1/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.14.1/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/kensipe/projects/go/src/github.com/kudobuilder/kuttl/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/c1/j5vflbys41v_pzh5881sktqr0000gn/T/go-build045035006=/tmp/go-build -gno-record-gcc-switches -fno-common"

To be clear, this is my go env... not the circleci env

Verbose output of running
$ golangci-lint run -v
INFO [config_reader] Config search paths: [./ /Users/kensipe/projects/go/src/github.com/kudobuilder/kuttl /Users/kensipe/projects/go/src/github.com/kudobuilder /Users/kensipe/projects/go/src/github.com /Users/kensipe/projects/go/src /Users/kensipe/projects/go /Users/kensipe/projects /Users/kensipe /Users /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 23 linters: [deadcode dupl errcheck goconst gocyclo goimports golint gosec gosimple govet ineffassign interfacer lll misspell nakedret scopelint staticcheck structcheck typecheck unconvert unparam unused varcheck] 
INFO [lintersdb] Active 23 linters: [deadcode dupl errcheck goconst gocyclo goimports golint gosec gosimple govet ineffassign interfacer lll misspell nakedret scopelint staticcheck structcheck typecheck unconvert unparam unused varcheck] 
INFO [loader] Go packages loading at mode 575 (imports|types_sizes|exports_file|files|name|compiled_files|deps) took 510.482362ms 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 3.496184ms 
INFO [runner/goanalysis_metalinter/goanalysis] analyzers took 0s with no stages 
INFO [runner/unused/goanalysis] analyzers took 0s with no stages 
INFO [runner] Issues before processing: 9, after processing: 0 
INFO [runner] Processors filtering stat (out/in): filename_unadjuster: 9/9, autogenerated_exclude: 9/9, exclude: 1/9, path_prettifier: 9/9, skip_files: 9/9, exclude-rules: 1/1, nolint: 0/1, cgo: 9/9, skip_dirs: 9/9, identifier_marker: 9/9 
INFO [runner] processing took 2.571143ms with stages: nolint: 1.921616ms, exclude: 224.761µs, path_prettifier: 168.998µs, identifier_marker: 139.075µs, autogenerated_exclude: 77.913µs, skip_dirs: 30.989µs, cgo: 3.304µs, filename_unadjuster: 2.148µs, max_same_issues: 498ns, diff: 348ns, max_from_linter: 295ns, uniq_by_line: 273ns, exclude-rules: 189ns, skip_files: 185ns, max_per_file_from_linter: 185ns, path_shortener: 184ns, source_code: 182ns 
INFO [runner] linters took 174.348709ms with stages: goanalysis_metalinter: 170.482311ms, unused: 1.236197ms 
INFO File cache stats: 0 entries of total size 0B 
INFO Memory: 9 samples, avg is 71.8MB, max is 72.8MB 
INFO Execution took 702.069081ms 
@dant24
Copy link

dant24 commented Apr 7, 2020

I assume this is related to #994 since 1.23.8 works for you.

@ernado
Copy link
Member

ernado commented Apr 20, 2020

Oh, unused linter is not enabled? 😿

@ernado ernado added the topic: memory Huge memory consumption label Apr 20, 2020
@ferhatelmas
Copy link
Contributor

@ernado I think it's still relevant.

There is no disable-all but just enable in the config so unused is running but not reporting due to being default on.

@ernado
Copy link
Member

ernado commented Apr 20, 2020

Now I see, thank you @ferhatelmas!

@kensipe can you please add disable-all to your configuration and check if it is related to unused?

@jirfag
Copy link
Member

jirfag commented May 3, 2020

Fixing in #1063

@jirfag
Copy link
Member

jirfag commented May 3, 2020

#1063 was merged,
@kensipe can you please test a version from master branch?

@jeanlucmongrain
Copy link

jeanlucmongrain commented Mar 2, 2021

This task is most likely outdate, this is nearly a year old and I use latest stable release without constant OOM anymore

@SVilgelm SVilgelm closed this as completed Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: memory Huge memory consumption
Projects
None yet
Development

No branches or pull requests

7 participants