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: time goes backwards on windows-arm64 (frequent TestGcLastTime failures) [1.17 backport] #49369

Closed
gopherbot opened this issue Nov 4, 2021 · 4 comments
Labels
CherryPickApproved
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Nov 4, 2021

@zx2c4 requested issue #48072 to be considered for backport to the next 1.17 minor release.

@gopherbot please backport this to 1.17

@gopherbot gopherbot added the CherryPickCandidate label Nov 4, 2021
@gopherbot gopherbot added this to the Go1.17.4 milestone Nov 4, 2021
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Nov 5, 2021

Change https://golang.org/cl/361476 mentions this issue: [release-branch.go1.17] runtime: use correct constant when computing nsec remainder

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Nov 5, 2021

Change https://golang.org/cl/361475 mentions this issue: [release-branch.go1.17] runtime: on windows, read nanotime with one instruction or issue barrier

@heschi heschi added the CherryPickApproved label Nov 24, 2021
@gopherbot gopherbot removed the CherryPickCandidate label Nov 24, 2021
gopherbot pushed a commit that referenced this issue Nov 24, 2021
…nstruction or issue barrier

On 64-bit, this is more efficient, and on ARM64, this prevents the time
from moving backwards due to the weaker memory model. On ARM32 due to
the weaker memory model, we issue a memory barrier.

Updates #48072.
Updates #49369.

Change-Id: If4695716c3039d8af14e14808af217f5c99fc93a
Reviewed-on: https://go-review.googlesource.com/c/go/+/361057
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/361475
Reviewed-by: Patrik Nyblom <pnyb@google.com>
gopherbot pushed a commit that referenced this issue Nov 24, 2021
…nsec remainder

A code comment on amd64 for windows and plan9 contained a snippet for
splitting apart the sec and nsec components of a unix timestamp, with
produced assembly below, which was then cleaned up by hand. When arm64
was ported, that code snippet in the comment went through the compiler
to produce some code that was then pasted and cleaned up. Unfortunately,
the comment had a typo in it, containing 8 zeros instead of 9.

This resulted in the constant used in the assembly being wrong, spotted
by @bufflig's eagle eyes. So, this commit fixes the comment on all three
platforms, and the assembly on windows/arm64.

Updates #48072.
Fixes #49369.

Change-Id: I786fe89147328b0d25544f52c927ddfdb9f6f1cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/361474
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Patrik Nyblom <pnyb@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/361476
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Nov 24, 2021

Closed by merging 4536558 to release-branch.go1.17.

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Nov 24, 2021

Closed by merging e347c89 to release-branch.go1.17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved
Projects
None yet
Development

No branches or pull requests

2 participants