Closed feketegy closed 1 month ago
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.
+1 Got stuck with never ending raise of memory. Killed it, but realised later I got a dangling process ending up filling the swap up to 32GB! Maybe an issue with the go version, I'm using 1.23, is it compatible ?
If you are facing the same problem, the best way to contribute is to provide the following information:
A code example or link to a public repository.
golangci-lint --version
cat .golangci.yml
go version && go env
golangci-lint cache clean
golangci-lint run -v
You can also read the following issues: #5012, #4989, #4933, #4909, #4908, #4932 Related to #4837
@ldez Unfortunately I can't post a code sample because I cannot pinpoint exactly where the problem is happening in my code base. The rest of the requirements for opening the issue is all there.
@feketegy my message was mainly for @benoitgravitee.
Can you provide the information about the image you are using?
Can you provide the information about the image you are using?
Sure, it's the basic arm64v8/golang:1.23.1-alpine3.20
Docker image. This is my Dockerfile, I removed some of the project code commands for obvious reasons.
I hope this helps.
FROM arm64v8/golang:1.23.1-alpine3.20 AS base
RUN apk update \
&& apk add make \
&& apk add git \
&& apk add mercurial \
&& apk add bash \
&& apk add curl \
&& apk add musl-dev \
&& apk add vips-dev \
&& apk add gcc
FROM base AS api
ENV GOPATH /go
ENV GOBIN /go/bin
ENV PATH "$PATH:$GOPATH/bin"
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0 \
&& go install github.com/matryer/moq@latest \
&& go install github.com/cespare/reflex@latest
we saw usage of +30GB memory and a stuck process when enable gosimple linter in Go 1.23.1. With Go 1.22.5 we didn't have that issue
@Mexx77 If you are facing the same problem, the best way to contribute is to provide the following information:
A code example or link to a public repository.
golangci-lint --version
cat .golangci.yml
go version && go env
golangci-lint cache clean
golangci-lint run -v
You can read the following documentation: https://golangci-lint.run/welcome/faq/#which-go-versions-are-supported You can also read the following issues: #5012, #4989, #4933, #4909, #4908, #4932 Related to #4837
I don't have a mac or arm64 computer, so I adapted the Dockerfile for Linux/amd64 and run it on golangci-lint code.
I see no unexpected memory usage.
I think to different context that could lead to extra memory consumption:
go mod tidy
before running golangci-lint
Welcome
typecheck
section of the FAQ.Description of the problem
I can't pinpoint the exact code block that produces 23GB memory usage on macOS running the linter inside Docker in an Alpine Linux 3.20 container, but I don't think this is normal.
Version of golangci-lint
Configuration
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
Validation
Supporter