I''ve opened a ticket about this: http://rubyeventmachine.com/ticket/98 Didn''t see any activity, so I''ll post the to list also. Ruby: ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] OSX: Darwin boblaptop.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 EM: eventmachine-0.12.2 I get similar crashes with 1.9.1-rc2 and REE. Can provide backtraces for those if necessary. I''m trying to add non-blocking networking to net-ssh. I''m using a combination of EM and Neverblock to achieve this. Currently I''m hacking net-ssh to use NB to yield the current fiber whenever there is a blocking network read. The socket(s) are registered with EM, and upon callback I un-register the socket(s) and resume the fiber. Seems all to be working well until ruby crashes. Here is the GDB backtrace: This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries .... done /Users/bcotton/projects/usage_warehouse/37828: No such file or directory. Attaching to program: `/usr/bin/ruby'', process 37828. Reading symbols for shared libraries +++..................... done 0x934fc6f2 in select$DARWIN_EXTSN () (gdb) c Continuing. Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000008 0x003aaf2d in EventMachine_t::_RunSelectOnce () (gdb) bt #0 0x003aaf2d in EventMachine_t::_RunSelectOnce () #1 0x003ab131 in EventMachine_t::_RunOnce () #2 0x003ab31a in EventMachine_t::Run () #3 0x003a0989 in evma_run_machine () #4 0x003af1f3 in t_run_machine_without_threads () #5 0x000da14c in rb_eval_string_wrap () #6 0x000dad2a in rb_eval_string_wrap () #7 0x000d809a in rb_eval_string_wrap () #8 0x000d7694 in rb_eval_string_wrap () #9 0x000da91f in rb_eval_string_wrap () #10 0x000dad2a in rb_eval_string_wrap () #11 0x000d809a in rb_eval_string_wrap () #12 0x000d70d7 in rb_eval_string_wrap () #13 0x000e702e in rb_load_protect () #14 0x000e705f in ruby_exec () #15 0x000e708b in ruby_run () #16 0x00001fff in main () (gdb) How would you like to proceed? I can supply gems etc to reproduce. Thanks -Bob
ok, nevermind. Just pulled head from git. no crash. Sorry about the wasted bandwidth. -bob On Tue, Jan 27, 2009 at 12:35 PM, Bob Cotton <bob.cotton at gmail.com> wrote:> I''ve opened a ticket about this: http://rubyeventmachine.com/ticket/98 > Didn''t see any activity, so I''ll post the to list also. > > Ruby: ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] > OSX: Darwin boblaptop.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov > 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 > EM: eventmachine-0.12.2 > > I get similar crashes with 1.9.1-rc2 and REE. Can provide backtraces > for those if necessary. > > I''m trying to add non-blocking networking to net-ssh. I''m using a > combination of EM and Neverblock to achieve this. Currently I''m > hacking net-ssh to use NB to yield the current fiber whenever there is > a blocking network read. The socket(s) are registered with EM, and > upon callback I un-register the socket(s) and resume the fiber. > > Seems all to be working well until ruby crashes. Here is the GDB backtrace: > This GDB was configured as "i386-apple-darwin"...Reading symbols for > shared libraries .... done > > /Users/bcotton/projects/usage_warehouse/37828: No such file or directory. > Attaching to program: `/usr/bin/ruby'', process 37828. > Reading symbols for shared libraries +++..................... done > 0x934fc6f2 in select$DARWIN_EXTSN () > (gdb) c > Continuing. > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_PROTECTION_FAILURE at address: 0x00000008 > 0x003aaf2d in EventMachine_t::_RunSelectOnce () > (gdb) bt > #0 0x003aaf2d in EventMachine_t::_RunSelectOnce () > #1 0x003ab131 in EventMachine_t::_RunOnce () > #2 0x003ab31a in EventMachine_t::Run () > #3 0x003a0989 in evma_run_machine () > #4 0x003af1f3 in t_run_machine_without_threads () > #5 0x000da14c in rb_eval_string_wrap () > #6 0x000dad2a in rb_eval_string_wrap () > #7 0x000d809a in rb_eval_string_wrap () > #8 0x000d7694 in rb_eval_string_wrap () > #9 0x000da91f in rb_eval_string_wrap () > #10 0x000dad2a in rb_eval_string_wrap () > #11 0x000d809a in rb_eval_string_wrap () > #12 0x000d70d7 in rb_eval_string_wrap () > #13 0x000e702e in rb_load_protect () > #14 0x000e705f in ruby_exec () > #15 0x000e708b in ruby_run () > #16 0x00001fff in main () > (gdb) > > How would you like to proceed? I can supply gems etc to reproduce. > > Thanks > -Bob >
I want my 3 seconds back! Just kidding. ;) On Tue, Jan 27, 2009 at 2:46 PM, Bob Cotton <bob.cotton at gmail.com> wrote:> ok, nevermind. Just pulled head from git. no crash. > > Sorry about the wasted bandwidth. > > -bob >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/eventmachine-talk/attachments/20090127/c237cbc1/attachment.html>