From: Rolando Abarca Date: 2009-08-14T01:46:45+09:00 Subject: [ruby-core:24917] Re: embedding ruby 1.9 frustration On Thu, Aug 13, 2009 at 12:18 PM, Caleb Clausen wrote: > > I think this may be the right track. You've got a lot of async stuff > happening on top of the ruby vm, and even tho you have only one thread, > threads aren't the only possible source of reentrancy problems. Maybe you > could try some logging to figure out what async events are happening right > before it goes sour, and what state the vm is in when they happen...? Ok... I think I got it: this is what my sc_funcall used to look (wrap around rb_funcall used with rb_protect): VALUE sc_funcall(struct sc_funcall_param *param) { if (rb_obj_respond_to(param->recv, param->method_id, Qfalse)) return rb_funcall3(param->recv, param->method_id, param->n, param->argv); return Qnil; } after removing rb_obj_respond_to I got it running smooth all the time. Maybe rb_obj_respond_to is not "signal-safe"? It's been running for about 20 minutes no crash so far. -- Rolando Abarca http://rolando.cl