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

x/tools/gopls: "internal error converting diagnostic" (bug reported by telemetry) #64547

Open
adonovan opened this issue Dec 5, 2023 · 24 comments
Assignees
Labels
gopls/telemetry-wins gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@adonovan
Copy link
Member

adonovan commented Dec 5, 2023

This stack o6rQWQ was reported by telemetry:

cache.(*action).exec.func3:3 is :

		Report: func(d analysis.Diagnostic) {
			diagnostic, err := toGobDiagnostic(posToLocation, analyzer, d)
			if err != nil {
				bug.Reportf("internal error converting diagnostic from analyzer %q: %v", analyzer.Name, err)
				return
			}
			diagnostics = append(diagnostics, diagnostic)
		},

Variant stacks from cgocall analyzer: t5Iynw, anAjSQ, WNmwJA, lkeNLw, 1ZKXaA, iv8Nzg, 99HJig, o9Ch_g.

gopls/bug
golang.org/x/tools/gopls/internal/bug.report:35
golang.org/x/tools/gopls/internal/bug.Reportf:1
golang.org/x/tools/gopls/internal/lsp/cache.(*action).exec.func3:3
golang.org/x/tools/go/analysis.(*Pass).ReportRangef:2
golang.org/x/tools/go/analysis/passes/lostcancel.runFunc:108
golang.org/x/tools/go/analysis/passes/lostcancel.run.func1:1
golang.org/x/tools/go/ast/inspector.(*Inspector).Preorder:11
golang.org/x/tools/go/analysis/passes/lostcancel.run:12
golang.org/x/tools/gopls/internal/lsp/cache.(*action).exec.func6:31
golang.org/x/tools/gopls/internal/lsp/cache.(*action).exec:177
golang.org/x/tools/gopls/internal/lsp/cache.execActions.func1.1:2
sync.(*Once).doSlow:5
sync.(*Once).Do:?65
golang.org/x/tools/gopls/internal/lsp/cache.execActions.func1:2
runtime.goexit:0
golang.org/x/tools/gopls@v0.14.2 go1.21.3 darwin/amd64 (1)

Errors from toGobDiagnostic must come from posToLocation, which can fail if a token.Pos from the analyzer (in this case, a valid ReturnStmt in lostcancel) either doesn't belong to the FileSet or is invalid per safetoken.Offset. I suspect this is another case of AST fixing making offsets invalid.

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

Dups:

This stack 6NklUg was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/bug.report:35
golang.org/x/tools/gopls/internal/bug.Reportf:1
golang.org/x/tools/gopls/internal/lsp/cache.(*action).exec.func3:3
golang.org/x/tools/go/analysis.(*Pass).Reportf:2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:28
go/ast.inspector.Visit:1
go/ast.Walk:1
go/ast.walkExprList:?26
go/ast.Walk:167
go/ast.Walk:188
go/ast.walkStmtList:?32
go/ast.Walk:184
go/ast.Walk:307
go/ast.walkDeclList:?38
go/ast.Walk:316
go/ast.Inspect:?397
golang.org/x/tools/gopls@v0.14.2 go1.21.1 darwin/arm64 vscode (4)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

This stack pDy33Q was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/bug.report:35
golang.org/x/tools/gopls/internal/bug.Errorf:2
golang.org/x/tools/gopls/internal/lsp/cache.(*action).exec.func2:11
golang.org/x/tools/gopls/internal/lsp/cache.toGobDiagnostic:32
golang.org/x/tools/gopls/internal/lsp/cache.(*action).exec.func3:1
golang.org/x/tools/go/analysis.(*Pass).Reportf:2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:28
go/ast.inspector.Visit:1
go/ast.Walk:1
go/ast.walkExprList:?26
go/ast.Walk:167
go/ast.Walk:188
go/ast.walkStmtList:?32
go/ast.Walk:184
go/ast.Walk:307
go/ast.walkDeclList:?38
golang.org/x/tools/gopls@v0.14.2 go1.21.1 darwin/arm64 vscode (4)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

This stack WQ0V3g was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+4
golang.org/x/tools/gopls/internal/analysis/noresultvalues.run.func1:+25
golang.org/x/tools/go/ast/inspector.(*Inspector).Preorder:+11
golang.org/x/tools/gopls/internal/analysis/noresultvalues.run:+7
golang.org/x/tools/gopls/internal/cache.(*action).exec.func6:+31
golang.org/x/tools/gopls/internal/cache.(*action).exec:+193
golang.org/x/tools/gopls/internal/cache.execActions.func1.1:+2
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.execActions.func1:+2
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.1 go1.21.3 linux/amd64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

