Skip to content

gopls: automated issue report (crash) #2319

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

Closed
hujinrun-github opened this issue Jul 5, 2022 · 4 comments
Closed

gopls: automated issue report (crash) #2319

hujinrun-github opened this issue Jul 5, 2022 · 4 comments
Labels
automatedReport Automatically created issues FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@hujinrun-github
Copy link

gopls version: v0.8.4 (go1.17.9)
gopls flags:
update flags: proxy
extension version: 0.34.1
go version: 1.17.9
environment: Visual Studio Code linux
initialization error: undefined
issue timestamp: Tue, 05 Jul 2022 02:54:27 GMT
restart history:
Tue, 05 Jul 2022 02:44:45 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

Please attach the stack trace from the crash.
A window with the error message should have popped up in the lower half of your screen.
Please copy the stack trace and error messages from that window and paste it in this issue.

Failed to auto-collect gopls trace: unrecognized crash pattern.

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.

NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.

<OPTIONAL: ATTACH LOGS HERE>

@gopherbot gopherbot added this to the Untriaged milestone Jul 5, 2022
@hyangah
Copy link
Contributor

hyangah commented Jul 6, 2022

Thanks for the report. Can you please share the log you see in the gopls output channel and tell us when you observed this popup (e.g. I was updating gopls, I just opened the vscode, I did refactoring, ...)?
Screen Shot 2021-01-27 at 2 53 49 PM

@hyangah hyangah added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. automatedReport Automatically created issues labels Jul 6, 2022
@roman-wb
Copy link

@hyangah Hi! I also have this problem

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x11f7d53]

goroutine 13440 [running]:
golang.org/x/tools/internal/xcontext.detachedContext.Value(...)
	/Users/user/go/pkg/mod/golang.org/x/[email protected]/internal/xcontext/xcontext.go:23
golang.org/x/tools/internal/lsp/debug.GetInstance({0x1c740d0?, 0xc0049a0020?})
	/Users/user/go/pkg/mod/golang.org/x/[email protected]/internal/lsp/debug/serve.go:361 +0x3e
golang.org/x/tools/internal/lsp/debug.makeGlobalExporter.func1({0x1c740d0, 0xc0049a0020}, {{0xc0abbe2366d8d6e8, 0x4b04be6aa0, 0x21947e0}, {{{0x1c72e00, 0xc0000c60e0}, 0xa, {0x18c68e0, 0x1a0024b}}, ...}, ...}, ...)
	/Users/user/go/pkg/mod/golang.org/x/[email protected]/internal/lsp/debug/serve.go:571 +0x7e
golang.org/x/tools/internal/event/core.deliver({0x1c740d0, 0xc0049a0020}, 0xc000137d10, {{0xc0abbe2366d8d6e8, 0x4b04be6aa0, 0x21947e0}, {{{0x1c72e00, 0xc0000c60e0}, 0xa, {0x18c68e0, ...}}, ...}, ...})
	/Users/user/go/pkg/mod/golang.org/x/[email protected]/internal/event/core/export.go:45 +0xfd
golang.org/x/tools/internal/event/core.ExportPair({_, _}, {{0x0, 0x0, 0x0}, {{{0x1c72e00, 0xc0000c60e0}, 0xa, {0x18c68e0, 0x1a0024b}}, ...}, ...}, ...)
	/Users/user/go/pkg/mod/golang.org/x/[email protected]/internal/event/core/export.go:68 +0x128
golang.org/x/tools/internal/event.Start({0x1c740d0?, 0xc0049a0020?}, {0x1a0024b?, 0xc0000c69c0?}, {0xc01712cc30?, 0x0?, 0x0?})
	/Users/user/go/pkg/mod/golang.org/x/[email protected]/internal/event/event.go:91 +0x358
golang.org/x/tools/internal/jsonrpc2.(*conn).Notify(0x0?, {0x1c740d0, 0xc0049a0020}, {0x1a0024b, 0xa}, {0x18a9080?, 0xc0000c69c0?})
	/Users/user/go/pkg/mod/golang.org/x/[email protected]/internal/jsonrpc2/conn.go:85 +0x35b
golang.org/x/tools/internal/lsp/protocol.clientConn.Notify(...)
	/Users/user/go/pkg/mod/golang.org/x/[email protected]/internal/lsp/protocol/protocol.go:60
golang.org/x/tools/internal/lsp/protocol.(*clientDispatcher).Progress(0x198ada0?, {0x1c740d0?, 0xc0049a0020?}, 0x231e108?)
	/Users/user/go/pkg/mod/golang.org/x/[email protected]/internal/lsp/protocol/tsclient.go:168 +0x42
golang.org/x/tools/internal/lsp/progress.(*WorkDone).Report(0xc004846370, {0x0?, 0x0?}, {0xc00fce0050, 0x45}, 0x0)
	/Users/user/go/pkg/mod/golang.org/x/[email protected]/internal/lsp/progress/progress.go:188 +0x27e
golang.org/x/tools/internal/lsp/progress.(*WorkDoneWriter).Write(0xc0079941e0?, {0xc00412c000?, 0x45, 0x104d552?})
	/Users/user/go/pkg/mod/golang.org/x/[email protected]/internal/lsp/progress/progress.go:268 +0x5c
io.(*multiWriter).Write(0xc004790048?, {0xc00412c000, 0x45, 0x8000})
	/usr/local/Cellar/go/1.18.3/libexec/src/io/multi.go:60 +0x86
io.copyBuffer({0x1c6d400, 0xc009256a68}, {0x1c6d8a0, 0xc004790048}, {0x0, 0x0, 0x0})
	/usr/local/Cellar/go/1.18.3/libexec/src/io/io.go:428 +0x204
io.Copy(...)
	/usr/local/Cellar/go/1.18.3/libexec/src/io/io.go:385
os/exec.(*Cmd).writerDescriptor.func1()
	/usr/local/Cellar/go/1.18.3/libexec/src/os/exec/exec.go:311 +0x3a
os/exec.(*Cmd).Start.func1(0xc00c588e70?)
	/usr/local/Cellar/go/1.18.3/libexec/src/os/exec/exec.go:444 +0x25
created by os/exec.(*Cmd).Start
	/usr/local/Cellar/go/1.18.3/libexec/src/os/exec/exec.go:443 +0x795
[Info  - 11:23:41 AM] 
[Info  - 11:23:41 AM] 2022/07/13 11:23:41 go env for /Users/user/proj
(root /Users/user/proj)
(go version go version go1.18.4 darwin/amd64)
(valid build configuration = true)
(build flags: [])
GOMODCACHE=/Users/user/go/pkg/mod
GO111MODULE=
GONOPROXY=gitlab.com
GOSUMDB=sum.golang.org
GOPATH=/Users/user/go
GOCACHE=/Users/user/Library/Caches/go-build
GOFLAGS=
GOINSECURE=
GOMOD=/Users/user/proj/go.mod
GOPROXY=https://proxy.golang.org,direct
GOROOT=/usr/local/Cellar/go/1.18.4/libexec
GOWORK=


[Info  - 11:23:44 AM] 2022/07/13 11:23:44 go/packages.Load #1
	snapshot=0
	directory=/Users/user/proj
	query=[builtin gitlab.com/proj/...]
	packages=63

[Info  - 11:23:44 AM] 2022/07/13 11:23:44 go/packages.Load #1: updating metadata for 732 packages

