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: total allocation stats are managed in a uintptr
which can quickly wrap around on 32-bit architectures [1.18 backport]
#52689
Comments
Basically, on 32-bit platforms, allocation stats can end up completely wrong. I'm surprised this flew under the radar for so long. There's no workaround. |
Ahoy, can you do the backport CLs here? (for this and 1.17) |
Thanks for trying David. Yeah, it's not going to be that easy because a bunch of things moved. I suspect 1.17 and 1.18 can use the same fix, but I need to basically create a separate CL for them. It'll be very similar to what landed for 1.19, but not quite the same. |
Also not allowed to mail the cherry-pick if I do it by hand, oh well. |
Just checking in. The next minor release is coming up soon, and this issue has already been bumped once. Is there any new progress? |
We bump into this issue today where the value of
|
Change https://go.dev/cl/411495 mentions this issue: |
Change https://go.dev/cl/411494 mentions this issue: |
I created the cherry-picks, and the changes are straightforward, so this should end up in the next minor release. Sorry for the delay, got caught up working on stuff for the current release. |
Closed by merging f0eca66 to release-branch.go1.18. |
…ats as uint64 Currently the consistent total allocation stats are managed as uintptrs, which means they can easily overflow on 32-bit systems. Fix this by storing these stats as uint64s. This will cause some minor performance degradation on 32-bit systems, but there really isn't a way around this, and it affects the correctness of the metrics we export. For #52680. Fixes #52689. Change-Id: I8b1926116e899ae9f03d58e0320bcb9264945b3e Reviewed-on: https://go-review.googlesource.com/c/go/+/411495 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
…ats as uint64 Currently the consistent total allocation stats are managed as uintptrs, which means they can easily overflow on 32-bit systems. Fix this by storing these stats as uint64s. This will cause some minor performance degradation on 32-bit systems, but there really isn't a way around this, and it affects the correctness of the metrics we export. For golang#52680. Fixes golang#52689. Change-Id: I8b1926116e899ae9f03d58e0320bcb9264945b3e Reviewed-on: https://go-review.googlesource.com/c/go/+/411495 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
@mknyszek requested issue #52680 to be considered for backport to the next 1.18 minor release.
The text was updated successfully, but these errors were encountered: