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/trace: v2 traces contain an incorrect timestamp scaling factor on Windows [1.22 backport] #66201

Closed
gopherbot opened this issue Mar 8, 2024 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@gopherbot
Copy link

@mknyszek requested issue #65997 to be considered for backport to the next 1.22 minor release.

@gopherbot Please open a backport issue for Go 1.22.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Mar 8, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Mar 8, 2024
@gopherbot gopherbot added this to the Go1.22.2 milestone Mar 8, 2024
@mknyszek
Copy link
Contributor

mknyszek commented Mar 8, 2024

Forgot to add justification in the main issue. Basically: the fix is incredibly small, simple, and safe. The issue is pretty serious in that traces on Windows just have the completely wrong durations reported (off by a factor of 256) by any and all tooling.

There is a workaround, specifically to set GOEXPERIMENT=noexectracer2. But compared to the size of the fix, that seems needlessly onerous for our users, since it requires rebuilding their programs.

@gopherbot
Copy link
Author

Change https://go.dev/cl/570195 mentions this issue: [release-branch.go1.22] runtime: fix EvFrequency event value on Windows in the new tracer

@dr2chase dr2chase added the CherryPickApproved Used during the release process for point releases label Mar 20, 2024
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Mar 20, 2024
gopherbot pushed a commit that referenced this issue Mar 27, 2024
…ws in the new tracer

The value produced for the EvFrequency event on Windows is missing the
fact that the cputicks clock gets divided. This results in durations
that are consistently wrong by the same factor (about 256).

For #65997.
Fixes #66201.

Change-Id: I930cbfce3499d435c20699f41c11e3227d84f911
Reviewed-on: https://go-review.googlesource.com/c/go/+/567937
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
(cherry picked from commit 707eba9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/570195
Reviewed-by: Than McIntosh <thanm@google.com>
@gopherbot
Copy link
Author

Closed by merging abfd578 to release-branch.go1.22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

3 participants