[Info  - 11:23:44 AM] 2022/07/13 11:23:44 discovered missing identifiers: map[memRecordCycle:true pageBits:true]
	package="runtime"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 falling back to safe trimming due to type errors: [/usr/local/Cellar/go/1.18.4/libexec/src/internal/buildcfg/exp.go:24:38: 2-valued (func() (goexperiment.Flags, goexperiment.Flags) literal)() (value of type (goexperiment.Flags, goexperiment.Flags)) where single value is expected] or still-missing identifiers: map[]
	package="internal/buildcfg"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 falling back to safe trimming due to type errors: [/usr/local/Cellar/go/1.18.4/libexec/src/os/user/cgo_lookup_unix.go:195:19: int not declared by package C /usr/local/Cellar/go/1.18.4/libexec/src/os/user/cgo_lookup_unix.go:198:27: cannot convert C._SC_GETPW_R_SIZE_MAX (untyped int constant 71) to bufferKind /usr/local/Cellar/go/1.18.4/libexec/src/os/user/cgo_lookup_unix.go:199:27: cannot convert C._SC_GETGR_R_SIZE_MAX (untyped int constant 70) to bufferKind] or still-missing identifiers: map[]
	package="os/user"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[options:true]
	package="golang.org/x/text/unicode/bidi"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[options:true]
	package="vendor/golang.org/x/text/unicode/bidi"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[cardinality:true kind:true syntax:true value:true]
	package="google.golang.org/protobuf/reflect/protoreflect"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[unknownFieldsA:true]
	package="google.golang.org/protobuf/internal/impl"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[ipChecker:true]
	package="github.com/labstack/echo/v4"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[netIPSocketLine:true]
	package="github.com/prometheus/procfs"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[yaml_style_t:true]
	package="gopkg.in/yaml.v2"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[options:true]
	package="github.com/grpc-ecosystem/go-grpc-middleware/tags"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[options:true]
	package="github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[matcher:true]
	package="golang.org/x/text/language"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[yaml_style_t:true]
	package="gopkg.in/yaml.v3"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[pguint32:true]
	package="github.com/jackc/pgtype"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[clientOptions:true mwOptions:true]
	package="github.com/opentracing-contrib/go-stdlib/nethttp"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[connector:true]
	package="github.com/jackc/pgx/v4/stdlib"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[decoderOptions:true encoderOptions:true]
	package="github.com/klauspost/compress/zstd"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[hashPartitioner:true]
	package="github.com/Shopify/sarama"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[message:true]
	package="internal/profile"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[options:true]
	package="gitlab.com/lib/go/pkg/db/opentracing"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[options:true]
	package="github.com/go-openapi/loads"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[entity:true]
	package="gitlab.com/lib/go/pkg/application"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[logger:true]
	package="github.com/go-kit/log/level"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[dialerOpts:true listenerOpts:true]
	package="github.com/mwitkow/go-conntrack"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[httpClientOptions:true]
	package="github.com/prometheus/common/config"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[indexEntry:true]
	package="github.com/prometheus/prometheus/tsdb"

[Error - 11:23:45 AM] 2022/07/13 11:23:45 unable to compute positions for type errors: no parsed file for  in gitlab.com/proj/internal/pkg/mocks
	package="gitlab.com/proj/internal/pkg/mocks"

[Info  - 11:23:45 AM] 2022/07/13 11:23:45 discovered missing identifiers: map[term:true]
	package="go/types"

[Error - 11:23:47 AM] 2022/07/13 11:23:47 unable to compute positions for type errors: no parsed file for  in gitlab.com/proj/internal/pkg/mocks
	package="gitlab.com/proj/internal/pkg/mocks"

[Info  - 11:24:15 AM] 2022/07/13 11:24:15 background imports cache refresh starting

@VishwasShashidhar
Copy link

Hello, I'm facing the same issue:

[Info  - 6:13:00 PM] 2022/07/22 18:13:00 go env for /Users/vishwas/Code/Colleago/colleago-next-backend
(root /Users/vishwas/Code/Colleago/colleago-next-backend)
(go version go version go1.18.4 darwin/arm64)
(valid build configuration = true)
(build flags: [])
GOMOD=/Users/vishwas/Code/Colleago/colleago-next-backend/go.mod
GOWORK=
GO111MODULE=
GONOPROXY=github.com/adwitiyaio/*
GOPROXY=https://proxy.golang.org,direct
GOCACHE=/Users/vishwas/Library/Caches/go-build
GOMODCACHE=/Users/vishwas/go/pkg/mod
GOPRIVATE=github.com/adwitiyaio/*
GOFLAGS=
GONOSUMDB=github.com/adwitiyaio/*
GOPATH=/Users/vishwas/go
GOINSECURE=
GOROOT=/usr/local/go
GOSUMDB=sum.golang.org


[Info  - 6:13:01 PM] 2022/07/22 18:13:01 go/packages.Load #1
	snapshot=0
	directory=/Users/vishwas/Code/Colleago/colleago-next-backend
	query=[builtin github.com/adwitiyaio/colleago-next-backend/...]
	packages=93

[Info  - 6:13:01 PM] 2022/07/22 18:13:01 go/packages.Load #1: updating metadata for 672 packages

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[memRecordCycle:true pageBits:true]
	package="runtime"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[cardinality:true kind:true syntax:true value:true]
	package="google.golang.org/protobuf/reflect/protoreflect"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[options:true]
	package="golang.org/x/text/unicode/bidi"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[options:true]
	package="vendor/golang.org/x/text/unicode/bidi"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 falling back to safe trimming due to type errors: [/usr/local/go/src/os/user/cgo_lookup_unix.go:195:19: int not declared by package C /usr/local/go/src/os/user/cgo_lookup_unix.go:198:27: cannot convert C._SC_GETPW_R_SIZE_MAX (untyped int constant 71) to bufferKind /usr/local/go/src/os/user/cgo_lookup_unix.go:199:27: cannot convert C._SC_GETGR_R_SIZE_MAX (untyped int constant 70) to bufferKind] or still-missing identifiers: map[]
	package="os/user"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[parser:true]
	package="golang.org/x/net/html"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[recordOptions:true]
	package="go.opencensus.io/stats"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[defaultKey:true endpointKey:true region:true service:true]
	package="github.com/aws/aws-sdk-go/aws/endpoints"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[matcher:true]
	package="golang.org/x/text/language"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[file:true part:true]
	package="gopkg.in/gomail.v2"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[pguint32:true]
	package="github.com/jackc/pgtype"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[unknownFieldsA:true]
	package="google.golang.org/protobuf/internal/impl"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[ipChecker:true]
	package="github.com/labstack/echo/v4"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[credentialValueProvider:true]
	package="github.com/aws/aws-sdk-go/aws/signer/v4"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[connector:true]
	package="github.com/jackc/pgx/v4/stdlib"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[options:true]
	package="golang.org/x/text/message"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[encoder:true]
	package="image/png"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[yaml_style_t:true]
	package="gopkg.in/yaml.v3"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 falling back to safe trimming due to type errors: [/usr/local/go/src/internal/buildcfg/exp.go:24:38: 2-valued (func() (goexperiment.Flags, goexperiment.Flags) literal)() (value of type (goexperiment.Flags, goexperiment.Flags)) where single value is expected] or still-missing identifiers: map[]
	package="internal/buildcfg"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[yaml_style_t:true]
	package="gopkg.in/yaml.v2"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[metricRule:true segmentRule:true]
	package="github.com/newrelic/go-agent/v3/internal"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[agentAttributeValue:true tracedError:true txnError:true]
	package="github.com/newrelic/go-agent/v3/newrelic"

[Info  - 6:13:02 PM] 2022/07/22 18:13:02 discovered missing identifiers: map[term:true]
	package="go/types"

[Info  - 6:13:58 PM] 2022/07/22 18:13:58 background imports cache refresh starting

[Info  - 6:13:59 PM] 2022/07/22 18:13:59 background refresh finished after 1.192919833s

@hyangah
Copy link
Contributor

hyangah commented Jul 28, 2022

Thanks @hujinrun-github
I believe the issue is fixed in the latest gopls version (v0.9.1). See golang/go#53781

@VishwasShashidhar I don't see any crash in the log. If you encounter the same issue, please open a new issue so we can investigate. Thanks!

@hyangah hyangah closed this as completed Jul 28, 2022
@golang golang locked and limited conversation to collaborators Jul 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automatedReport Automatically created issues FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants