Giter VIP home page Giter VIP logo

heapdump14's People

Contributors

randall77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

heapdump14's Issues

2015/09/16 23:02:31 unknown record kind 26311

Hi,

I'm using go 1.5.1 and a fork that puts 1.5 in the expected header at https://github.com/cep21/heapdump14 (https://github.com/cep21/heapdump14/commit/1d13a6e5b26f5e2678caa105f22c40041eade8bd)
My program is a simple hello-world like app at https://github.com/cep21/heaptest/blob/master/main.go. I run it, then curl out a heap dump via

  curl localhost:6060/debug/pprof/heapdump > /tmp/heapdump

which is an endpoint I wrote that calls WriteHeapDump().

When I run ./hview /tmp/heapdump ../../heaptest/heaptest I get the following output:

Loading...
2015/09/16 23:07:09 unknown record kind 26311

Trouble with heap dump 1.7

Hi, I am trying to display a 1.7 heap dump using this tool. After some workarounds and fixes, I am struggling to get the types correctly named from the dwarf format.

One thing I don't understand is that the dump contains itabs for packages, e.g. net/http.. These are always single pointer and have the interfaceptr set to true. What are those for? There's no match in dwarf symbols.

I am having further issues with the 1.7 format since the iface/eface info is not present anymore, working on that.

panic at parser.go:1222

Loading...
inferring types...
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x28 pc=0x4db8ee]

goroutine 1 [running]:
github.com/randall77/heapdump14/read.dwarfTypeMap(0xc208060000, 0xc208032c00, 0xc208032c00)
    /home/vmihailenco/workspace/gocode/src/github.com/randall77/heapdump14/read/parser.go:1222 +0xc6e
github.com/randall77/heapdump14/read.typePropagate(0xc208060000, 0x7fffa7d7a11e, 0x1d)
    /home/vmihailenco/workspace/gocode/src/github.com/randall77/heapdump14/read/parser.go:1477 +0x15f
github.com/randall77/heapdump14/read.Read(0x7fffa7d7a0f7, 0x26, 0x7fffa7d7a11e, 0x1d, 0x0)
    /home/vmihailenco/workspace/gocode/src/github.com/randall77/heapdump14/read/parser.go:2097 +0x6d
main.main()
    /home/vmihailenco/workspace/gocode/src/github.com/randall77/heapdump14/hview/main.go:893 +0x1f2
exit status 2

It looks like app panics because you don't handle dwarf.TagCompileUnit when building map[dwarf.Offset]dwarfType. Is this info enough to fix the panic?

interface conversion panic when using with a heapdump generated by a 1.4 compiled application

A panic occurs when using hview against a dump generated by Hugo compiled with 1.4.

The full output:

Loading...
inferring types...
2015/09/18 20:42:00 Type *template.Template is ambiguous.  Could be any of:
2015/09/18 20:42:00   *html/template.Template
2015/09/18 20:42:00   *text/template.Template
2015/09/18 20:42:00 Type *map.hdr[string]*template.Template is ambiguous.  Could be any of:
2015/09/18 20:42:00   *map.hdr[string]*html/template.Template
2015/09/18 20:42:00   *map.hdr[string]*text/template.Template
2015/09/18 20:42:00 Type template.Template is ambiguous.  Could be any of:
2015/09/18 20:42:00   text/template.Template
2015/09/18 20:42:00   html/template.Template
2015/09/18 20:42:00 Type map.iter[string]*template.Template is ambiguous.  Could be any of:
2015/09/18 20:42:00   map.iter[string]*text/template.Template
2015/09/18 20:42:00   map.iter[string]*html/template.Template
2015/09/18 20:42:00 Type map.bucket[string]*template.Template is ambiguous.  Could be any of:
2015/09/18 20:42:00   map.bucket[string]*text/template.Template
2015/09/18 20:42:00   map.bucket[string]*html/template.Template
2015/09/18 20:42:00 Type []*template.Template is ambiguous.  Could be any of:
2015/09/18 20:42:00   []*text/template.Template
2015/09/18 20:42:00   []*html/template.Template
2015/09/18 20:42:00 Type [8]*template.Template is ambiguous.  Could be any of:
2015/09/18 20:42:00   [8]*html/template.Template
2015/09/18 20:42:00   [8]*text/template.Template
2015/09/18 20:42:00 Type template.state is ambiguous.  Could be any of:
2015/09/18 20:42:00   text/template.state
2015/09/18 20:42:00   html/template.state
2015/09/18 20:42:00 Type []val<*template.Template> is ambiguous.  Could be any of:
2015/09/18 20:42:00   []val<*text/template.Template>
2015/09/18 20:42:00   []val<*html/template.Template>
2015/09/18 20:42:00 Type map.hdr[string]*template.Template is ambiguous.  Could be any of:
2015/09/18 20:42:00   map.hdr[string]*html/template.Template
2015/09/18 20:42:00   map.hdr[string]*text/template.Template
2015/09/18 20:42:00 Type *map.bucket[string]*template.Template is ambiguous.  Could be any of:
2015/09/18 20:42:00   *map.bucket[string]*text/template.Template
2015/09/18 20:42:00   *map.bucket[string]*html/template.Template
2015/09/18 20:42:00 Type template.FuncMap is ambiguous.  Could be any of:
2015/09/18 20:42:00   text/template.FuncMap
2015/09/18 20:42:00   html/template.FuncMap
2015/09/18 20:42:00 Type map[string]*template.Template is ambiguous.  Could be any of:
2015/09/18 20:42:00   map[string]*html/template.Template
2015/09/18 20:42:00   map[string]*text/template.Template
2015/09/18 20:42:00 Type *template.state is ambiguous.  Could be any of:
2015/09/18 20:42:00   *text/template.state
2015/09/18 20:42:00   *html/template.state
2015/09/18 20:42:00 Type **template.Template is ambiguous.  Could be any of:
2015/09/18 20:42:00   **html/template.Template
2015/09/18 20:42:00   **text/template.Template
panic: interface conversion: read.dwarfType is *read.dwarfBaseType, not *read.dwarfPtrType

goroutine 1 [running]:
github.com/randall77/heapdump14/read.typePropagate(0xc20805e000, 0x7fff7c06f517, 0x18)
    /home/asd/code/go/src/github.com/randall77/heapdump14/read/parser.go:1546 +0x2598
github.com/randall77/heapdump14/read.Read(0x7fff7c06f4f6, 0x20, 0x7fff7c06f517, 0x18, 0x0)
    /home/asd/code/go/src/github.com/randall77/heapdump14/read/parser.go:2120 +0x6d
main.main()
    /home/asd/code/go/src/github.com/randall77/heapdump14/hview/main.go:893 +0x1f2

index out of range at parser.go in readPtr

Loading...
panic: runtime error: index out of range

goroutine 1 [running]:
encoding/binary.littleEndian.Uint64(0x4c208457468, 0x0, 0x0, 0x4c20814fbc0)
        /usr/lib/google-golang/src/encoding/binary/binary.go:71 +0x11c
encoding/binary.(*littleEndian).Uint64(0x9a5ed8, 0x4c208457468, 0x0, 0x0, 0x4c20814fbc0)
        <autogenerated>:12 +0xb5
github.com/randall77/heapdump14/read.readPtr(0x4c20805e000, 0x4c208457468, 0x0, 0x0, 0x4eb650)
        /home/aababilov/go/src/github.com/randall77/heapdump14/read/parser.go:2116 +0xc0
github.com/randall77/heapdump14/read.(*Dump).appendEdge(0x4c20805e000, 0x0, 0x0, 0x0, 0x4c208457468, 0x8, 0x8, 0x8, 0x2, 0x0, ...)
        /home/aababilov/go/src/github.com/randall77/heapdump14/read/parser.go:1384 +0xb9
github.com/randall77/heapdump14/read.(*Dump).appendFields(0x4c20805e000, 0x0, 0x0, 0x0, 0x4c208457468, 0x8, 0x8, 0x4c20847c210, 0x1, 0x1, ...)
        /home/aababilov/go/src/github.com/randall77/heapdump14/read/parser.go:1439 +0x5fc
github.com/randall77/heapdump14/read.link2(0x4c20805e000)
        /home/aababilov/go/src/github.com/randall77/heapdump14/read/parser.go:1930 +0xf5
github.com/randall77/heapdump14/read.Read(0x7fffd5d46b86, 0x34, 0x0, 0x0, 0x0)
        /home/aababilov/go/src/github.com/randall77/heapdump14/read/parser.go:2103 +0xab
main.main()
        /home/aababilov/go/src/github.com/randall77/heapdump14/hview/main.go:893 +0x1f2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.