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

Process hangs when run by vscode #2990

Closed
4 tasks done
mattcarp12 opened this issue Jul 18, 2022 · 9 comments
Closed
4 tasks done

Process hangs when run by vscode #2990

mattcarp12 opened this issue Jul 18, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@mattcarp12
Copy link

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. (https://golangci-lint.run/usage/linters/)

Description of the problem

When running 1.47 with vscode, the process hangs indefinitely. The problem does not occur with 1.46.

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version 1.47.0 built from b4154027 on 2022-07-18T11:32:14Z

Configuration file

None. All defaults.

Go environment

$ go version && go env
1MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/matt/.cache/go-build"
GOENV="/home/matt/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/matt/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/matt/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.4"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/matt/projects/blues/hub/go.mod"
GOWORK=""
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3817079785=/tmp/go-build -gno-record-gcc-switches"

Verbose output of running

Runs fine in terminal. When run in vscode, the optput is `Starting linting the current package at /home/matt/projects/myproj`

Code example or link to a public repository

// add your code here
@mattcarp12 mattcarp12 added the bug Something isn't working label Jul 18, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Jul 18, 2022

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez ldez added question Further information is requested and removed bug Something isn't working labels Jul 18, 2022
@sbueringer
Copy link

Possibly related golangci/golangci-lint-action#519

@ldez ldez added bug Something isn't working and removed question Further information is requested labels Jul 19, 2022
@ldez
Copy link
Member

ldez commented Jul 19, 2022

For now, I think it's maybe related to #2982 but the main problem is to find a way to reproduce the issue in a debugging context.

@aleksandr-orca
Copy link

aleksandr-orca commented Jul 19, 2022

same issue with https://github.com/golangci/golangci-lint-action

Running [/home/runner/golangci-lint-1.47.0-linux-amd64/golangci-lint run --out-format=github-actions --verbose] in [] ... Error: The operation was canceled.

1.47 just hangs when run by Github CI action, 1.46.2 works fine

@sbueringer
Copy link

For now, I think it's maybe related to #2982 but the main problem is to find a way to reproduce the issue in a debugging context.

As I wrote, not sure if it's the same issue. golangci/golangci-lint-action#519 can be reproduced locally with nektos/act (golangci/golangci-lint-action#519 (comment)).

@ldez
Copy link
Member

ldez commented Jul 19, 2022

@aleksandr-orca If you have the same kind of problem, I need:

  • your Go version
  • your configuration
  • a public repo (if possible)

@sbueringer your problem is related to gocritic: #2673 and go-critic/go-critic#1218

@aleksandr-orca
Copy link

aleksandr-orca commented Jul 19, 2022

@ldez

Unfortunately, this is a private repo, but I hope this info could be helpful.

Go Env
  GO111MODULE=""
  GOARCH="amd64"
  GOBIN=""
  GOCACHE="/home/runner/.cache/go-build"
  GOENV="/home/runner/.config/go/env"
  GOEXE=""
  GOEXPERIMENT=""
  GOFLAGS=""
  GOHOSTARCH="amd64"
  GOHOSTOS="linux"
  GOINSECURE=""
  GOMODCACHE="/home/runner/go/pkg/mod"
  GONOPROXY="<repo_path>"
  GONOSUMDB="<repo_path>"
  GOOS="linux"
  GOPATH="/home/runner/go"
  GOPRIVATE="<repo_path>"
  GOPROXY="https://proxy.golang.org/,direct"
  GOROOT="/opt/hostedtoolcache/go/1.18.4/x64"
  GOSUMDB="sum.golang.org"
  GOTMPDIR=""
  GOTOOLDIR="/opt/hostedtoolcache/go/1.18.4/x64/pkg/tool/linux_amd64"
  GOVCS=""
  GOVERSION="go1.18.4"
  GCCGO="gccgo"
  GOAMD64="v1"
  AR="ar"
  CC="gcc"
  CXX="g++"
  CGO_ENABLED="1"
  GOMOD="/dev/null"
  GOWORK=""
  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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1941454383=/tmp/go-build -gno-record-gcc-switches"
Execution logs
-  2022-07-18T19:27:26.3816758Z ##[group]Run golangci/golangci-lint-action@v3
- 2022-07-18T19:27:26.3817011Z with:
- 2022-07-18T19:27:26.3817193Z   args: --verbose
- 2022-07-18T19:27:26.3817386Z   version: latest
- 2022-07-18T19:27:26.3817759Z   github-token: ***
- 2022-07-18T19:27:26.3817969Z   only-new-issues: false
- 2022-07-18T19:27:26.3818185Z   skip-cache: false
- 2022-07-18T19:27:26.3818401Z   skip-pkg-cache: false
- 2022-07-18T19:27:26.3818626Z   skip-build-cache: false
- 2022-07-18T19:27:26.3818835Z env:
- 2022-07-18T19:27:26.3819012Z   GO_VERSION: 1.18
- 2022-07-18T19:27:26.3819233Z   GOPRIVATE: <repo_path>*
- 2022-07-18T19:27:26.3819470Z ##[endgroup]
- 2022-07-18T19:27:26.5545334Z ##[group]prepare environment
- 2022-07-18T19:27:26.5593614Z Finding needed golangci-lint version...
- 2022-07-18T19:27:26.6024725Z Requested golangci-lint 'latest', using 'v1.47.0', calculation took 43ms
- 2022-07-18T19:27:26.6031787Z Installing golangci-lint v1.47.0...
- 2022-07-18T19:27:26.6034071Z Downloading https://github.com/golangci/golangci-lint/releases/download/v1.47.0/golangci-lint-1.47.0-linux-amd64.tar.gz ...
- 2022-07-18T19:27:26.8514904Z [command]/usr/bin/tar xz --overwrite --warning=no-unknown-keyword --overwrite -C /home/runner -f /home/runner/work/_temp/19565bd0-a39b-46ba-8bff-b3676f24db2d
- 2022-07-18T19:27:27.0888979Z Installed golangci-lint into /home/runner/golangci-lint-1.47.0-linux-amd64/golangci-lint in 485ms
- 2022-07-18T19:27:27.7696280Z Received 109051904 of 158773563 (68.7%), 104.0 MBs/sec
- 2022-07-18T19:27:28.3374924Z Received 158773563 of 158773563 (100.0%), 96.6 MBs/sec
- 2022-07-18T19:27:28.3376655Z Cache Size: ~151 MB (158773563 B)
- 2022-07-18T19:27:28.3435005Z [command]/usr/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/9f65444a-db48-425b-9aea-7a1db42a87ae/cache.tzst -P -C /home/runner/work/***
- 2022-07-18T19:27:29.9036945Z Cache restored successfully
- 2022-07-18T19:27:29.9276242Z Restored cache for golangci-lint from key 'golangci-lint.cache-2741-d7bddbfba4e6947a29f034880f3576bd7c6b6911' in 3373ms
- 2022-07-18T19:27:29.9276954Z Prepared env in 3373ms
- 2022-07-18T19:27:29.9277765Z ##[endgroup]
- 2022-07-18T19:27:29.9279585Z ##[group]run golangci-lint
- 2022-07-18T19:27:29.9283775Z Running [/home/runner/golangci-lint-1.47.0-linux-amd64/golangci-lint run --out-format=github-actions --verbose] in [] ...
- 2022-07-19T01:27:15.1117857Z ##[error]The operation was canceled.

@ldez
Copy link
Member

ldez commented Jul 19, 2022

The original problem should be fixed by v1.47.1

@ldez
Copy link
Member

ldez commented Jul 20, 2022

based on this feedback golangci/golangci-lint-action#519 (comment) I think the problem is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants