Andrew Barringer
2009-Mar-03 08:52 UTC
[Eventmachine-talk] [BUG] unknown type 0x22 (0xc given)
I''m trying to migrate an app to Ruby 1.9.1p0 from 1.8.6 and I keep
running into this segfault. I''ve gotten around it a couple times by
just reording my code (weird? yea). All the unit tests pass.. but when
I''m going through the entire stack I get the following.
I noticed the bug on several instances where I was doing something like
"mystring".split(";"){|s| dostuff}
Where mystring did not contain the item to be split on. I got around this by
making sure the string contained the item to be split.
I''m not posting the actual code here that is raising the error because
I think it''s a red-herring. Besides I would have to post the entire
application because all the pieces work fine individually.
Is this something pecular to EventMachine or should I report this to rubycore?
Her''s some OS Version info
x86_64-linux
test at rs-10:/$ <mailto:test at rs-10:/$> cat /etc/issue
Ubuntu 8.04.1 \n \l
test at rs-10:/$ <mailto:test at rs-10:/$> cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.1"
Actual error dump.
[BUG] unknown type 0x22 (0xc given)
ruby 1.9.1p0 (2009-01-30 revision 21907) [x86_64-linux]
---------------------------
-- Ruby level backtrace information-----------------------------------------
/home/test/server/raters/engines/test/test_rater.rb:24:in `rate''
/home/test/server/raters/engines/test/test_rater.rb:24:in `rate''
/home/test/server/raters/rater_manager.rb:54:in `block in rate''
/home/test/server/raters/rater_manager.rb:50:in `each''
/home/test/server/raters/rater_manager.rb:50:in `rate''
/home/test/server/router/fs_router.rb:123:in `block in rate_it''
/home/test/server/router/fs_router.rb:122:in `each''
/home/test/server/router/fs_router.rb:122:in `rate_it''
/home/test/server/router/fs_router.rb:84:in `handle_request''
/home/test/server/fs_engine/tcp_interface.rb:32:in `receive_data''
/usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/eventmachine.rb:237:in
`run_machine''
/usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/eventmachine.rb:237:in
`run''
/home/andy/server/fs_engine/tcp_interface.rb:61:in `<top
(required)>''
./test_service_tcp:20:in `load''
./test_service_tcp:20:in `<main>''
-- C level backtrace information -------------------------------------------
0x7ff6012da35a /usr/lib/libruby19.so.1.9(rb_vm_bugreport+0x4a) [0x7ff6012da35a]
0x7ff60120b0a4 /usr/lib/libruby19.so.1.9 [0x7ff60120b0a4]
0x7ff60120b213 /usr/lib/libruby19.so.1.9(rb_bug+0xb3) [0x7ff60120b213]
0x7ff60120bd05 /usr/lib/libruby19.so.1.9(rb_check_type+0x95) [0x7ff60120bd05]
0x7ff5fdc98378 /home/test/my.so [0x7ff5fdc98378]
0x7ff6012cd7e4 /usr/lib/libruby19.so.1.9 [0x7ff6012cd7e4]
0x7ff6012ce7d6 /usr/lib/libruby19.so.1.9 [0x7ff6012ce7d6]
0x7ff6012d3c7d /usr/lib/libruby19.so.1.9 [0x7ff6012d3c7d]
0x7ff6012d43c8 /usr/lib/libruby19.so.1.9 [0x7ff6012d43c8]
0x7ff6012d4ca7 /usr/lib/libruby19.so.1.9(rb_yield+0x47) [0x7ff6012d4ca7]
0x7ff60121e517 /usr/lib/libruby19.so.1.9 [0x7ff60121e517]
0x7ff60121ed33 /usr/lib/libruby19.so.1.9 [0x7ff60121ed33]
0x7ff601291a98 /usr/lib/libruby19.so.1.9(st_foreach+0xc8) [0x7ff601291a98]
0x7ff6012209fa /usr/lib/libruby19.so.1.9 [0x7ff6012209fa]
0x7ff60120ca17 /usr/lib/libruby19.so.1.9(rb_ensure+0x77) [0x7ff60120ca17]
0x7ff60121feb6 /usr/lib/libruby19.so.1.9(rb_hash_foreach+0x36) [0x7ff60121feb6]
0x7ff601220461 /usr/lib/libruby19.so.1.9 [0x7ff601220461]
0x7ff6012cd7e4 /usr/lib/libruby19.so.1.9 [0x7ff6012cd7e4]
0x7ff6012ce7d6 /usr/lib/libruby19.so.1.9 [0x7ff6012ce7d6]
0x7ff6012d3c7d /usr/lib/libruby19.so.1.9 [0x7ff6012d3c7d]
0x7ff6012d43c8 /usr/lib/libruby19.so.1.9 [0x7ff6012d43c8]
0x7ff6012d4ca7 /usr/lib/libruby19.so.1.9(rb_yield+0x47) [0x7ff6012d4ca7]
0x7ff6011e985d /usr/lib/libruby19.so.1.9(rb_ary_each+0x3d) [0x7ff6011e985d]
0x7ff6012cd7e4 /usr/lib/libruby19.so.1.9 [0x7ff6012cd7e4]
0x7ff6012ce7d6 /usr/lib/libruby19.so.1.9 [0x7ff6012ce7d6]
0x7ff6012d3c7d /usr/lib/libruby19.so.1.9 [0x7ff6012d3c7d]
0x7ff6012d5d53 /usr/lib/libruby19.so.1.9 [0x7ff6012d5d53]
0x7ff6012d63c3 /usr/lib/libruby19.so.1.9(rb_funcall+0x203) [0x7ff6012d63c3]
0x7ff5ffd651aa
/usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/rubyeventmachine.so(_ZN20ConnectionDescriptor20_DispatchInboundDataEPKci+0xaa)
[0x7ff5ffd651aa]
0x7ff5ffd652ca
/usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/rubyeventmachine.so(_ZN20ConnectionDescriptor4ReadEv+0x10a)
[0x7ff5ffd652ca]
0x7ff5ffd556cc
/usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/rubyeventmachine.so(_ZN14EventMachine_t14_RunSelectOnceEv+0x2cc)
[0x7ff5ffd556cc]
0x7ff5ffd56ccb
/usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/rubyeventmachine.so(_ZN14EventMachine_t8_RunOnceEv+0x1b)
[0x7ff5ffd56ccb]
0x7ff5ffd583f0
/usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/rubyeventmachine.so(_ZN14EventMachine_t3RunEv+0x60)
[0x7ff5ffd583f0]
0x7ff5ffd5bda9
/usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/rubyeventmachine.so
[0x7ff5ffd5bda9]
0x7ff6012cd7e4 /usr/lib/libruby19.so.1.9 [0x7ff6012cd7e4]
0x7ff6012ce7d6 /usr/lib/libruby19.so.1.9 [0x7ff6012ce7d6]
0x7ff6012d3c7d /usr/lib/libruby19.so.1.9 [0x7ff6012d3c7d]
0x7ff6012d3f66 /usr/lib/libruby19.so.1.9(rb_iseq_eval+0x116) [0x7ff6012d3f66]
0x7ff60120f548 /usr/lib/libruby19.so.1.9(rb_load+0x188) [0x7ff60120f548]
0x7ff60120f645 /usr/lib/libruby19.so.1.9 [0x7ff60120f645]
0x7ff6012cd7e4 /usr/lib/libruby19.so.1.9 [0x7ff6012cd7e4]
0x7ff6012ce7d6 /usr/lib/libruby19.so.1.9 [0x7ff6012ce7d6]
0x7ff6012d3c7d /usr/lib/libruby19.so.1.9 [0x7ff6012d3c7d]
0x7ff6012d3e13 /usr/lib/libruby19.so.1.9(rb_iseq_eval_main+0xb3)
[0x7ff6012d3e13]
0x7ff60120d1fc /usr/lib/libruby19.so.1.9(ruby_exec_node+0xac) [0x7ff60120d1fc]
0x7ff60120eb03 /usr/lib/libruby19.so.1.9(ruby_run_node+0x43) [0x7ff60120eb03]
0x40094f ruby19(main+0x4f) [0x40094f]
0x7ff6003961c4 /lib/libc.so.6(__libc_start_main+0xf4) [0x7ff6003961c4]
0x400869 ruby19 [0x400869]
[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
<http://www.ruby-lang.org/bugreport.html>
Aborted
What is /home/test/my.so? It seems likely the bug is in that extension. Aman On Tue, Mar 3, 2009 at 12:52 PM, Andrew Barringer <abarringer at bsecure.com> wrote:> I''m trying to migrate an app to Ruby 1.9.1p0 from 1.8.6 and I keep running into this segfault. I''ve gotten around it a couple times by just reording my code (weird? yea). All the unit tests pass.. but when I''m going through the entire stack I get the following. > > I noticed the bug on several instances where I was doing something like > > "mystring".split(";"){|s| dostuff} > > Where mystring did not contain the item to be split on. I got around this by making sure the string contained the item to be split. > > I''m not posting the actual code here that is raising the error because I think it''s a red-herring. Besides I would have to post the entire application because all the pieces work fine individually. > > Is this something pecular to EventMachine or should I report this to rubycore? > > > Her''s some OS Version info > x86_64-linux > > test at rs-10:/$ <mailto:test at rs-10:/$> ?cat /etc/issue > Ubuntu 8.04.1 \n \l > > test at rs-10:/$ <mailto:test at rs-10:/$> ?cat /etc/lsb-release > DISTRIB_ID=Ubuntu > DISTRIB_RELEASE=8.04 > DISTRIB_CODENAME=hardy > DISTRIB_DESCRIPTION="Ubuntu 8.04.1" > > > Actual error dump. > > [BUG] unknown type 0x22 (0xc given) > ruby 1.9.1p0 (2009-01-30 revision 21907) [x86_64-linux] > > > > --------------------------- > -- Ruby level backtrace information----------------------------------------- > /home/test/server/raters/engines/test/test_rater.rb:24:in `rate'' > /home/test/server/raters/engines/test/test_rater.rb:24:in `rate'' > /home/test/server/raters/rater_manager.rb:54:in `block in rate'' > /home/test/server/raters/rater_manager.rb:50:in `each'' > /home/test/server/raters/rater_manager.rb:50:in `rate'' > /home/test/server/router/fs_router.rb:123:in `block in rate_it'' > /home/test/server/router/fs_router.rb:122:in `each'' > /home/test/server/router/fs_router.rb:122:in `rate_it'' > /home/test/server/router/fs_router.rb:84:in `handle_request'' > /home/test/server/fs_engine/tcp_interface.rb:32:in `receive_data'' > /usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/eventmachine.rb:237:in `run_machine'' > /usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/eventmachine.rb:237:in `run'' > /home/andy/server/fs_engine/tcp_interface.rb:61:in `<top (required)>'' > ./test_service_tcp:20:in `load'' > ./test_service_tcp:20:in `<main>'' > > > > -- C level backtrace information ------------------------------------------- > 0x7ff6012da35a /usr/lib/libruby19.so.1.9(rb_vm_bugreport+0x4a) [0x7ff6012da35a] > 0x7ff60120b0a4 /usr/lib/libruby19.so.1.9 [0x7ff60120b0a4] > 0x7ff60120b213 /usr/lib/libruby19.so.1.9(rb_bug+0xb3) [0x7ff60120b213] > 0x7ff60120bd05 /usr/lib/libruby19.so.1.9(rb_check_type+0x95) [0x7ff60120bd05] > 0x7ff5fdc98378 /home/test/my.so [0x7ff5fdc98378] > 0x7ff6012cd7e4 /usr/lib/libruby19.so.1.9 [0x7ff6012cd7e4] > 0x7ff6012ce7d6 /usr/lib/libruby19.so.1.9 [0x7ff6012ce7d6] > 0x7ff6012d3c7d /usr/lib/libruby19.so.1.9 [0x7ff6012d3c7d] > 0x7ff6012d43c8 /usr/lib/libruby19.so.1.9 [0x7ff6012d43c8] > 0x7ff6012d4ca7 /usr/lib/libruby19.so.1.9(rb_yield+0x47) [0x7ff6012d4ca7] > 0x7ff60121e517 /usr/lib/libruby19.so.1.9 [0x7ff60121e517] > 0x7ff60121ed33 /usr/lib/libruby19.so.1.9 [0x7ff60121ed33] > 0x7ff601291a98 /usr/lib/libruby19.so.1.9(st_foreach+0xc8) [0x7ff601291a98] > 0x7ff6012209fa /usr/lib/libruby19.so.1.9 [0x7ff6012209fa] > 0x7ff60120ca17 /usr/lib/libruby19.so.1.9(rb_ensure+0x77) [0x7ff60120ca17] > 0x7ff60121feb6 /usr/lib/libruby19.so.1.9(rb_hash_foreach+0x36) [0x7ff60121feb6] > 0x7ff601220461 /usr/lib/libruby19.so.1.9 [0x7ff601220461] > 0x7ff6012cd7e4 /usr/lib/libruby19.so.1.9 [0x7ff6012cd7e4] > 0x7ff6012ce7d6 /usr/lib/libruby19.so.1.9 [0x7ff6012ce7d6] > 0x7ff6012d3c7d /usr/lib/libruby19.so.1.9 [0x7ff6012d3c7d] > 0x7ff6012d43c8 /usr/lib/libruby19.so.1.9 [0x7ff6012d43c8] > 0x7ff6012d4ca7 /usr/lib/libruby19.so.1.9(rb_yield+0x47) [0x7ff6012d4ca7] > 0x7ff6011e985d /usr/lib/libruby19.so.1.9(rb_ary_each+0x3d) [0x7ff6011e985d] > 0x7ff6012cd7e4 /usr/lib/libruby19.so.1.9 [0x7ff6012cd7e4] > 0x7ff6012ce7d6 /usr/lib/libruby19.so.1.9 [0x7ff6012ce7d6] > 0x7ff6012d3c7d /usr/lib/libruby19.so.1.9 [0x7ff6012d3c7d] > 0x7ff6012d5d53 /usr/lib/libruby19.so.1.9 [0x7ff6012d5d53] > 0x7ff6012d63c3 /usr/lib/libruby19.so.1.9(rb_funcall+0x203) [0x7ff6012d63c3] > 0x7ff5ffd651aa /usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/rubyeventmachine.so(_ZN20ConnectionDescriptor20_DispatchInboundDataEPKci+0xaa) [0x7ff5ffd651aa] > 0x7ff5ffd652ca /usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/rubyeventmachine.so(_ZN20ConnectionDescriptor4ReadEv+0x10a) [0x7ff5ffd652ca] > 0x7ff5ffd556cc /usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/rubyeventmachine.so(_ZN14EventMachine_t14_RunSelectOnceEv+0x2cc) [0x7ff5ffd556cc] > 0x7ff5ffd56ccb /usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/rubyeventmachine.so(_ZN14EventMachine_t8_RunOnceEv+0x1b) [0x7ff5ffd56ccb] > 0x7ff5ffd583f0 /usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/rubyeventmachine.so(_ZN14EventMachine_t3RunEv+0x60) [0x7ff5ffd583f0] > 0x7ff5ffd5bda9 /usr/lib/ruby19/gems/1.9.1/gems/eventmachine-0.12.4/lib/rubyeventmachine.so [0x7ff5ffd5bda9] > 0x7ff6012cd7e4 /usr/lib/libruby19.so.1.9 [0x7ff6012cd7e4] > 0x7ff6012ce7d6 /usr/lib/libruby19.so.1.9 [0x7ff6012ce7d6] > 0x7ff6012d3c7d /usr/lib/libruby19.so.1.9 [0x7ff6012d3c7d] > 0x7ff6012d3f66 /usr/lib/libruby19.so.1.9(rb_iseq_eval+0x116) [0x7ff6012d3f66] > 0x7ff60120f548 /usr/lib/libruby19.so.1.9(rb_load+0x188) [0x7ff60120f548] > 0x7ff60120f645 /usr/lib/libruby19.so.1.9 [0x7ff60120f645] > 0x7ff6012cd7e4 /usr/lib/libruby19.so.1.9 [0x7ff6012cd7e4] > 0x7ff6012ce7d6 /usr/lib/libruby19.so.1.9 [0x7ff6012ce7d6] > 0x7ff6012d3c7d /usr/lib/libruby19.so.1.9 [0x7ff6012d3c7d] > 0x7ff6012d3e13 /usr/lib/libruby19.so.1.9(rb_iseq_eval_main+0xb3) [0x7ff6012d3e13] > 0x7ff60120d1fc /usr/lib/libruby19.so.1.9(ruby_exec_node+0xac) [0x7ff60120d1fc] > 0x7ff60120eb03 /usr/lib/libruby19.so.1.9(ruby_run_node+0x43) [0x7ff60120eb03] > 0x40094f ruby19(main+0x4f) [0x40094f] > 0x7ff6003961c4 /lib/libc.so.6(__libc_start_main+0xf4) [0x7ff6003961c4] > 0x400869 ruby19 [0x400869] > [NOTE] > You may encounter a bug of Ruby interpreter. Bug reports are welcome. > For details: http://www.ruby-lang.org/bugreport.html <http://www.ruby-lang.org/bugreport.html> > Aborted > > _______________________________________________ > Eventmachine-talk mailing list > Eventmachine-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/eventmachine-talk >