[johnson-talk] ruby 1.9.1 compatibility

31 views
Skip to first unread message

Toby Hede

unread,
Apr 15, 2010, 10:55:32 PM4/15/10
to Johnson
I am working with Rails 3 and Ruby 1.9.1 and wondering what the status
for ruby 1.9.1 compatibility is?

Installation fails when building the native components:

In file included from conversions.c:2:
js_land_proxy.h:11:18: error: node.h: No such file or directory

What can I do to help out?


--
Subscription settings: http://groups.google.com/group/johnson-talk/subscribe?hl=en

Steven Parkes

unread,
Apr 23, 2010, 6:34:49 PM4/23/10
to johnso...@googlegroups.com
> I am working with Rails 3 and Ruby 1.9.1 and wondering what the status
> for ruby 1.9.1 compatibility is?

There's not been a lot work on 1.9.1. Since I've always wondered, I looked at it:

1) node.h is no longer in the public API. To the extent I can tell, there's only one case we look into the node and that I can't figure out a way to do via the public API. It's the case where we examin if a method is in fact an attribute, e.g., the body of the method is an IVAR. I hacked this to work in the 1.9.1 branch I just pushed. Yeah, it's gross, but I wanted to see how far we could get if that weren't an issue. I thought maybe if we could get everything else to work, we might do something like ask the Ruby folks if they could expose this for us. (I can think of other ways to do this, though I think they might be hideously slow ... and maybe wouldn't work anyway).

2) Judging by what gdb says it's creating threads (running the tests), which is kinda expected. But ...

3) The gc seems to fail, which might or might not be related to threads. I've appended the stack trace. The table argument in the st_lookup looks like it's been trashed.

I'm not sure if we have a prayer here. We've always avoided threads. But I'm not sure why kernel threads should be different from green threads, as long as we do everything from a single thread.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fb00b88b6f0 (LWP 8799)]
0x00000000004980c8 in st_lookup (table=0xa5fe30, key=18328, value=0x7fff0164b540) at st.c:297
297 hash_val = do_hash(key, table);
(gdb) bt
#0 0x00000000004980c8 in st_lookup (table=0xa5fe30, key=18328, value=0x7fff0164b540) at st.c:297
#1 0x00000000004d341f in search_method (klass=10512712, id=18328, klassp=0x0) at vm_method.c:229
#2 0x00000000004d3483 in rb_get_method_body (klass=18328, id=18328, idp=0x7fff0164b5d0) at vm_method.c:256
#3 0x00000000004d6a53 in rb_call0 (klass=18328, recv=10512824, mid=18328, argc=1, argv=0x7fff0164b620, scope=1, self=6) at vm_eval.c:205
#4 0x00000000004d72ae in rb_funcall (recv=<value optimized out>, mid=18328, n=1) at vm_eval.c:255
#5 0x00007fb009f4eea3 in object_hook (js=0x188cdb0, obj=0xf37580, isNew=0, rb=0xa069b8) at ../../../../ext/tracemonkey/debugger.cc:171
#6 0x00007fb009f98d39 in js_GC () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#7 0x00007fb009f6c69f in js_DestroyContext () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#8 0x00007fb009f4cd7e in deallocate (runtime=0x1796570) at ../../../../ext/tracemonkey/runtime.cc:481
#9 0x000000000041ef17 in run_final (objspace=0x786720, obj=11441584) at gc.c:2351
#10 0x000000000041f0c7 in finalize_list (objspace=0x786720, p=0xae95b0) at gc.c:1662
#11 0x000000000041f10a in gc_finalize_deferred (objspace=0x4798) at gc.c:2377
#12 0x00000000004e96a5 in rb_thread_execute_interrupts_rec (th=0x7aa500, sched_depth=0) at thread.c:1237
#13 0x00000000004df605 in vm_exec_core (th=0x7aa500, initial=<value optimized out>) at insns.def:1066
#14 0x00000000004dfc43 in vm_exec (th=0x7aa500) at vm.c:1080
#15 0x00000000004e0c6c in eval_string_with_cref (self=8567776, src=8045800, scope=4, cref=0x0, file=0x543168 "(eval)", line=<value optimized out>) at vm_eval.c:763
#16 0x00007fb009f4e460 in Johnson_TraceMonkey_JSLandProxy () at ../../../../ext/tracemonkey/context.cc:136
#17 0x00007fb009f3c594 in call (js_context=0x16c9820, UNUSED_obj=0x1290000, argc=2, argv=0x1293218, retval=0x7fff0164c0d8) at ../../../../ext/tracemonkey/js_land_proxy.cc:549
#18 0x00007fb009f9cf41 in js_Invoke () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#19 0x00007fb00a014478 in js_Interpret () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#20 0x00007fb009f9d3d8 in js_Invoke () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#21 0x00007fb009f63d63 in array_extra () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#22 0x00007fb00a01a570 in js_Interpret () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#23 0x00007fb009f9d3d8 in js_Invoke () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#24 0x00007fb009f9d8cb in js_InternalInvoke () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#25 0x00007fb009f5a673 in JS_CallFunctionName () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#26 0x00007fb009f3d2d2 in make_js_land_proxy (runtime=0x11c83e0, value=13841464, retval=0x7fff0164d748) at ../../../../ext/tracemonkey/js_land_proxy.cc:653
#27 0x00007fb009f4070f in convert_to_js (runtime=0x11c83e0, ruby=13841464, retval=0x7fff0164d748) at ../../../../ext/tracemonkey/conversions.cc:148
#28 0x00007fb009f39fa3 in call_ruby_from_js (runtime=0x11c83e0, retval=0x7fff0164d748, self=8595328, id=1080, argc=1) at ../../../../ext/tracemonkey/js_land_proxy.cc:90
#29 0x00007fb009f3e231 in get (js_context=0x16c9820, obj=0x1290b00, id=19452180, retval=0x7fff0164d748) at ../../../../ext/tracemonkey/js_land_proxy.cc:283
#30 0x00007fb009fa8c0e in js_GetPropertyHelper () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#31 0x00007fb00a013a30 in js_Interpret () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#32 0x00007fb009f9c2d2 in js_Execute () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#33 0x00007fb009f58a76 in JS_ExecuteScript () from /home/collegeterrace/smparkes/johnson/lib/johnson/tracemonkey/tracemonkey.so
#34 0x00007fb009f4ddce in evaluate_compiled_script (self=9186632, compiled_script=8178352, ruby_scope=4) at ../../../../ext/tracemonkey/runtime.cc:225
#35 0x00000000004d4c50 in vm_call_cfunc (th=0x7aa500, reg_cfp=0x7fb00b889830, num=2, id=17992, oid=14496, recv=9186632, klass=11806312, flag=8, mn=0xb41d00, blockptr=0x0) at vm_insnhelper.c:384
#36 0x00000000004d9cb0 in vm_call_method (th=0x7fff0164b740, cfp=0x7fb00b889830, num=2, blockptr=0x0, flag=8, id=17992, mn=0xb1e5c8, recv=9186632) at vm_insnhelper.c:517
#37 0x00000000004dac84 in vm_exec_core (th=0x7aa500, initial=<value optimized out>) at insns.def:999
#38 0x00000000004dfc43 in vm_exec (th=0x7aa500) at vm.c:1080
#39 0x00000000004d6e12 in rb_call0 (klass=11806312, recv=9186632, mid=<value optimized out>, argc=0, argv=0x7fb00b78a1e8, scope=<value optimized out>, self=6) at vm_eval.c:57
#40 0x00000000004d9937 in rb_funcall2 (recv=<value optimized out>, mid=<value optimized out>, argc=<value optimized out>, argv=<value optimized out>) at vm_eval.c:255
#41 0x0000000000441012 in rb_class_new_instance (argc=0, argv=0x7fb00b78a1e8, klass=<value optimized out>) at object.c:1482
#42 0x00000000004d4c50 in vm_call_cfunc (th=0x7aa500, reg_cfp=0x7fb00b889a70, num=0, id=960, oid=960, recv=11806312, klass=8595104, flag=136, mn=0x82c9a8, blockptr=0x0) at vm_insnhelper.c:384
#43 0x00000000004d9cb0 in vm_call_method (th=0x7fff0164b740, cfp=0x7fb00b889a70, num=0, blockptr=0x0, flag=136, id=960, mn=0x82c970, recv=11806312) at vm_insnhelper.c:517
#44 0x00000000004dd0b6 in vm_exec_core (th=0x7aa500, initial=<value optimized out>) at insns.def:1026
#45 0x00000000004dfc43 in vm_exec (th=0x7aa500) at vm.c:1080
#46 0x00000000004e0347 in invoke_block_from_c (th=0x20, block=0x7fb00b889d38, self=17831072, argc=1, argv=<value optimized out>, blockptr=0x0, cref=0x0) at vm.c:524
#47 0x00000000004e135c in rb_yield (val=10238144) at vm.c:554
#48 0x00000000004f0cd5 in rb_ary_each (ary=10237696) at array.c:1351
#49 0x00000000004d4c50 in vm_call_cfunc (th=0x7aa500, reg_cfp=0x7fb00b889d10, num=0, id=424, oid=424, recv=10237696, klass=8447040, flag=0, mn=0x80d0c8, blockptr=0x7fb00b889d38)
at vm_insnhelper.c:384
#50 0x00000000004d9cb0 in vm_call_method (th=0x7fff0164b740, cfp=0x7fb00b889d10, num=0, blockptr=0x7fb00b889d38, flag=0, id=424, mn=0x80d090, recv=10237696) at vm_insnhelper.c:517
#51 0x00000000004dac84 in vm_exec_core (th=0x7aa500, initial=<value optimized out>) at insns.def:999
#52 0x00000000004dfc43 in vm_exec (th=0x7aa500) at vm.c:1080
#53 0x00000000004e0347 in invoke_block_from_c (th=0x20, block=0x7fb00b889e58, self=17831072, argc=1, argv=<value optimized out>, blockptr=0x0, cref=0x0) at vm.c:524
#54 0x00000000004e135c in rb_yield (val=14630560) at vm.c:554
#55 0x00000000004f0cd5 in rb_ary_each (ary=17555944) at array.c:1351
#56 0x00000000004d4c50 in vm_call_cfunc (th=0x7aa500, reg_cfp=0x7fb00b889e30, num=0, id=424, oid=424, recv=17555944, klass=8447040, flag=0, mn=0x80d0c8, blockptr=0x7fb00b889e58)
at vm_insnhelper.c:384
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb)
Reply all
Reply to author
Forward
0 new messages