Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Agent/heap_dump problems #1933

Closed
hosiawak opened this Issue · 1 comment

3 participants

@hosiawak
Collaborator

I can't make agent/heap dump work at all for some reason, various issues (current master):

  • On OS X Mountain Lion:

    ./bin/rbx -Xagent.start

(in another terminal):

./bin/rbx console

won't connect, just hangs

  • On Ubuntu 12.04 I can connect to the agent but when I run:

    set system.memory.dump heap.dump

I can't read the heap.dump file using https://github.com/evanphx/heap_dump (according to instructions on http://rubini.us/doc/en/tools/memory-analysis/ ), I get:

An exception occurred running /root/heap_dump/bin/histo.rb
undefined method `as_module' on nil:NilClass. (NoMethodError)

Backtrace:
Kernel(NilClass)#as_module (method_missing) at kernel/delta/kernel.rb:81
Rubinius::HeapDump::DumpedObject#direct_class_object at /root/heap_dump/lib/heap_dump/dumped_object.rb:51
Rubinius::HeapDump::DumpedObject#class_object at /root/heap_dump/lib/heap_dump/dumped_object.rb:66
{ } in Rubinius::HeapDump::Histogram.by_class at /root/heap_dump/lib/heap_dump/histogram.rb:37
Array#each at kernel/bootstrap/array.rb:68
Rubinius::HeapDump::Histogram.by_class at /root/heap_dump/lib/heap_dump/histogram.rb:37
Rubinius::HeapDump::Objects#histogram at /root/heap_dump/lib/heap_dump/objects.rb:13
Object#script at /root/heap_dump/bin/histo.rb:21
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:68
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:110
Rubinius::Loader#script at kernel/loader.rb:614
Rubinius::Loader#main at kernel/loader.rb:817

  • The heap.dump file is not always created, it is created always only when I start just rbx without loading any gems. It isn't created if I load Chef and lots of other things and run chef-client (I'll try to provide a repro)

Can anyone else confirm any of the above please ?

Thanks

@dbussink dbussink referenced this issue from a commit
@dbussink dbussink Trigger a wakeup after setting up the listening socket for the agent
This fixes the problem on OS X where opening an agent console would just
hang. Related to #1933.
32c35a4
@blewa

I'm also running into this with both rubinius 2.0.0dev (1.8.7 78652b5 yyyy-mm-dd JI) and rubinius 1.2.4 (1.8.7 release 2011-07-05 JI) in Ubuntu 12.04 when trying to run the analysis. I'm able to take dumps without issue in 2.0.0dev in Ruby 1.9 mode.

@dbussink dbussink closed this issue from a commit
@dbussink dbussink Fix initialization ordering in ontology
Encoding needs a lot of the infrastructure in place to initialize. One
important thing is that it needs structures such as CompactLookupTable
for instance variables ready. Before Encoding was initialized before
this, resulting in a CompactLookupTable that had 0x22 as it's class
pointer.

This was exposed when doing a heap dump, which then crashed because it
couldn't find any class for that invalid 0x22 pointer value. Reordering
in the ontology makes sure we setup stuff in the right order.

Fixes #1933
9288335
@dbussink dbussink closed this in 9288335
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.