This stack HGXlMQ was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+4
honnef.co/go/tools/analysis/report.Report:+25
honnef.co/go/tools/staticcheck.CheckTypedNilInterface:+100
golang.org/x/tools/gopls/internal/cache.(*action).exec.func6:+31
golang.org/x/tools/gopls/internal/cache.(*action).exec:+193
golang.org/x/tools/gopls/internal/cache.execActions.func1.1:+2
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.execActions.func1:+2
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.1 go1.22.0 darwin/arm64 other,vscode-insiders (3)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

Dup: qaVg3w Eqzixw HRixng g_9bVA 3BjAWg 5rID1Q J_xyOQ nkqhZw DD7DZw KXNLJA aabnaw xEGAsg V5I6ag AjGTng y5Uv9w nJQxXw

@adonovan adonovan added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. gopls/telemetry-wins labels Dec 5, 2023
@gopherbot gopherbot added this to the Unreleased milestone Dec 5, 2023
@hyangah hyangah modified the milestones: Unreleased, gopls/v0.15.0 Dec 7, 2023
@adonovan
Copy link
Member Author

adonovan commented Dec 26, 2023

All these stacks appear to come from the cgocall analyzer. I suspect it is special because of cgo's use of //line directives, which cause the apparent file offsets not to match the actual file size.

@findleyr findleyr self-assigned this Jan 18, 2024
@gopherbot
Copy link

Change https://go.dev/cl/556815 mentions this issue: gopls/internal/lsp/cache: fix bug reports from toGobDiagnostics

@adonovan
Copy link
Member Author

adonovan commented Mar 7, 2024

Reopening due to field report in v0.15.1, after the supposed fix in CL https://go.dev/cl/556815:

This stack WQ0V3g was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+4
golang.org/x/tools/gopls/internal/analysis/noresultvalues.run.func1:+25
golang.org/x/tools/go/ast/inspector.(*Inspector).Preorder:+11
golang.org/x/tools/gopls/internal/analysis/noresultvalues.run:+7
golang.org/x/tools/gopls/internal/cache.(*action).exec.func6:+31
golang.org/x/tools/gopls/internal/cache.(*action).exec:+193
golang.org/x/tools/gopls/internal/cache.execActions.func1.1:+2
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.execActions.func1:+2
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.1 go1.21.3 linux/amd64 vscode (1)

@adonovan adonovan reopened this Mar 7, 2024
@adonovan adonovan self-assigned this Mar 7, 2024
@adonovan adonovan modified the milestones: gopls/v0.15.0, gopls/v0.16.0 Mar 7, 2024
@gopherbot
Copy link

Change https://go.dev/cl/569935 mentions this issue: gopls/internal/cache: add assertions for telemetry crash

gopherbot pushed a commit to golang/tools that referenced this issue Mar 8, 2024
Updates golang/go#64547

Change-Id: I35b2477b8f6182bf6774095f18726104227a2fcd
Reviewed-on: https://go-review.googlesource.com/c/tools/+/569935
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
@gopherbot
Copy link

Change https://go.dev/cl/569880 mentions this issue: [gopls-release-branch.0.15] gopls/internal/cache: add assertions for telemetry crash

gopherbot pushed a commit to golang/tools that referenced this issue Mar 8, 2024
…telemetry crash

Updates golang/go#64547

Change-Id: I35b2477b8f6182bf6774095f18726104227a2fcd
Reviewed-on: https://go-review.googlesource.com/c/tools/+/569935
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
(cherry picked from commit 31f056a)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/569880
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
@adonovan
Copy link
Member Author

adonovan commented Mar 8, 2024

This stack qaVg3w was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*action).exec.func2:+15
golang.org/x/tools/gopls/internal/cache.toGobDiagnostic:+22
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+1
honnef.co/go/tools/analysis/report.Report:+25
honnef.co/go/tools/staticcheck.CheckTypedNilInterface:+100
golang.org/x/tools/gopls/internal/cache.(*action).exec.func6:+31
golang.org/x/tools/gopls/internal/cache.(*action).exec:+193
golang.org/x/tools/gopls/internal/cache.execActions.func1.1:+2
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.execActions.func1:+2
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.1 go1.22.0 darwin/arm64 other,vscode-insiders (3)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

This stack Eqzixw was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+4
golang.org/x/tools/go/analysis.(*Pass).Reportf:+2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:+28
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.walkExprList:+2
go/ast.Walk:+167
go/ast.Walk:+188
go/ast.walkStmtList:+2
go/ast.Walk:+184
go/ast.Walk:+307
go/ast.walkDeclList:+2
go/ast.Walk:+316
go/ast.Inspect:=397
golang.org/x/tools/gopls@v0.15.0 go1.20.14 linux/amd64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

This stack HRixng was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*action).exec.func2:+15
golang.org/x/tools/gopls/internal/cache.toGobDiagnostic:+32
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+1
golang.org/x/tools/go/analysis.(*Pass).Reportf:+2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:+28
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.walkExprList:+2
go/ast.Walk:+167
go/ast.Walk:+188
go/ast.walkStmtList:+2
go/ast.Walk:+184
go/ast.Walk:+307
go/ast.walkDeclList:+2
golang.org/x/tools/gopls@v0.15.0 go1.20.14 linux/amd64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

This stack g_9bVA was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*action).exec.func2:+24
golang.org/x/tools/gopls/internal/cache.toGobDiagnostic:+22
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+1
honnef.co/go/tools/analysis/report.Report:+25
honnef.co/go/tools/staticcheck.CheckTypedNilInterface:+100
golang.org/x/tools/gopls/internal/cache.(*action).exec.func6:+31
golang.org/x/tools/gopls/internal/cache.(*action).exec:+202
golang.org/x/tools/gopls/internal/cache.execActions.func1.1:+2
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.execActions.func1:+2
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.2 go1.22.0 darwin/arm64 vscode-insiders (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

This stack 3BjAWg was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+4
honnef.co/go/tools/analysis/report.Report:+25
honnef.co/go/tools/staticcheck.CheckTypedNilInterface:+100
golang.org/x/tools/gopls/internal/cache.(*action).exec.func6:+31
golang.org/x/tools/gopls/internal/cache.(*action).exec:+202
golang.org/x/tools/gopls/internal/cache.execActions.func1.1:+2
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.execActions.func1:+2
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.2 go1.22.0 darwin/arm64 vscode-insiders (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented Apr 4, 2024

This stack 5rID1Q was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+4
golang.org/x/tools/go/analysis.(*Pass).Reportf:+2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:+28
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.walkExprList:=26
go/ast.Walk:+167
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.Walk:+307
go/ast.walkDeclList:=38
go/ast.Walk:+316
go/ast.Inspect:=397
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo:+1
golang.org/x/tools/gopls@v0.15.2 go1.22.0 windows/amd64 neovim,vscode (4)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented Apr 4, 2024

This stack J_xyOQ was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*action).exec.func2:+24
golang.org/x/tools/gopls/internal/cache.toGobDiagnostic:+32
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+1
golang.org/x/tools/go/analysis.(*Pass).Reportf:+2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:+28
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.walkExprList:=26
go/ast.Walk:+167
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.Walk:+307
go/ast.walkDeclList:=38
go/ast.Walk:+316
golang.org/x/tools/gopls@v0.15.2 go1.22.0 windows/amd64 neovim,vscode (4)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented Apr 4, 2024

This stack nkqhZw was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*action).exec.func2:+24
golang.org/x/tools/gopls/internal/cache.toGobDiagnostic:+32
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+1
golang.org/x/tools/go/analysis.(*Pass).Reportf:+2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:+28
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.Walk:+156
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.Walk:+245
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.walkStmtList:=32
golang.org/x/tools/gopls@v0.15.2 go1.22.0 darwin/arm64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented Apr 4, 2024

This stack DD7DZw was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+4
golang.org/x/tools/go/analysis.(*Pass).Reportf:+2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:+28
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.Walk:+156
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.Walk:+245
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.Walk:+307
golang.org/x/tools/gopls@v0.15.2 go1.22.0 darwin/arm64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@gopherbot
Copy link

Change https://go.dev/cl/576655 mentions this issue: gopls/internal/cache: analysis: repair start/end and refine bug report

@gopherbot
Copy link

Change https://go.dev/cl/576656 mentions this issue: gopls/internal/cmd: check: print RelatedInformation

gopherbot pushed a commit to golang/tools that referenced this issue Apr 5, 2024
Poor parser error recovery may cause Node.End to be zero, or
a small positive displacement from zero due to recursive Node.End
computation (#66683).

This change further refines the bug.Reports for such problems,
and additionally repairs the values heuristically to avoid
downstream bug.Reports after toGobDiagnostics (#64547).

Updates golang/go#66683
Updates golang/go#64547

Change-Id: I7c795622ec6b63574978d2953c82036fcc4425af
Reviewed-on: https://go-review.googlesource.com/c/tools/+/576655
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
@adonovan
Copy link
Member Author

adonovan commented Apr 7, 2024

This stack KXNLJA was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*action).exec.func2:+24
golang.org/x/tools/gopls/internal/cache.toGobDiagnostic:+32
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+1
golang.org/x/tools/go/analysis.(*Pass).Reportf:+2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:+28
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.walkExprList:=26
go/ast.Walk:+268
go/ast.Walk:+294
go/ast.Walk:+146
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.Walk:+307
golang.org/x/tools/gopls@v0.15.2 go1.22.0 linux/amd64 other,vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented Apr 7, 2024

This stack aabnaw was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+4
golang.org/x/tools/go/analysis.(*Pass).Reportf:+2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:+28
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.Walk:+156
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.Walk:+307
go/ast.walkDeclList:=38
go/ast.Walk:+316
go/ast.Inspect:=397
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo:+1
golang.org/x/tools/go/analysis/passes/cgocall.run:+10
golang.org/x/tools/gopls@v0.15.2 go1.22.1 linux/amd64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented Apr 7, 2024

This stack xEGAsg was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*action).exec.func2:+24
golang.org/x/tools/gopls/internal/cache.toGobDiagnostic:+32
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+1
golang.org/x/tools/go/analysis.(*Pass).Reportf:+2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:+28
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.Walk:+156
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.Walk:+307
go/ast.walkDeclList:=38
go/ast.Walk:+316
go/ast.Inspect:=397
golang.org/x/tools/gopls@v0.15.2 go1.22.1 linux/amd64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented Apr 7, 2024

This stack V5I6ag was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+4
golang.org/x/tools/go/analysis.(*Pass).Reportf:+2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:+28
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.walkExprList:=26
go/ast.Walk:+268
go/ast.Walk:+294
go/ast.Walk:+146
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.Walk:+307
go/ast.walkDeclList:=38
go/ast.Walk:+316
golang.org/x/tools/gopls@v0.15.2 go1.22.0 linux/amd64 other,vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented Apr 7, 2024

This stack AjGTng was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*action).exec.func2:+24
golang.org/x/tools/gopls/internal/cache.toGobDiagnostic:+32
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+1
golang.org/x/tools/go/analysis.(*Pass).Reportf:+2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:+28
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.walkExprList:=26
go/ast.Walk:+94
go/ast.Walk:+156
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.Walk:+307
go/ast.walkDeclList:=38
golang.org/x/tools/gopls@v0.15.2 go1.22.1 linux/amd64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented Apr 7, 2024

This stack y5Uv9w was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+4
golang.org/x/tools/go/analysis.(*Pass).Reportf:+2
golang.org/x/tools/go/analysis/passes/cgocall.checkCgo.func1:+28
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.walkExprList:=26
go/ast.Walk:+94
go/ast.Walk:+156
go/ast.walkStmtList:=32
go/ast.Walk:+184
go/ast.Walk:+307
go/ast.walkDeclList:=38
go/ast.Walk:+316
go/ast.Inspect:=397
golang.org/x/tools/gopls@v0.15.2 go1.22.1 linux/amd64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@adonovan
Copy link
Member Author

adonovan commented Apr 7, 2024

This stack nJQxXw was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+6
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap:+18
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importPackage:+4
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).getImportPackage:+55
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func1:+1
golang.org/x/sync/errgroup.(*Group).Go.func1:+3
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.2 go1.22.0 darwin/arm64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

@gopherbot
Copy link

Change https://go.dev/cl/577595 mentions this issue: [gopls-release-branch.0.15] gopls/internal/cache: analysis: repair start/end and refine bug report

gopherbot pushed a commit to golang/tools that referenced this issue Apr 9, 2024
…art/end and refine bug report

Poor parser error recovery may cause Node.End to be zero, or
a small positive displacement from zero due to recursive Node.End
computation (#66683).

This change further refines the bug.Reports for such problems,
and additionally repairs the values heuristically to avoid
downstream bug.Reports after toGobDiagnostics (#64547).

Updates golang/go#66683
Updates golang/go#64547
Updates golang/go#66730

Change-Id: I7c795622ec6b63574978d2953c82036fcc4425af
Reviewed-on: https://go-review.googlesource.com/c/tools/+/576655
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
(cherry picked from commit c7b6b8d)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/577595
Auto-Submit: Alan Donovan <adonovan@google.com>
gopherbot pushed a commit to golang/tools that referenced this issue Apr 12, 2024
The check command previously ignored Diagnostic.RelatedInformation,
which confused me as I was trying to run an experiment related
to golang/go#64547. This change causes it print the related errors.

+ test

(Aside: there's a lot of weirdness in the way that
check.typeErrorsToDiagnostics constructs the response,
as you will see if you run the test on c.go not c2.go,
but that's not the test's concern.)

Change-Id: I14efbf8f2e47ac00c2e7d6eceeacbaaecab88213
Reviewed-on: https://go-review.googlesource.com/c/tools/+/576656
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls/telemetry-wins gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants