Skip to content

x/tools/gopls: duplicate package paths in export data manifest (via telemetry) #63822

Open
@findleyr

Description

@findleyr
#!stacks
"bug.Reportf" && 
    ("(*typeCheckBatch).importMap.func1:+6" ||
     "gcimporter.iimportCommon:+119" ||
     "importPackage.importLookup.func2:+13" ||
     "importPackage.importLookup.func2:+7")

Telemetry data at https://storage.googleapis.com/prod-telemetry-merged/2023-10-28.json clearly demonstrates a package that cannot be imported: there are in fact two bug reports, one each in type checking (#64235) and analysis (#64236).

Clearly some invariant is being violated. We should use the reportf callback passed into the importer to get a more accurate stack, as otherwise this is unlikely to be actionable (we can't see the error message in telemetry, which we probably didn't consider when adding this instrumentation).

Putting this in the v0.14.2 milestone as it would be nice to get to the bottom of this error. I'll push down the instrumentation.

CC @adonovan

Dups: BQtcLQ m5UK3A W_lHAg du4kbA PDrh5Q jZbDKQ 4elxTA JhOH0g oat8ig wr44gQ 6j0bvA 9wAdDQ 6LjVfg A3ISjw nJQxXw tQYZmg vx_wYg BQtcJQ WpB6LA WzmCgg DetyaA yimcvw y4xHuQ 0JP54Q -trCvQ fuzfjQ w2_GEQ 3_R2tA 3_R2vA iBh0rw m44AmQ CYJxZw WUTC9w nPNE0A 5I0Kxw kVgEzw

Dups for which I can't be bothered to include the stack: rPGxIQ _ZJXvw VJTMTw hCJB7Q 1xF43w nPNE0A m9MmHA SQT0sg TwtkSg
Dups: BWn-Aw 8nKERA YQKCXA xOe7BQ y7CqCA 3ue-nQ cYxHdQ PQst8g Jm14RQ eFV2uQ cIxFiw lZ85Ug ovScmQ eZ-Gkw h1dggQ hViEvg DUHIGA zw0_tw UlyTiA yg0dyA Msz07g Qmgupw 8kQsoA VUMLHA lNJ2zw n4vZqA isQrRw K-rZ-A 0DqsTg nT0dHQ qmBVlw aj-7Hg Tgti3A

Activity

added
goplsIssues related to the Go language server, gopls.
ToolsThis label describes issues relating to any tools in the x/tools repository.
on Oct 30, 2023
added this to the gopls/v0.14.2 milestone on Oct 30, 2023
changed the title [-]x/tools/gopls: corrupt export data during import[/-] [+]x/tools/gopls: improve instrumentation for corrupt export data during import[/+] on Oct 30, 2023
self-assigned this
on Feb 2, 2024
gopherbot

gopherbot commented on Feb 2, 2024

@gopherbot
Contributor

Change https://go.dev/cl/560795 mentions this issue: gopls/internal/cache: add assertions for export data inconsistency

adonovan

adonovan commented on Mar 4, 2024

@adonovan
Member

The "inconsistent view of dependencies" assertion was hit:

This stack BQtcLQ 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.func1:+11
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11
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.(*typeCheckBatch).typesConfig.func1:+20
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
golang.org/x/tools/gopls@v0.15.1 go1.21.4 darwin/arm64 vscode (1)

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

adonovan

adonovan commented on Mar 5, 2024

@adonovan
Member

This stack m5UK3A 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.func1:+11
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11
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.(*typeCheckBatch).handleSyntaxPackage.func2:+1
golang.org/x/sync/errgroup.(*Group).Go.func1:+3
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.0 go1.21.4 darwin/arm64 neovim,vscode (2)

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

adonovan

adonovan commented on Mar 9, 2024

@adonovan
Member

This stack W_lHAg 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.func1:+11
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.(*typeCheckBatch).handleSyntaxPackage.func2:+1
golang.org/x/sync/errgroup.(*Group).Go.func1:+3
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.1 go1.22.0 darwin/arm64 other,vscode (4)

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

85 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.gopls/telemetry-wins

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @adonovan@gopherbot@findleyr

      Issue actions

        x/tools/gopls: duplicate package paths in export data manifest (via telemetry) · Issue #63822 · golang/go