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

Gettiing OOM with golang 1.20 (6.1.9 linux) #3538

Closed
4 tasks done
chmouel opened this issue Feb 2, 2023 · 4 comments
Closed
4 tasks done

Gettiing OOM with golang 1.20 (6.1.9 linux) #3538

chmouel opened this issue Feb 2, 2023 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@chmouel
Copy link

chmouel commented Feb 2, 2023

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

I am not sure on which linter cause the issue but i am getting a OOM when running on golang1.20 (updated this morning). The

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version 1.50.1 built from 8926a95f on 2022-10-22T10:50:47Z

Configuration file

$ cat .golangci.yml
run:
  build-tags:
    - e2e
  skip-dirs:
    - vendor
linters-settings:
  gocritic:
    disabled-checks:
      - unlambda
  errcheck:
    exclude: .errcheck.txt
  gofumpt:
    extra-rules: true
linters:
  enable:
    - asciicheck
    - bodyclose
    - depguard
    - dogsled
    - durationcheck
    - exhaustive
    - exportloopref
    - forbidigo
    - forcetypeassert
    - gochecknoinits
    - dupl
    - errcheck
    - errorlint
    - gofumpt
    - goimports
    - gosec
    - gocritic
    - misspell
    - gosec
    - gosimple
    - govet
    - importas
    - makezero
    - nakedret
    - predeclared
    - revive
    - staticcheck
    - stylecheck
    - unused
    - unparam
    - gochecknoinits
      # - goconst
      # - gocyclo
    # - goerr113
    # - gofmt
    - goheader
    - gomodguard
    - goprintffuncname
    - nilerr
    - noctx
      # - nolintlint (gofumpt conflict with it, create space all the time so :shrug:)
    - prealloc
    - promlinter
    # - rowserrcheck
    # - sqlclosecheck
    - tparallel
    #- unconvert
    # - wastedassign
    - whitespace

Go environment

$ go version && go env
go version go1.20 linux/amd64

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
INFO [config_reader] Config search paths: [./ /home/chmouel/GIT/go/src/github.com/openshift-pipelines/pipelines-as-code /home/chmouel/GIT/go/src/github.com/openshift-pipelines /home/chmouel/GIT/go/src/github.com /home/chmouel/GIT/go/src /home/chmouel/GIT/go /home/chmouel/GIT /home/chmouel /home /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 40 linters: [asciicheck bodyclose depguard dogsled dupl durationcheck errcheck errorlint exhaustive exportloopref forbidigo forcetypeassert gochecknoinits gocritic gofumpt goheader goimports gomodguard goprintffuncname gosec gosimple govet importas ineffassign makezero misspell nakedret nilerr noctx prealloc predeclared promlinter revive staticcheck stylecheck tparallel typecheck unparam unused whitespace] 
INFO [loader] Using build tags: [e2e]             
INFO [loader] Go packages loading at mode 575 (files|name|imports|types_sizes|compiled_files|deps|exports_file) took 1.208595798s 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 22.931017ms 
INFO [linters_context] importas settings found, but no aliases listed. List aliases under alias: key.
[killed process by oom killer]
``

</details>

### Code example or link to a public repository

<details>


not sure which code loop and grow in memory but that's the public repo https://github.com/openshift-pipelines/pipelines-as-code
```go
// add your code here
@chmouel chmouel added the bug Something isn't working label Feb 2, 2023
@ldez
Copy link
Member

ldez commented Feb 2, 2023

duplicate of #3536,#3535,#3533,#3470

@ldez ldez closed this as completed Feb 2, 2023
@ldez ldez added duplicate This issue or pull request already exists and removed bug Something isn't working labels Feb 2, 2023
@ldez ldez mentioned this issue Feb 2, 2023
4 tasks
@ajanata
Copy link

ajanata commented Feb 2, 2023

duplicate of #3536,#3535,#3533,#3470

All of those duplicate issues are closed, however I am still experiencing this problem. Which issue is the active issue for tracking this?

@ldez
Copy link
Member

ldez commented Feb 2, 2023

As I wrote in the issues the problem has been fixed in #3414.

  • golangci-lint <=v1.50.x is not compatible with go1.20.
  • The latest release of golangci-lint (v1.51.0) is the first release compatible with go1.20.

https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md#v1510

@chmouel
Copy link
Author

chmouel commented Feb 2, 2023

confirmed as fixed for me thanks @ldez !

@ldez ldez mentioned this issue Feb 5, 2023
4 tasks
MichelHollands added a commit to grafana/loki that referenced this issue Feb 22, 2023
**What this PR does / why we need it**:

Golangci-lint [1.50.0
OOMs](golangci/golangci-lint#3538 (comment))
when used with go 1.20.1. This also updates the build image.

**Checklist**
- [ ] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [ ] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`

---------

Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
Co-authored-by: Christian Haudum <christian.haudum@gmail.com>
DylanGuedes pushed a commit to grafana/loki that referenced this issue Feb 24, 2023
**What this PR does / why we need it**:

Golangci-lint [1.50.0
OOMs](golangci/golangci-lint#3538 (comment))
when used with go 1.20.1. This also updates the build image.

**Checklist**
- [ ] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [ ] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`

---------

Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
Co-authored-by: Christian Haudum <christian.haudum@gmail.com>
(cherry picked from commit 6dfae7c)
spdk-bot pushed a commit to spdk/spdk-csi that referenced this issue May 8, 2023
- Upgrade golangci-lint to version 1.52.2 to address OOM issues
(golangci/golangci-lint#3538)
- Fix issues detected by the new version of golangci-lint

Signed-off-by: Xin Yang <Xin.Yang@arm.com>
Change-Id: I489d7d7b7b3c7b44e4566bee16a3ed5a2a990aef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk-csi/+/17968
Reviewed-by: Yibo Cai <yibo.cai@arm.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Antti Kervinen <antti.kervinen@intel.com>
Reviewed-by: Jing Yan <jing1.yan@intel.com>
FrankYang0529 added a commit to FrankYang0529/seeder that referenced this issue Jan 3, 2024
Ref: golangci/golangci-lint#3538 (comment)

Signed-off-by: PoAn Yang <poan.yang@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants