-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: index out of bounds crash #33802
Comments
The panic happens in x/arch/x86/x86asm package in the x/arch repo. I think this has been fixed in CL https://go-review.googlesource.com/c/arch/+/155939 in the x/arch repo, but it seems that it hasn't been vendored into the Go main repo yet. Also, google/pprof#450 is probably related. It perhaps shouldn't get there in the first place. |
Thank you for the report @howardjohn and for tracking it down @cherrymui! @cherrymui might you have the bandwidth to vendor that change? I'll help with quickly getting things moving. However, this perhaps might be a tricky vendoring because the last change to cmd/vendor/ was @bcmills' update in CL https://go-review.googlesource.com/c/go/+/164618 which featured code that removed the file cmd/vendor/golang.org/x/arch/x86/x86asm/decode_test.go yet the CL to fix the 3 panics has a test added to that file as per https://go-review.googlesource.com/c/arch/+/155939/3/x86/x86asm/decode_test.go Also /cc @andybons @dmitshur as we'll need to put the vendored x/arch/x86/x86asm back into the main Go repo for Go1.13 and perhaps a release candidate. |
I can give it a try. I have never done updating vendor directory since we switched to modules. I'll need to find out how to do that. |
Change https://golang.org/cl/191619 mentions this issue: |
As a reminder, if we want this fix to become a part of the final Go 1.13 release, we'll also need to backport it from |
@gopherbot, please backport to 1.13. |
Backport issue(s) opened: #33811 (for 1.13). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/191737 mentions this issue: |
…70ba74b3a1 Update vendored x/arch repo to pick up the fix of issue #33802. This is done with the following commands: $ cd $GOROOT/src/cmd $ go get -d golang.org/x/arch@latest go: finding golang.org/x/arch latest go: downloading golang.org/x/arch v0.0.0-20190815191158-8a70ba74b3a1 go: extracting golang.org/x/arch v0.0.0-20190815191158-8a70ba74b3a1 $ go mod tidy $ go mod vendor Updates #33802. Fixes #33811. Change-Id: I0a44f1d83d6f573124cea1f099378b1c851f3feb Reviewed-on: https://go-review.googlesource.com/c/go/+/191619 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> (cherry picked from commit 66ff373) Reviewed-on: https://go-review.googlesource.com/c/go/+/191737 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Update vendored x/arch repo to pick up the fix of issue golang#33802. This is done with the following commands: $ cd $GOROOT/src/cmd $ go get -d golang.org/x/arch@latest go: finding golang.org/x/arch latest go: downloading golang.org/x/arch v0.0.0-20190815191158-8a70ba74b3a1 go: extracting golang.org/x/arch v0.0.0-20190815191158-8a70ba74b3a1 $ go mod tidy $ go mod vendor Fixes golang#33802. Change-Id: I0a44f1d83d6f573124cea1f099378b1c851f3feb Reviewed-on: https://go-review.googlesource.com/c/go/+/191619 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, also tested with
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
First, captured a heap profile of an application. The profile is pretty large, 94kb (I think that is large at least...). Then ran
go tool pprof --http
and went to the source tab. Website displaysERR_EMPTY_RESPONSE
and I see crashes in the pprof tool.Crash Logs
With Go 1.12
With go 1.13 rc1:
Here is the attached profile, hopefully reproducible on other systems:
pprof.pilot-discovery.alloc_objects.alloc_space.inuse_objects.inuse_space.033.pb.gz
The text was updated successfully, but these errors were encountered: