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: bug in analysis importer reported by telemetry #64236

Open
adonovan opened this issue Nov 17, 2023 · 10 comments
Open

x/tools/gopls: bug in analysis importer reported by telemetry #64236

adonovan opened this issue Nov 17, 2023 · 10 comments
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 Nov 17, 2023

This stack sbGdaw, hz09pg, zhKNnQ was reported by telemetry:

cache.(*analysisNode)._import.func1:41 is

		pkg, err := gcimporter.IImportShallow(an.fset, getPackages, an.summary.Export, string(an.m.PkgPath), bug.Reportf)
		if err != nil {
			an.typesErr = bug.Errorf("%s: invalid export data: %v", an.m, err)
			an.types = nil
		} else if pkg != an.types {
			log.Fatalf("%s: inconsistent packages", an.m)
		}
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.(*analysisNode)._import.func1:41
sync.(*Once).doSlow:5
sync.(*Once).Do:?65
golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode)._import:1
golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode).typeCheck.func2:34
golang.org/x/tools/gopls/internal/lsp/cache.importerFunc.Import:0
go/types.(*Checker).importPackage:28
go/types.(*Checker).collectObjects.func1:13
go/types.(*Checker).walkDecl:9
go/types.(*Checker).walkDecls:?391
go/types.(*Checker).collectObjects:42
go/types.(*Checker).checkFiles:32
go/types.(*Checker).Files:?341
golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode).typeCheck:117
golang.org/x/tools/gopls@v0.14.1 go1.21.3 linux/amd64 (1)

Reported using golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

Dups: NpfwWw OeW1wA

Duplicates:

This stack WRBqTw 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.(*analysisNode)._import.func1:41
sync.(*Once).doSlow:5
sync.(*Once).Do:?65
golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode)._import:1
golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode).typeCheck.func2:34
golang.org/x/tools/gopls/internal/lsp/cache.importerFunc.Import:0
go/types.(*Checker).importPackage:28
go/types.(*Checker).collectObjects.func1:10
go/types.(*Checker).walkDecl:9
go/types.(*Checker).walkDecls:?383
go/types.(*Checker).collectObjects:42
go/types.(*Checker).checkFiles:18
go/types.(*Checker).Files:?307
golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode).typeCheck:117
golang.org/x/tools/gopls@v0.14.2 go1.19.13 darwin/arm64 (1)

This stack C7ZvyQ 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.(*analysisNode)._import.func1:41
sync.(*Once).doSlow:5
sync.(*Once).Do:?65
golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode)._import:1
golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode).typeCheck.func2:34
golang.org/x/tools/gopls/internal/lsp/cache.importerFunc.Import:0
go/types.(*Checker).importPackage:28
go/types.(*Checker).collectObjects.func1:13
go/types.(*Checker).walkDecl:9
go/types.(*Checker).walkDecls:?399
go/types.(*Checker).collectObjects:42
go/types.(*Checker).checkFiles:29
go/types.(*Checker).Files:?372
golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode).typeCheck:117
golang.org/x/tools/gopls@v0.14.2 go1.22rc2 darwin/arm64 other,vscode (1)

This stack 6jGwIA 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.(*analysisNode)._import.func1:41
sync.(*Once).doSlow:5
sync.(*Once).Do:?65
golang.org/x/tools/gopls/internal/cache.(*analysisNode)._import:1
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck.func2:34
golang.org/x/tools/gopls/internal/cache.importerFunc.Import:0
go/types.(*Checker).importPackage:28
go/types.(*Checker).collectObjects.func1:13
go/types.(*Checker).walkDecl:9
go/types.(*Checker).walkDecls:?399
go/types.(*Checker).collectObjects:42
go/types.(*Checker).checkFiles:29
go/types.(*Checker).Files:?372
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck:118
golang.org/x/tools/gopls@v0.15.0-pre.2 go1.22rc2 linux/amd64 vscode (1)

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

Dups: OeW1wA NpfwWw sNopDQ YUgxTQ g_3FdA qOlVPg sNopAA NpfwVg rcxYqw

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Nov 17, 2023
@gopherbot gopherbot added this to the Unreleased milestone Nov 17, 2023
@adonovan adonovan changed the title x/tools/gopls: bug reported by telemetry [sbGdaw] x/tools/gopls: bug in analysis importer reported by telemetry [sbGdaw] Nov 17, 2023
@adonovan adonovan changed the title x/tools/gopls: bug in analysis importer reported by telemetry [sbGdaw] x/tools/gopls: bug in analysis importer reported by telemetry Nov 17, 2023
@adonovan adonovan added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 17, 2023
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.15.0 Nov 17, 2023
@findleyr
Copy link
Contributor

findleyr commented Feb 6, 2024

We can live with this in v0.15.0. Let's move to v0.16.0

@findleyr findleyr modified the milestones: gopls/v0.15.0, gopls/v0.16.0 Feb 6, 2024
@adonovan
Copy link
Member Author

This stack NpfwWw 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.(*analysisNode)._import.func1:+41
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.(*analysisNode)._import:+1
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck.func2:+34
golang.org/x/tools/gopls/internal/cache.importerFunc.Import:+0
go/types.(*Checker).importPackage:+28
go/types.(*Checker).collectObjects.func1:+13
go/types.(*Checker).walkDecl:+9
go/types.(*Checker).walkDecls:=399
go/types.(*Checker).collectObjects:+42
go/types.(*Checker).checkFiles:+29
go/types.(*Checker).Files:=372
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck:+118
golang.org/x/tools/gopls@v0.15.0-pre.3 go1.22.0 darwin/arm64 vscode (2)

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

@adonovan
Copy link
Member Author

This stack OeW1wA 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.(*analysisNode)._import.func1:41
sync.(*Once).doSlow:5
sync.(*Once).Do:?65
golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode)._import:1
golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode).typeCheck.func2:34
golang.org/x/tools/gopls/internal/lsp/cache.importerFunc.Import:0
go/types.(*Checker).importPackage:28
go/types.(*Checker).collectObjects.func1:13
go/types.(*Checker).walkDecl:9
go/types.(*Checker).walkDecls:?399
go/types.(*Checker).collectObjects:42
go/types.(*Checker).checkFiles:36
go/types.(*Checker).Files:?355
golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode).typeCheck:117
golang.org/x/tools/gopls@v0.14.2 devel darwin/arm64 vscode (1)

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

@adonovan
Copy link
Member Author

adonovan commented Mar 9, 2024

This stack sNopDQ 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.(*analysisNode)._import.func1:+41
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.(*analysisNode)._import:+1
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck.func2:+34
golang.org/x/tools/gopls/internal/cache.importerFunc.Import:+0
go/types.(*Checker).importPackage:+28
go/types.(*Checker).collectObjects.func1:+13
go/types.(*Checker).walkDecl:+9
go/types.(*Checker).walkDecls:=391
go/types.(*Checker).collectObjects:+42
go/types.(*Checker).checkFiles:+32
go/types.(*Checker).Files:=341
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck:+118
golang.org/x/tools/gopls@v0.15.1 go1.21.1 linux/amd64 vscode (1)

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

@adonovan
Copy link
Member Author

This stack YUgxTQ 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.(*analysisNode)._import.func1:+41
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.(*analysisNode)._import:+1
golang.org/x/tools/gopls/internal/cache.(*analysisNode)._import.func1.1.1:+1
golang.org/x/sync/errgroup.(*Group).Go.func1:+3
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.1 go1.22.0 linux/amd64 vscode (1)

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

@adonovan
Copy link
Member Author

This stack g_3FdA 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.(*analysisNode)._import.func1:+41
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.(*analysisNode)._import:+1
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck.func2:+34
golang.org/x/tools/gopls/internal/cache.importerFunc.Import:+0
go/types.(*Checker).importPackage:+28
go/types.(*Checker).collectObjects.func1:+13
go/types.(*Checker).walkDecl:+9
go/types.(*Checker).walkDecls:=399
go/types.(*Checker).collectObjects:+42
go/types.(*Checker).checkFiles:+29
go/types.(*Checker).Files:=373
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck:+118
golang.org/x/tools/gopls@v0.15.1 devel 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 qOlVPg 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.(*analysisNode)._import.func1:+41
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.(*analysisNode)._import:+1
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck.func2:+34
golang.org/x/tools/gopls/internal/cache.importerFunc.Import:+0
go/types.(*Checker).importPackage:+28
go/types.(*Checker).collectObjects.func1:+13
go/types.(*Checker).walkDecl:+9
go/types.(*Checker).walkDecls:=391
go/types.(*Checker).collectObjects:+42
go/types.(*Checker).checkFiles:+18
go/types.(*Checker).Files:=304
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck:+118
golang.org/x/tools/gopls@v0.15.2 go1.20.6 windows/amd64 vscode (1)

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

@adonovan
Copy link
Member Author

This stack sNopAA 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.(*analysisNode)._import.func1:+41
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.(*analysisNode)._import:+1
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck.func2:+34
golang.org/x/tools/gopls/internal/cache.importerFunc.Import:+0
go/types.(*Checker).importPackage:+28
go/types.(*Checker).collectObjects.func1:+13
go/types.(*Checker).walkDecl:+9
go/types.(*Checker).walkDecls:=391
go/types.(*Checker).collectObjects:+42
go/types.(*Checker).checkFiles:+32
go/types.(*Checker).Files:=341
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck:+115
golang.org/x/tools/gopls@v0.15.3 go1.21.2 linux/amd64 vscode (1)
golang.org/x/tools/gopls@v0.15.3-pre.2 go1.21.2 linux/amd64 vscode (3)

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

@adonovan
Copy link
Member Author

This stack NpfwVg 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.(*analysisNode)._import.func1:+41
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.(*analysisNode)._import:+1
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck.func2:+34
golang.org/x/tools/gopls/internal/cache.importerFunc.Import:+0
go/types.(*Checker).importPackage:+28
go/types.(*Checker).collectObjects.func1:+13
go/types.(*Checker).walkDecl:+9
go/types.(*Checker).walkDecls:=399
go/types.(*Checker).collectObjects:+42
go/types.(*Checker).checkFiles:+29
go/types.(*Checker).Files:=372
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck:+115
golang.org/x/tools/gopls@v0.15.3 go1.22.1 linux/amd64 vscode (1)

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

@adonovan
Copy link
Member Author

This stack rcxYqw 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.(*analysisNode)._import.func1:+41
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.(*analysisNode)._import:+1
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck.func2:+34
golang.org/x/tools/gopls/internal/cache.importerFunc.Import:+0
go/types.(*Checker).importPackage:+28
go/types.(*Checker).collectObjects.func1:+10
go/types.(*Checker).walkDecl:+9
go/types.(*Checker).walkDecls:=383
go/types.(*Checker).collectObjects:+42
go/types.(*Checker).checkFiles:+18
go/types.(*Checker).Files:=307
golang.org/x/tools/gopls/internal/cache.(*analysisNode).typeCheck:+118
golang.org/x/tools/gopls@v0.15.2 go1.19.13 darwin/amd64 vscode (1)

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

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
@adonovan @gopherbot @findleyr and others