Closed PatricioPoncini closed 2 months ago
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.
Myself (v1.59.1) and my colleague (v1.60.1) are also experiencing this
Running top while running golangci-lint shows the memory usage consistently increasing until being killed by OOM or freezing the VM
Hey,
We experience the same weird behaviour since upgrading to go 1.23.0
when using golangci-lint
.
On our pipeline we observed significant increase in golangci-lint
run time which eventually ends in the process getting killed: https://github.com/bank-vaults/secret-init/actions/runs/10492750198/job/29065017771?pr=227
Locally sometimes you get a successful run.
Just tested and it seems somehow linked to go 1.23.0
as stated by @csatib02.
The following was tested on the same project with the same configuration in .golangci.yml
Both tests executed using with v1.59.1
of golangci-lint
.
$ go version
go version go1.22.6 linux/amd64
$ golangci-lint run --config .golangci.yml -v
INFO golangci-lint has version v1.59.1 built with go1.22.3 from (unknown, modified: ?, mod sum: "h1:CRRLu1JbhK5avLABFJ/OHVSQ0Ie5c4ulsOId1h3TTks=") on (unknown)
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 15 linters: [dupl errcheck goconst gocyclo gofmt goimports gosimple govet ineffassign lll nakedret revive staticcheck unparam unused]
INFO [loader] Go packages loading at mode 575 (compiled_files|exports_file|files|types_sizes|deps|imports|name) took 25.154011554s
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 3.87889ms
INFO [linters_context/goanalysis] analyzers took 36.756887911s with top 10 stages: buildir: 24.902759377s, the_only_name: 2.22069428s, inspect: 1.265404249s, fact_deprecated: 1.147784383s, ctrlflow: 965.664364ms, printf: 933.598201ms, fact_purity: 840.371699ms, nilness: 717.932495ms, typedness: 697.868938ms, SA5012: 504.593487ms
INFO [runner] Issues before processing: 18, after processing: 0
INFO [runner] Processors filtering stat (out/in): skip_dirs: 18/18, cgo: 18/18, path_prettifier: 18/18, autogenerated_exclude: 18/18, exclude: 18/18, identifier_marker: 18/18, exclude-rules: 4/18, nolint: 0/4, filename_unadjuster: 18/18, skip_files: 18/18, invalid_issue: 18/18
INFO [runner] processing took 5.673253ms with stages: nolint: 4.565837ms, exclude-rules: 266.95µs, path_prettifier: 265.448µs, autogenerated_exclude: 258.232µs, identifier_marker: 238.386µs, skip_dirs: 51.066µs, cgo: 16.581µs, max_same_issues: 2.235µs, invalid_issue: 2.164µs, filename_unadjuster: 1.684µs, uniq_by_line: 1.273µs, fixer: 702ns, diff: 531ns, exclude: 461ns, source_code: 461ns, skip_files: 321ns, sort_results: 280ns, max_from_linter: 241ns, max_per_file_from_linter: 140ns, path_shortener: 90ns, path_prefixer: 90ns, severity-rules: 80ns
INFO [runner] linters took 7.609912344s with stages: goanalysis_metalinter: 7.604065889s
INFO File cache stats: 0 entries of total size 0B
INFO Memory: 329 samples, avg is 148.5MB, max is 823.0MB
INFO Execution took 32.786907868s
$ go version
go version go1.23.0 linux/amd64
$ golangci-lint run --config .golangci.yml -v
INFO golangci-lint has version v1.59.1 built with go1.23.0 from (unknown, modified: ?, mod sum: "h1:CRRLu1JbhK5avLABFJ/OHVSQ0Ie5c4ulsOId1h3TTks=") on (unknown)
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 15 linters: [dupl errcheck goconst gocyclo gofmt goimports gosimple govet ineffassign lll nakedret revive staticcheck unparam unused]
INFO [loader] Go packages loading at mode 575 (imports|exports_file|deps|files|name|types_sizes|compiled_files) took 393.545963ms
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 4.620283ms
Killed
EDIT: After running more tests, as soon as you update the golangci-lint
version to v1.60.1
or later the problem is solved when using go v1.23.0
Related to #4837
Duplicate of #4909, #4908, #4932
Welcome
typecheck
section of the FAQ.Description of the problem
Hi, for some reason, updating the golint version is causing my PC to crash. Essentially, the PC freezes and I can do nothing but restart it. I have tried this multiple times, and the result is always the same: either the PC crashes or the process is canceled and dies. I have updated the library, golang, and cleared the cache. I don't know what else could be causing this problem. Has anyone else experienced this?
Version of golangci-lint
Configuration
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
Validation
Supporter