Skip to content

x/tools/gopls/internal/telemetry: TestTelemetry failures #69132

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
gopherbot opened this issue Aug 29, 2024 · 3 comments
Closed

x/tools/gopls/internal/telemetry: TestTelemetry failures #69132

gopherbot opened this issue Aug 29, 2024 · 3 comments
Assignees
Labels
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

@gopherbot
Copy link
Contributor

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/telemetry" && test == "TestTelemetry"

Issue created automatically to collect these failures.

Example (log):

=== RUN   TestTelemetry
    telemetry_test.go:105: ReadCounter("gopls/client:vscode") = (0, not found:"gopls/client:vscode"), want (1, nil)
    telemetry_test.go:106: Current timestamp = 2024-08-29 00:00:01.20417263 +0000 UTC
    telemetry_test.go:105: ReadCounter("gopls/goversion:1.22") = (0, not found:"gopls/goversion:1.22"), want (2, nil)
    telemetry_test.go:106: Current timestamp = 2024-08-29 00:00:01.204570889 +0000 UTC
    telemetry_test.go:105: ReadCounter("fwd/vscode/linter:a") = (0, not found:"fwd/vscode/linter:a"), want (1, nil)
    telemetry_test.go:106: Current timestamp = 2024-08-29 00:00:01.204975149 +0000 UTC
    telemetry_test.go:105: ReadCounter("gopls/gotoolchain:local") = (0, not found:"gopls/gotoolchain:local"), want (1, nil)
    telemetry_test.go:106: Current timestamp = 2024-08-29 00:00:01.205292156 +0000 UTC
    telemetry_test.go:114: ReadStackCounter(bugreportcount) failed - not found:"gopls/bug\ngolang.org/x/tools/gopls/internal/util/bug.report:+35\ngolang.org/x/tools/gopls/internal/util/bug.Report:=68\ngolang.org/x/tools/gopls/internal/telemetry_test.TestTelemetry.func2:+15\ngolang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1:+81\ntesting.tRunner:+150\nruntime.goexit:+0"
--- FAIL: TestTelemetry (1.91s)

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/telemetry" && test == "TestTelemetry"
2024-08-28 16:26 x_tools-go1.22-linux-riscv64 tools@aaf49f1f release-branch.go1.22@e87be983 x/tools/gopls/internal/telemetry.TestTelemetry (log)
=== RUN   TestTelemetry
    telemetry_test.go:105: ReadCounter("gopls/client:vscode") = (0, not found:"gopls/client:vscode"), want (1, nil)
    telemetry_test.go:106: Current timestamp = 2024-08-29 00:00:01.20417263 +0000 UTC
    telemetry_test.go:105: ReadCounter("gopls/goversion:1.22") = (0, not found:"gopls/goversion:1.22"), want (2, nil)
    telemetry_test.go:106: Current timestamp = 2024-08-29 00:00:01.204570889 +0000 UTC
    telemetry_test.go:105: ReadCounter("fwd/vscode/linter:a") = (0, not found:"fwd/vscode/linter:a"), want (1, nil)
    telemetry_test.go:106: Current timestamp = 2024-08-29 00:00:01.204975149 +0000 UTC
    telemetry_test.go:105: ReadCounter("gopls/gotoolchain:local") = (0, not found:"gopls/gotoolchain:local"), want (1, nil)
    telemetry_test.go:106: Current timestamp = 2024-08-29 00:00:01.205292156 +0000 UTC
    telemetry_test.go:114: ReadStackCounter(bugreportcount) failed - not found:"gopls/bug\ngolang.org/x/tools/gopls/internal/util/bug.report:+35\ngolang.org/x/tools/gopls/internal/util/bug.Report:=68\ngolang.org/x/tools/gopls/internal/telemetry_test.TestTelemetry.func2:+15\ngolang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1:+81\ntesting.tRunner:+150\nruntime.goexit:+0"
--- FAIL: TestTelemetry (1.91s)

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 29, 2024
@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 Aug 29, 2024
@gopherbot gopherbot added this to the Unreleased milestone Aug 29, 2024
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.17.0 Sep 5, 2024
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/625496 mentions this issue: internal/counter: use ReadMapped from counter.Read

gopherbot pushed a commit to golang/telemetry that referenced this issue Nov 6, 2024
counter.Read, which is the implementation of countertest.ReadCounter,
was using os.ReadFile to read the counter file's contents. As we have
seen elsewhere, this may lead to synchronization issues. To ensure we
observe all active counts we should read via mmap. For this reason,
counter.ReadFile was already using the ReadMapped helper. Update Read to
do the same. I believe this fixes two test failures that we've observed
in gopls.

For golang/go#68659
For golang/go#69132

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

Change https://go.dev/cl/625915 mentions this issue: gopls: update x/telemetry to pick up fix for countertest.ReadCounter

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
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
Archived in project
Development

No branches or pull requests

2 participants