randall77 / hprof

Heap profile reader for Go
The Unlicense
85 stars 7 forks source link

dumptohprof: panics #2

Closed bmizerany closed 10 years ago

bmizerany commented 10 years ago

I got the latest source and built dumptohprof. When I run it I get a panic:

$ dumptohprof heapdump etcd.test out.prof
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x6eece]

goroutine 16 [running]:
runtime.panic(0x18be20, 0x29af64)
    /usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
github.com/randall77/hprof/read.nameWithDwarf(0x208310240, 0x7fff5fbffb8d, 0x9)
    /Users/bmizerany/src/github.com/randall77/hprof/read/parser.go:1371 +0xf5e
github.com/randall77/hprof/read.Read(0x7fff5fbffb84, 0x8, 0x7fff5fbffb8d, 0x9, 0x1)
    /Users/bmizerany/src/github.com/randall77/hprof/read/parser.go:1606 +0x5e
main.main()
    /Users/bmizerany/src/github.com/randall77/hprof/dumptohprof/main.go:108 +0xbe1

goroutine 19 [finalizer wait]:
runtime.park(0x29520, 0x29eed0, 0x29e289)
    /usr/local/go/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0x29eed0, 0x29e289)
    /usr/local/go/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
    /usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
    /usr/local/go/src/pkg/runtime/proc.c:1445

The binary and heapdump are here: http://cl.ly/3h1r3H020i0P

Am I doing something wrong?

bmizerany commented 10 years ago

BTW: I'm running:

$ go version
go version go1.3 darwin/amd64
$ uname -a
Darwin Blakes-MacBook-Air-2.local 13.3.0 Darwin Kernel Version 13.3.0: Mon Jul 14 17:54:21 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64

My kernel is patch with: http://research.swtch.com/macpprof

randall77 commented 10 years ago

Looks like my fault. An extra field was added to the stack frame record late in 1.3, and I forgot to add it to the parser. I've just fixed it, pull and try again.

On Fri, Jul 18, 2014 at 2:47 PM, Blake Mizerany notifications@github.com wrote:

BTW: I'm running:

$ go version go version go1.3 darwin/amd64 $ uname -a Darwin Blakes-MacBook-Air-2.local 13.3.0 Darwin Kernel Version 13.3.0: Mon Jul 14 17:54:21 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64

My kernel is patch with: http://research.swtch.com/macpprof

— Reply to this email directly or view it on GitHub https://github.com/randall77/hprof/issues/2#issuecomment-49483365.

bmizerany commented 10 years ago

Working. Thank you! This is a huge help.