Vasfed / heap_dump

ruby gem for dumping heap references
MIT License
91 stars 13 forks source link

Too much to ask? Segfault in experimental Ruby Build #6

Open mrb opened 11 years ago

mrb commented 11 years ago

We're actually running https://github.com/thecodeshop/ruby/tree/tcs-ruby_1_9_3 in production at my day job. Until now I haven't tried to run anything, but I'm getting a segfault around this code: https://github.com/Vasfed/heap_dump/blob/master/ext/heap_dump/heap_dump.c#L1250-L1255 in our Rails app. Any ideas?

Vasfed commented 11 years ago

Sure strongly-patched rubies are not compatible, internal gc structures must match. Actually for already-supported ruby version adding compatibility should be quite simple - see https://github.com/Vasfed/heap_dump/tree/master/ext/heap_dump/specific/ruby-1.9.3 The only weak point is detecting patch set to select proper adapter in extconf

Vasfed commented 11 years ago

Do not have time atm, but i'm pretty sure that is because of some field added to objspace_t or similar. Will look into this in a couple of days if you do not manage to solve this before that.

mrb commented 11 years ago

@Vasfed Thank you!

Vasfed commented 11 years ago

Yep, patch does alter objspace structures a bit. Now i'm considering an automated generator for such cases, this may take some time. In manual mode support probably can be added pretty easily

mrb commented 11 years ago

@Vasfed Thanks! A generator would be awesome. FWIW this implementation is picking up a bit of steam, so if you have some time to patch it, that would be cool.

ppawel commented 11 years ago

This gem causes segfault for me with even simple programs. Ruby version:

ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux]

Vasfed commented 11 years ago

@ppawel p362 has no support yet - unfortunately segfault occurs each time something is changed in internal ruby structures (i'm a little busy atm, generator should solve most problems of this kind), try an older revision of ruby