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
cmd/compile: changing a hot concrete method to interface method triggers a PGO ICE #67016
Comments
@gopherbot Please backport to 1.22. These compiler failures can happen across otherwise benign refactors, where the profile was collected prior to the refactor. |
cc @cherrymui |
Backport issue(s) opened: #67017 (for 1.22). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Change https://go.dev/cl/581437 mentions this issue: |
Change https://go.dev/cl/581436 mentions this issue: |
If there is a crash in LookupFunc (which has occurred a few times now), this ensures that we log the offending symbol before crashing. For #67016. Change-Id: I0119597de2be3d1b97c41a9361273d1feb90ec11 Reviewed-on: https://go-review.googlesource.com/c/go/+/581437 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change https://go.dev/cl/581438 mentions this issue: |
…ace types Interface types don't have concrete method implementations, so it does not make sense to attempt a lookup. An interface method would not normally appear in a PGO profile as it has no symbol in the final binary. However it can appear if the method was concrete when the profile was collected and it has since been refactored to an interface method in the code being compiled. The guards here (OTYPE, !Alias, !IsInterface) now match noder.linker.relocObj, which does a similar iteration of all methods. For #67016. Fixes #67017. Change-Id: I858c58929c890ac0b2019fbd7c99f683ab63f8bb Reviewed-on: https://go-review.googlesource.com/c/go/+/581436 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> (cherry picked from commit 508e761) Reviewed-on: https://go-review.googlesource.com/c/go/+/581438
Go version
go version go1.22.2 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Run this program to generate
/tmp/cpu.pprof
:Now change
Type
to an interface type. For example:Then build with PGO:
What did you see happen?
What did you expect to see?
No ICE
The text was updated successfully, but these errors were encountered: