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/telemetry: TestTelemetry failures #62161

Open
gopherbot opened this issue Aug 19, 2023 · 3 comments
Open

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

gopherbot opened this issue Aug 19, 2023 · 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. Testing An issue that has been verified to require only test changes, not just a test failure. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@gopherbot
Copy link

gopherbot commented Aug 19, 2023

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/telemetry" && test == "TestTelemetry" && `read stackcounter.* = .*, want one entry`

Issue created automatically to collect these failures.

Example (log):

--- FAIL: TestTelemetry (0.54s)
    telemetry_test.go:60: ReadCounter("gopls/client:vscode") = (0, <nil>), want (1, nil)
    telemetry_test.go:60: ReadCounter("gopls/goversion:1.22") = (0, <nil>), want (1, nil)
    telemetry_test.go:71: read stackcounter("gopls/bug") = (map[string]uint64{}, <nil>), want one entry

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 19, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/telemetry" && test == "TestTelemetry"
2023-08-18 14:18 linux-arm64-longtest tools@9425c2e7 go@a9859a7d x/tools/gopls/internal/telemetry.TestTelemetry (log)
--- FAIL: TestTelemetry (0.54s)
    telemetry_test.go:60: ReadCounter("gopls/client:vscode") = (0, <nil>), want (1, nil)
    telemetry_test.go:60: ReadCounter("gopls/goversion:1.22") = (0, <nil>), want (1, nil)
    telemetry_test.go:71: read stackcounter("gopls/bug") = (map[string]uint64{}, <nil>), want one entry

watchflakes

@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 19, 2023
@gopherbot gopherbot added this to the Unreleased milestone Aug 19, 2023
@findleyr
Copy link
Contributor

CC @hyangah @pjweinb

@gopherbot
Copy link
Author

Change https://go.dev/cl/523795 mentions this issue: gopls/internal/telemetry: log timestamp when test fails

gopherbot pushed a commit to golang/tools that referenced this issue Aug 29, 2023
We observed a couple of test failures. My current hypothesis is
that the bug is in how countertest.ReadCounter and
countertest.ReadStackCounter read the data. They try to access
the counter values by reading the contents of the mapped file on
disk and parsing them with counter.Parse. They call 'file.rotate'
before reading the files to ensure the file is mapped. However,
if file.rotate ends up actually rotating the underlying file
(due to crossing the UTC day boundary), the counter data may be
flushed out and reset. As we are moving to 'week' instead of 'day'
for file rotation, I don't know how frequently we will encounter
this issue though if this was the root cause. Log the timestamp
when the test fails, to evaluate the hypothesis.

For golang/go#62161

Change-Id: If00b0788b6927640a979d17f8fe888232d27ea09
Reviewed-on: https://go-review.googlesource.com/c/tools/+/523795
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
@adonovan adonovan added the Testing An issue that has been verified to require only test changes, not just a test failure. label Aug 31, 2023
@findleyr findleyr modified the milestones: gopls/v0.14.0, gopls/v0.14.1 Oct 9, 2023
@findleyr findleyr modified the milestones: gopls/v0.14.2, gopls/v0.15.0 Nov 14, 2023
@findleyr findleyr modified the milestones: gopls/v0.15.0, gopls/v0.16.0 Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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. Testing An issue that has been verified to require only test changes, not just a test failure. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Status: No status
Development

No branches or pull requests

4 participants