-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/pprof: graphviz node names are funny with generics #54105
Comments
I wonder if google/pprof#689 will address this. I’m skeptical though, as bad escaping should most likely cause parse errors. |
No, this seems to be different. In pprof, the type name is |
There is an even worse case with |
Fix in google/pprof#717 |
Change https://go.dev/cl/420234 mentions this issue: |
Thank you for filing this bug @bradfitz and for the quick response and fix @prattmic! I think fixing this for Go1.19 is useful as it is just updating the dependency. I have sent a CL vendoring the fix in https://go-review.googlesource.com/c/go/+/420234. @ianlancetaylor @rsc can I kindly implore you to let this fly in the Go1.19 release :-) or perhaps should we wait until the next point release and also backport too? |
cc @golang/release This would be nice to have in 1.19 or 1.19.1 (arguably backported to 1.18 too), but I am not sure we want to pull this in so close to the release. FWIW, this does have a clear workaround: use upstream pprof. |
This isn't going to make it into 1.19, but we can consider it for 1.19.1 (I'm personally still a bit unsure since there is a workaround). |
I'll move this issue to Go 1.20 milestone since the fix will need to land on master branch first. To address this issue for minor releases, we'd need to use the https://go.dev/wiki/MinorReleases process to create children backport issues. |
…bol names Updates github.com/google/pprof to bring in the commit from google/pprof#717 which fixes mangled symbol names for type parameters. Fixes golang#54105 Change-Id: I01af9f780aba3338b960a03b30906a23642e4448 Reviewed-on: https://go-review.googlesource.com/c/go/+/420234 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Emmanuel Odeke <[email protected]> Reviewed-by: Than McIntosh <[email protected]>
@gopherbot Please backport to 1.19. This fix just barely missed 1.19. While it does have a workaround (use upstream pprof instead of go tool pprof), that is unlikely to be clear to users, and the fix is simple. |
Backport issue(s) opened: #54420 (for 1.19). 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/423356 mentions this issue: |
@prattmic The backporting approach described in #34536 (comment) suggests we'll need to also backport the fix to 1.18, since the problem also exists in that version. |
Sure, I can do so. Do we have a standard process for backporting one-off fixes to vendored packages, rather than wholesale updates? I can easily manually apply the appropriate changes to the vendored pprof files, but what should go.mod say? The vendored code will no longer be any valid upstream version of github.com/google/pprof. |
I don't see any such similar cases on https://go-review.git.corp.google.com/q/project:go+is:merged+file:vendor+-branch:master+-branch:dev.link+-branch:dev.boringcrypto+-branch:dev.typeparams+-branch:dev.fuzz. :( A full update of pprof on release-branch.go1.18 will pull in 20 commits:
|
We have a standard process that applies to golang.org/x dependencies. It uses "internal-branch.go1.x-vendor" branches and is documented at https://go.dev/wiki/MinorReleases#cherry-pick-cls-for-vendored-golangorgx-packages. This is the first backport request for a problem in the github.com/google/pprof dependency that I'm seeing, so not sure. Depending on how much the vendored github.com/google/pprof interacts with cmd/pprof and other parts of the standard library, it might be safest to update it to the same v0.0.0-20220729232143-a41b82acbcb1 version (that way, Go 1.19 and 1.18 will be using the same version). If that isn't safe, we'll need to figure out what to do instead. |
I can take a closer look tomorrow, but I don't think there are any technical blockers (or any changes to non-vendored code required) to updating pprof to |
@gopherbot Please backport to 1.18. While it does have a workaround (use upstream pprof instead of go tool pprof), that is unlikely to be clear to users. |
Change https://go.dev/cl/423576 mentions this issue: |
…0-20220729232143-a41b82acbcb1 Update the vendored copy of github.com/google/pprof to include the fix for #54105. pprof's go.mod specifies an upgrade to x/sys, thus we must also update std's x/sys to match this version. For #54105. Fixes #54464. Change-Id: I0ca4f338b3ec3e8c54a892eb684a5dd3af8d7f1b Reviewed-on: https://go-review.googlesource.com/c/go/+/423576 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Michael Pratt <[email protected]>
…ngled type parameter symbol names Updates github.com/google/pprof to bring in the commit from google/pprof#717 which fixes mangled symbol names for type parameters. For #54105 Fixes #54420 Change-Id: I01af9f780aba3338b960a03b30906a23642e4448 Reviewed-on: https://go-review.googlesource.com/c/go/+/420234 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Emmanuel Odeke <[email protected]> Reviewed-by: Than McIntosh <[email protected]> (cherry picked from commit cd9cd92) Reviewed-on: https://go-review.googlesource.com/c/go/+/423356 Run-TryBot: Michael Pratt <[email protected]> Reviewed-by: Emmanuel Odeke <[email protected]>
…ngled type parameter symbol names Updates github.com/google/pprof to bring in the commit from google/pprof#717 which fixes mangled symbol names for type parameters. For golang#54105 Fixes golang#54420 Change-Id: I01af9f780aba3338b960a03b30906a23642e4448 Reviewed-on: https://go-review.googlesource.com/c/go/+/420234 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Emmanuel Odeke <[email protected]> Reviewed-by: Than McIntosh <[email protected]> (cherry picked from commit cd9cd92) Reviewed-on: https://go-review.googlesource.com/c/go/+/423356 Run-TryBot: Michael Pratt <[email protected]> Reviewed-by: Emmanuel Odeke <[email protected]>
Go 1.18.3.
Not sure what I expect when I use `go tool pprof's web mode to see the graphviz SVG output on a node using generics, but not this:
Either without the newlines, or with the concrete types (if/when available)?
FWIW, that's from:
The text was updated successfully, but these errors were encountered: