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

cmd/pprof: starting pprof with -call_tree makes it panic on top #19380

Closed
ALTree opened this issue Mar 3, 2017 · 4 comments
Closed

cmd/pprof: starting pprof with -call_tree makes it panic on top #19380

ALTree opened this issue Mar 3, 2017 · 4 comments
Milestone

Comments

@ALTree
Copy link
Member

@ALTree ALTree commented Mar 3, 2017

go version devel +4775b7feb1 Thu Mar 2 23:49:32 2017 +0000 linux/amd64

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/adonizetti/gocode"
GORACE=""
GOROOT="/home/adonizetti/go"
GOTOOLDIR="/home/adonizetti/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build965176492=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

Open any pprof (big enough) profile with the "call_tree" option activated:

$ gotip tool pprof -call_tree cpu.prof

issue a top command:

(pprof) top
panic: TrimTree only works on trees

goroutine 1 [running]:
cmd/vendor/github.com/google/pprof/internal/graph.(*Graph).TrimTree(0xc420451c40, 0xc4203d5080)
	/home/adonizetti/go/src/cmd/vendor/github.com/google/pprof/internal/graph/graph.go:431 +0x64b
cmd/vendor/github.com/google/pprof/internal/report.(*Report).newTrimmedGraph(0xc420451ac0, 0x184, 0x840ee824000a0600, 0xc42046c500, 0x0)
	/home/adonizetti/go/src/cmd/vendor/github.com/google/pprof/internal/report/report.go:139 +0x134
cmd/vendor/github.com/google/pprof/internal/report.printText(0xaa4c40, 0xc42010c000, 0xc420451ac0, 0xc42004bb08, 0x7a2570)
	/home/adonizetti/go/src/cmd/vendor/github.com/google/pprof/internal/report/report.go:682 +0x43
cmd/vendor/github.com/google/pprof/internal/report.Generate(0xaa4c40, 0xc42010c000, 0xc420451ac0, 0xaa7780, 0xc42012e8c0, 0x0, 0x0)
	/home/adonizetti/go/src/cmd/vendor/github.com/google/pprof/internal/report/report.go:94 +0x2e0
cmd/vendor/github.com/google/pprof/internal/driver.generateReport(0xc420268280, 0xc42037d950, 0x1, 0x1, 0xc4203e6e70, 0xc420071560, 0xc4203e6e70, 0x0)
	/home/adonizetti/go/src/cmd/vendor/github.com/google/pprof/internal/driver/driver.go:99 +0x246
cmd/vendor/github.com/google/pprof/internal/driver.interactive(0xc420154b40, 0xc420071560, 0xc420154b40, 0x0)
	/home/adonizetti/go/src/cmd/vendor/github.com/google/pprof/internal/driver/interactive.go:111 +0x62e
cmd/vendor/github.com/google/pprof/internal/driver.PProf(0xc42004be40, 0x0, 0x0)
	/home/adonizetti/go/src/cmd/vendor/github.com/google/pprof/internal/driver/driver.go:55 +0x154
cmd/vendor/github.com/google/pprof/driver.PProf(0xc42004bf18, 0xc42012e8b0, 0xc420156540)
	/home/adonizetti/go/src/cmd/vendor/github.com/google/pprof/driver/driver.go:32 +0x1c7
main.main()
	/home/adonizetti/go/src/cmd/pprof/pprof.go:34 +0xbe

This does not happen on go1.8

@ALTree ALTree added this to the Go1.9 milestone Mar 3, 2017
@ALTree
Copy link
Member Author

@ALTree ALTree commented Mar 3, 2017

(Opened google/pprof#103 for this)

@gopherbot
Copy link

@gopherbot gopherbot commented Jun 20, 2017

CL https://golang.org/cl/46155 mentions this issue.

@gopherbot gopherbot closed this in 3d13b5e Jun 20, 2017
@ALTree
Copy link
Member Author

@ALTree ALTree commented Jul 26, 2017

The CL that fixed this was reverted. Re-opening for go1.10.

@ALTree ALTree reopened this Jul 26, 2017
@ALTree ALTree modified the milestones: Go1.10, Go1.9 Jul 26, 2017
@gopherbot
Copy link

@gopherbot gopherbot commented Aug 22, 2017

Change https://golang.org/cl/57370 mentions this issue: cmd/vendor/github.com/google/pprof: refresh from upstream

@gopherbot gopherbot closed this in aec345d Nov 2, 2017
@golang golang locked and limited conversation to collaborators Nov 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.