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

runtime/metrics: /gc/scan* metrics return zero #62477

Closed
mknyszek opened this issue Sep 6, 2023 · 4 comments
Closed

runtime/metrics: /gc/scan* metrics return zero #62477

mknyszek opened this issue Sep 6, 2023 · 4 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mknyszek
Copy link
Contributor

mknyszek commented Sep 6, 2023

These new metrics, introduced in Go 1.21, always return zero due to an oversight (no dependency declared in the metrics definition). https://go.dev/cl/525595 fixes this.

@mknyszek mknyszek added NeedsFix The path to resolution is known, but the work has not been done. compiler/runtime Issues related to the Go compiler and/or runtime. labels Sep 6, 2023
@mknyszek mknyszek added this to the Backlog milestone Sep 6, 2023
@mknyszek mknyszek self-assigned this Sep 6, 2023
@mknyszek
Copy link
Contributor Author

mknyszek commented Sep 6, 2023

@gopherbot please open a backport issue for Go 1.21.

This issue means that some new metrics just don't work, and there's no workaround. Although the severity of the issue is quite low, the fix is also very safe and includes a test.

@gopherbot
Copy link

Backport issue(s) opened: #62478 (for 1.21).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

@gopherbot
Copy link

Change https://go.dev/cl/525595 mentions this issue: runtime/metrics: fix /gc/scan/* metrics

@gopherbot
Copy link

Change https://go.dev/cl/526116 mentions this issue: [release-branch.go1.21] runtime/metrics: fix /gc/scan/* metrics

gopherbot pushed a commit that referenced this issue Sep 11, 2023
In the existing implementation, all /gc/scan/* metrics are
always equal to 0 due to the dependency on gcStatDep not being
set. This leads to gcStatAggregate always containing zeros, and
always reporting 0 for those metrics.

Also, add a test to ensure that /gc/scan/* metrics are not empty.

For #62477.
Fixes #62478.

Change-Id: I67497347d50ed5c3ce1719a18714c062ec938cab
Reviewed-on: https://go-review.googlesource.com/c/go/+/526116
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Heschi Kreinick <heschi@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
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants