|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
[ruby-core:26244] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsBug #2258: Kernel#require inside rb_require() inside rb_protect() inside SysV context fails
http://redmine.ruby-lang.org/issues/show/2258 Author: Suraj Kurapati Status: Open, Priority: Normal Category: ext ruby -v: ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux] Hi, I get the following error when I call Kernel#require() inside a Ruby script that is being run by rb_require(), which itself is running inside rb_protect(), which in turn is running inside a UNIX System V context. "[BUG] object allocation during garbage collection phase" An example test case to reproduce this bug is attached, and the result of running this test case is shown below. Note that this test case runs correctly without any errors if you remove the call to Kernel#require in "hello.rb" line 7. Thanks for your consideration. ############################################################### # ruby -v extconf.rb && sed -i 's,-shared,,g' Makefile ############################################################### ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux] checking for ruby_init() in -lruby-static... yes checking for sys/ucontext.h... yes creating Makefile ############################################################### # make && ./main.so ############################################################### gcc -I. -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVE_SYS_UCONTEXT_H -D_FILE_OFFSET_BITS=64 -fPIC -march=i686 -mtune=generic -O2 -pipe -O2 -g -Wall -Wno-parentheses -fPIC -o main.o -c main.c main.c: In function ‘relay_from_main_to_ruby’: main.c:15: warning: implicit declaration of function ‘swapcontext’ main.c: In function ‘main’: main.c:99: warning: implicit declaration of function ‘getcontext’ main.c:100: warning: implicit declaration of function ‘makecontext’ gcc -o main.so main.o -L. -L/usr/lib -Wl,-R/usr/lib -L. -Wl,--hash-style=gnu -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc Main: relay_from_main_to_ruby() begin Ruby: context begin Ruby: relay 0 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: relay 1 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: relay 2 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: require 'hello' begin ~~~~> Hello World! The time is 2009-10-22 16:36:06 -0700. ~~~~> Doing relay from /home/sun/lab/ruby-ucontext/hello.rb:3 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end ~~~~> OMG, back from main!! :-) /home/sun/lab/ruby-ucontext/hello.rb:7: [BUG] Segmentation fault ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux] -- control frame ---------- c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :require c:0003 p:0080 s:0006 b:0006 l:000005 d:000005 TOP /home/sun/lab/ruby-ucontext/hello.rb:7 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:001cac d:001cac TOP --------------------------- /home/sun/lab/ruby-ucontext/hello.rb:7: [BUG] object allocation during garbage collection phase ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux] -- control frame ---------- c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :require c:0003 p:0080 s:0006 b:0006 l:000005 d:000005 TOP /home/sun/lab/ruby-ucontext/hello.rb:7 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:001cac d:001cac TOP --------------------------- Segmentation fault ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26245] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
Hi, Below is the result of running the example test case attached to this issue on the Ruby Issue Tracker with Ruby @ SVN trunk. The only difference is that I see: [BUG] Segmentation fault Instead of: [BUG] object allocation during garbage collection phase Thanks for your consideration. ############################################################### # ruby -v extconf.rb && sed -i 's,-shared,,g' Makefile ############################################################### ruby 1.9.2dev (2009-10-23 trunk 25426) [i686-linux] checking for ruby_init() in -lruby-static... yes checking for sys/ucontext.h... yes creating Makefile ############################################################### # make && ./main.so ############################################################### gcc -I. -I/home/sun/app/ruby/include/ruby-1.9.1/i686-linux -I/home/sun/app/ruby/include/ruby-1.9.1/ruby/backward -I/home/sun/app/ruby/include/ruby-1.9.1 -I. -DHAVE_SYS_UCONTEXT_H -D_FILE_OFFSET_BITS=64 -fPIC -g -o main.o -c main.c gcc -o main.so main.o -L. -L/home/sun/app/ruby/lib -Wl,-R/home/sun/app/ruby/lib -L. -rdynamic -Wl,-export-dynamic -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc Main: relay_from_main_to_ruby() begin Ruby: context begin Ruby: relay 0 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: relay 1 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: relay 2 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: require 'hello' begin ~~~~> Hello World! The time is 2009-10-22 17:17:08 -0700. ~~~~> Doing relay from /home/sun/lab/ruby-ucontext/hello.rb:3 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end ~~~~> OMG, back from main!! :-) /home/sun/lab/ruby-ucontext/hello.rb:7: [BUG] Segmentation fault ruby 1.9.2dev (2009-10-23 trunk 25426) [i686-linux] -- control frame ---------- c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :require c:0003 p:0080 s:0006 b:0006 l:000005 d:000005 TOP /home/sun/lab/ruby-ucontext/hello.rb:7 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:001bdc d:001bdc TOP --------------------------- /home/sun/lab/ruby-ucontext/hello.rb:7:in `<top (required)>' /home/sun/lab/ruby-ucontext/hello.rb:7:in `require' -- C level backtrace information ------------------------------------------- ./main.so(rb_vm_bugreport+0x6b) [0x8150f7d] ./main.so [0x805fbe4] ./main.so(rb_bug+0x34) [0x805fc3e] ./main.so [0x80f1f22] [0xb779640c] ./main.so [0x8071b4c] ./main.so [0x8071bd0] ./main.so [0x80732cd] ./main.so [0x8073514] ./main.so [0x80715ca] ./main.so(rb_newobj+0x52) [0x8071683] ./main.so(rb_node_newnode+0xb) [0x8071690] ./main.so [0x80b27da] ./main.so(ruby_yyparse+0x5d3e) [0x80a8209] ./main.so [0x80abf83] ./main.so(ruby_suppress_tracing+0xab) [0x815641c] ./main.so [0x80ac0d5] ./main.so(rb_parser_compile_file+0x75) [0x80ac4fa] ./main.so [0x80f0ba7] ./main.so(rb_ensure+0x5f) [0x80644f9] ./main.so [0x80f0c9d] ./main.so(rb_load_file+0x34) [0x80f0cd7] ./main.so [0x80659a9] ./main.so(rb_require_safe+0x136) [0x80664bf] ./main.so(rb_f_require+0x1a) [0x8065d59] ./main.so [0x813ee9b] ./main.so [0x813f832] ./main.so [0x813fd3d] ./main.so [0x8144196] ./main.so [0x814e674] ./main.so(rb_iseq_eval+0x2b) [0x814ecb6] ./main.so [0x8065a08] ./main.so(rb_require_safe+0x136) [0x80664bf] ./main.so(rb_require+0x56) [0x8066613] ./main.so(rb_protect+0xc4) [0x8064429] ./main.so [0x805d09f] ./main.so [0x805d211] /lib/libc.so.6(makecontext+0x4b) [0xb75e803b] ./main.so [0x8203140] /lib/libc.so.6(__libc_start_main+0xe6) [0xb75c4a36] ./main.so [0x805cf41] [NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html Aborted ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26246] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
File extconf.rb added File main.c added Hi, I am attaching updated "extconf.rb" and "main.c" files which now support Ruby 1.8 and native ucontext.h location. With these updated files, I have found that the example test case fails in the same way on Ruby 1.8.6 and 1.8.7 (see output below) as it does for Ruby 1.9.1 and 1.9.2. Thanks for your consideration. Ruby 1.8.7 ############################################################### # ruby -v extconf.rb && sed -i 's,-shared,,g' Makefile ############################################################### ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-linux] checking for ruby_init() in -lruby-static... yes checking for ruby_sysinit()... no checking for sys/ucontext.h... yes creating Makefile /home/sun/.multiruby/install/1.8.7-p174/lib/ruby/1.8/mkmf.rb:1345: warning: global variable `$preload' not initialized ############################################################### # make && ./main.so ############################################################### gcc -I. -I. -I/home/sun/.multiruby/install/1.8.7-p174/lib/ruby/1.8/i686-linux -I. -DHAVE_SYS_UCONTEXT_H -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -fPIC -c main.c gcc -o main.so main.o -L. -L/home/sun/.multiruby/install/1.8.7-p174/lib -Wl,-R/home/sun/.multiruby/install/1.8.7-p174/lib -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sun/.multiruby/install/1.8.7-p174/lib -L/home/sun/.multiruby/install/1.8.7-p174/lib -lruby -lruby-static -lrt -ldl -lcrypt -lm -lc Main: relay_from_main_to_ruby() begin Ruby: context begin Ruby: relay 0 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: relay 1 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: relay 2 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: require 'hello' begin ~~~~> Hello World! The time is Thu Oct 22 20:05:28 -0700 2009. ~~~~> Doing relay from ./hello.rb:3 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end ~~~~> OMG, back from main!! :-) Segmentation fault Ruby 1.8.6 ############################################################### # ruby -v extconf.rb && sed -i 's,-shared,,g' Makefile ############################################################### ruby 1.8.6 (2009-08-04 patchlevel 383) [i686-linux] checking for ruby_init() in -lruby-static... yes checking for ruby_sysinit()... no checking for sys/ucontext.h... yes creating Makefile /home/sun/.multiruby/install/1.8.6-p383/lib/ruby/1.8/mkmf.rb:1136: warning: global variable `$preload' not initialized ############################################################### # make && ./main.so ############################################################### gcc -o main.so main.o -L. -L/home/sun/.multiruby/install/1.8.6-p383/lib -Wl,-R/home/sun/.multiruby/install/1.8.6-p383/lib -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sun/.multiruby/install/1.8.6-p383/lib -L/home/sun/.multiruby/install/1.8.6-p383/lib -lruby -lruby-static -lrt -ldl -lcrypt -lm -lc Main: relay_from_main_to_ruby() begin Ruby: context begin Ruby: relay 0 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: relay 1 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: relay 2 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: require 'hello' begin ~~~~> Hello World! The time is Thu Oct 22 20:04:01 -0700 2009. ~~~~> Doing relay from ./hello.rb:3 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end ~~~~> OMG, back from main!! :-) Segmentation fault ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26247] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
Hi, Below is a full GDB backtrace of the bug in Ruby 1.9.2dev. I hope this is more useful than the output I posted so far. Thanks for your consideration. ############################################################### # ruby -v extconf.rb && sed -i 's,-shared,,g' Makefile ############################################################### ruby 1.9.2dev (2009-10-23 trunk 25426) [i686-linux] checking for ruby_init() in -lruby-static... yes checking for ruby_sysinit()... yes checking for sys/ucontext.h... yes creating Makefile ############################################################### # make && gdb ./main.so ############################################################### gcc -I. -I/home/sun/app/ruby/include/ruby-1.9.1/i686-linux -I/home/sun/app/ruby/include/ruby-1.9.1/ruby/backward -I/home/sun/app/ruby/include/ruby-1.9.1 -I. -DHAVE_RUBY_SYSINIT -DHAVE_SYS_UCONTEXT_H -D_FILE_OFFSET_BITS=64 -fPIC -g -o main.o -c main.c gcc -o main.so main.o -L. -L/home/sun/app/ruby/lib -Wl,-R/home/sun/app/ruby/lib -L. -rdynamic -Wl,-export-dynamic -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc GNU gdb (GDB) 7.0 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/sun/lab/ruby-ucontext/main.so...done. (gdb) run Starting program: /home/sun/lab/ruby-ucontext/main.so [Thread debugging using libthread_db enabled] [New Thread 0xb7fdfb70 (LWP 1814)] Main: relay_from_main_to_ruby() begin Ruby: context begin Ruby: relay 0 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: relay 1 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: relay 2 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end Ruby: require 'hello' begin ~~~~> Hello World! The time is 2009-10-22 20:18:23 -0700. ~~~~> Doing relay from /home/sun/lab/ruby-ucontext/hello.rb:3 Ruby: relay_from_ruby_to_main() begin Main: relay_from_main_to_ruby() end Main: relay_from_main_to_ruby() begin Ruby: relay_from_ruby_to_main() end ~~~~> OMG, back from main!! :-) Program received signal SIGSEGV, Segmentation fault. mark_locations_array (objspace=0x82134f0, x=0x82d9000, n=-302737297) at gc.c:1312 1312 v = *x; (gdb) bt full #0 mark_locations_array (objspace=0x82134f0, x=0x82d9000, n=-302737297) at gc.c:1312 v = 0 #1 0x08071bd0 in gc_mark_locations (objspace=0x82134f0, start=0x82036c0, end=0xbffff1c0) at gc.c:1328 n = -302518592 #2 0x080732cd in mark_current_machine_context (objspace=0x82134f0, th=0x8213290) at gc.c:2123 save_regs_gc_mark = {{__jmpbuf = {136398340, 136398660, 136400040, 136329096, -859083016, -2101213448}, __mask_was_saved = 0, __saved_mask = {__val = {136328984, 134735412, 136569480, 4294967295, 136329016, 134922497, 136603800, 136534240, 136329016, 134923347, 136550480, 918079462, 712, 136603800, 1, 136393360, 136329064, 134684644, 136398372, 136398374, 136603800, 134960397, 137160472, 10128, 3085330718, 136556320, 136590280, 136398340, 136329096, 134684829, 136393968, 136556320}}}} stack_start = 0x82036c0 stack_end = 0xbffff1c0 #3 0x08073514 in garbage_collect (objspace=0x82134f0) at gc.c:2172 list = 0xb7f3c380 th = 0x8213290 gc_time = 0 count = 0 #4 0x080715ca in rb_newobj_from_heap (objspace=0x82134f0) at gc.c:1011 obj = 134679951 #5 0x08071683 in rb_newobj () at gc.c:1094 th = 0x8213290 objspace = 0x82134f0 #6 0x08071690 in rb_node_newnode (type=NODE_SCOPE, a0=137166880, a1=136398340, a2=136398660) at gc.c:1101 n = 0x14 #7 0x080b27da in node_newnode (parser=0x82bb4a0, type=NODE_SCOPE, a0=137166880, a1=136398340, a2=136398660) at parse.y:7674 n = 0x82d0020 #8 0x080a8209 in ruby_yyparse (parser=0x82bb4a0) at parse.y:2928 body = 0x8214604 yychar = -2 yylval = {val = 6, node = 0x6, id = 6, num = 6} yynerrs = 0 yystate = 953 yyerrstatus = 0 yyssa = {0, 2, 65, 283, 87, 349, 564, 698, 65, 283, 89, 366, 574, 708, 808, 871, 908, 936, 953, 786, 856, 399, 602, 601, 602, 601, 722, 774, 466, 601, 601, 505, 399, 602, 601, 602, 601, 796, 864, 905, 687, 796, 864, 905, 687, 796, 864, 905, 687, 796, 864, 905, 480, 326, 535, 667, 775, 850, 499, 390, 541, 671, 399, 602, 601, 0, 12944, 2081, 13552, 2081, 0, 0, 8192, 0, 15640, 2080, -22393, 2063, 26776, 2084, -26584, 2083, 15656, 2080, -23694, 2069, -26604, 2083, 2, 0, 15688, 2080, -22043, 2063, -26596, 2083, -18936, 2091, 15688, 2080, -23644, 2069, -26604, 2083, 2, 0, 15720, 2080, -24124, 2063, -26594, 2083, -26594, 2083, 15720, 2080, -14319, 2055, -26604, 2083, 26776, 2084, 2, 0, 8192, 0, -19112, 2091, 4960, 2091, 15784, 2080, -8337, 2055, -26604, 2083, -19112, 2091, 26776, 2084, 15748, 2080, -19112, 2091, 0, 16, -26604, 2083, 2, 0, 2, 0, 2, 0, -18936, 2091, -18935, 2091, -26584, 2083, 14176, 2084, 15880, 2080, -7508, 2055, -19112, 2091, 26776, 2084, 16104, 2080, -4494, 2067, 2, 0, 16400, 2080, 4, 0, -19112, 2091, 0, 0, 26776, 2084, 15880, 2080, 15864, 2080, 2, 0, 12296, 2081, 2432, 2091, 2, 0, 13552, 2081} yyss = 0x8203c64 yyssp = 0x8203c88 yyvsa = {{val = 3086200820, node = 0xb7f3aff4, id = 3086200820, num = -1208766476}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 136415420, node = 0x82188bc, id = 136415420, num = 136415420}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 136414380, node = 0x82184ac, id = 136414380, num = 136414380}, { val = 136414340, node = 0x8218484, id = 136414340, num = 136414340}, {val = 1550, node = 0x60e, id = 1550, num = 1550}, {val = 136410200, node = 0x8217458, id = 136410200, num = 136410200}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 6, node = 0x6, id = 6, ---Type <return> to continue, or q <return> to quit--- num = 6}, {val = 136398900, node = 0x8214834, id = 136398900, num = 136398900}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 10896, node = 0x2a90, id = 10896, num = 10896}, {val = 0, node = 0x0, id = 0, num = 0}, { val = 136398660, node = 0x8214744, id = 136398660, num = 136398660}, {val = 136398340, node = 0x8214604, id = 136398340, num = 136398340}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 0, node = 0x0, id = 0, num = 0}, { val = 136398440, node = 0x8214668, id = 136398440, num = 136398440}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 0, node = 0x0, id = 0, num = 0}, { val = 6, node = 0x6, id = 6, num = 6}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 136425000, node = 0x821ae28, id = 136425000, num = 136425000}, {val = 136425100, node = 0x821ae8c, id = 136425100, num = 136425100}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 136468120, node = 0x8225698, id = 136468120, num = 136468120}, {val = 136465420, node = 0x8224c0c, id = 136465420, num = 136465420}, {val = 136467880, node = 0x82255a8, id = 136467880, num = 136467880}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 136467520, node = 0x8225440, id = 136467520, num = 136467520}, {val = 136465440, node = 0x8224c20, id = 136465440, num = 136465440}, {val = 136467460, node = 0x8225404, id = 136467460, num = 136467460}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 136466680, node = 0x82250f8, id = 136466680, num = 136466680}, {val = 136465460, node = 0x8224c34, id = 136465460, num = 136465460}, {val = 136466440, node = 0x8225008, id = 136466440, num = 136466440}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 136465660, node = 0x8224cfc, id = 136465660, num = 136465660}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 136465500, node = 0x8224c5c, id = 136465500, num = 136465500}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 136465580, node = 0x8224cac, id = 136465580, num = 136465580}, { val = 0, node = 0x0, id = 0, num = 0}, {val = 0, node = 0x0, id = 0, num = 0}, { val = 136465560, node = 0x8224c98, id = 136465560, num = 136465560}, {val = 136465960, node = 0x8224e28, id = 136465960, num = 136465960}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 448, node = 0x1c0, id = 448, num = 448}, {val = 136465980, node = 0x8224e3c, id = 136465980, num = 136465980}, {val = 136465980, node = 0x8224e3c, id = 136465980, num = 136465980}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 136551228, node = 0x8239b3c, id = 136551228, num = 136551228}, { val = 136551220, node = 0x8239b34, id = 136551220, num = 136551220}, {val = 3, node = 0x3, id = 3, num = 3}, {val = 3084869508, node = 0xb7df5f84, id = 3084869508, num = -1210097788}, {val = 1, node = 0x1, id = 1, num = 1}, {val = 2, node = 0x2, id = 2, num = 2}, {val = 136551208, node = 0x8239b28, id = 136551208, num = 136551208}, { val = 136551220, node = 0x8239b34, id = 136551220, num = 136551220}, {val = 136329912, node = 0x8203ab8, id = 136329912, num = 136329912}, {val = 135607304, node = 0x8153408, id = 135607304, num = 135607304}, {val = 2, node = 0x2, id = 2, num = 2}, {val = 135964471, node = 0x81aa737, id = 135964471, num = 135964471}, {val = 136329912, node = 0x8203ab8, id = 136329912, num = 136329912}, {val = 3085314675, node = 0xb7e62a73, id = 3085314675, num = -1209652621}, {val = 1, node = 0x1, id = 1, num = 1}, {val = 1, node = 0x1, id = 1, num = 1}, {val = 136329888, node = 0x8203aa0, id = 136329888, num = 136329888}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 1, node = 0x1, id = 1, num = 1}, {val = 136331588, node = 0x8204144, id = 136331588, num = 136331588}, {val = 1, node = 0x1, id = 1, num = 1}, {val = 1, node = 0x1, id = 1, num = 1}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 136329956, node = 0x8203ae4, id = 136329956, num = 136329956}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 136331440, node = 0x82040b0, id = 136331440, num = 136331440}, {val = 3086048928, node = 0xb7f15ea0, id = 3086048928, num = -1208918368}, {val = 136329944, node = 0x8203ad8, id = 136329944, num = 136329944}, {val = 135607390, node = 0x815345e, id = 135607390, num = 135607390}, { val = 136393360, node = 0x8213290, id = 136393360, num = 136393360}, {val = 1, node = 0x1, id = 1, num = 1}, {val = 3086921792, node = 0xb7feb040, id = 3086921792, num = -1208045504}, {val = 136550440, node = 0x8239828, id = 136550440, num = 136550440}, { val = 3084869508, node = 0xb7df5f84, id = 3084869508, num = -1210097788}, {val = 137040736, node = 0x82b1360, id = 137040736, num = 137040736}, {val = 136330072, node = 0x8203b58, ---Type <return> to continue, or q <return> to quit--- id = 136330072, num = 136330072}, {val = 135569188, node = 0x8149f24, id = 135569188, num = 135569188}, {val = 136393360, node = 0x8213290, id = 136393360, num = 136393360}, { val = 136550440, node = 0x8239828, id = 136550440, num = 136550440}, {val = 2, node = 0x2, id = 2, num = 2}, {val = 2, node = 0x2, id = 2, num = 2}, {val = 136330240, node = 0x8203c00, id = 136330240, num = 136330240}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 3084345404, node = 0xb7d7603c, id = 3084345404, num = -1210621892}, {val = 3084345404, node = 0xb7d7603c, id = 3084345404, num = -1210621892}, {val = 1, node = 0x1, id = 1, num = 1}, {val = 3086922597, node = 0xb7feb365, id = 3086922597, num = -1208044699}, { val = 0, node = 0x0, id = 0, num = 0}, {val = 136330012, node = 0x8203b1c, id = 136330012, num = 136330012}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 135968849, node = 0x81ab851, id = 135968849, num = 135968849}, {val = 1, node = 0x1, id = 1, num = 1}, {val = 135241775, node = 0x80fa02f, id = 135241775, num = 135241775}, {val = 136676752, node = 0x8258590, id = 136676752, num = 136676752}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 136593940, node = 0x8244214, id = 136593940, num = 136593940}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 3086991092, node = 0xb7ffbef4, id = 3086991092, num = -1207976204}, {val = 136330060, node = 0x8203b4c, id = 136330060, num = 136330060}, { val = 0, node = 0x0, id = 0, num = 0}, {val = 3084869420, node = 0xb7df5f2c, id = 3084869420, num = -1210097876}, {val = 3084869376, node = 0xb7df5f00, id = 3084869376, num = -1210097920}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 8, node = 0x8, id = 8, num = 8}, {val = 136393360, node = 0x8213290, id = 136393360, num = 136393360}, { val = 136550440, node = 0x8239828, id = 136550440, num = 136550440}, {val = 3084869508, node = 0xb7df5f84, id = 3084869508, num = -1210097788}, {val = 136330152, node = 0x8203ba8, id = 136330152, num = 136330152}, {val = 135570442, node = 0x814a40a, id = 135570442, num = 135570442}, {val = 136393360, node = 0x8213290, id = 136393360, num = 136393360}, { val = 136550440, node = 0x8239828, id = 136550440, num = 136550440}, {val = 2863, node = 0xb2f, id = 2863, num = 2863}, {val = 2, node = 0x2, id = 2, num = 2}, { val = 136330240, node = 0x8203c00, id = 136330240, num = 136330240}, {val = 136676696, node = 0x8258558, id = 136676696, num = 136676696}, {val = 136330336, node = 0x8203c60, id = 136330336, num = 136330336}, {val = 3087005720, node = 0xb7fff818, id = 3087005720, num = -1207961576}, {val = 136593940, node = 0x8244214, id = 136593940, num = 136593940}, { val = 136676696, node = 0x8258558, id = 136676696, num = 136676696}, {val = 136360328, node = 0x820b188, id = 136360328, num = 136360328}, {val = 136393360, node = 0x8213290, id = 136393360, num = 136393360}, {val = 2863, node = 0xb2f, id = 2863, num = 2863}, { val = 8, node = 0x8, id = 8, num = 8}, {val = 0, node = 0x0, id = 0, num = 0}, { val = 3084878136, node = 0xb7df8138, id = 3084878136, num = -1210089160}, {val = 5, node = 0x5, id = 5, num = 5}, {val = 136550440, node = 0x8239828, id = 136550440, num = 136550440}, {val = 136330200, node = 0x8203bd8, id = 136330200, num = 136330200}, { val = 135570501, node = 0x814a445, id = 135570501, num = 135570501}, {val = 136550440, node = 0x8239828, id = 136550440, num = 136550440}, {val = 2863, node = 0xb2f, id = 2863, num = 2863}, {val = 2, node = 0x2, id = 2, num = 2}, {val = 136330240, node = 0x8203c00, id = 136330240, num = 136330240}, {val = 1, node = 0x1, id = 1, num = 1}, {val = 6, node = 0x6, id = 6, num = 6}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 3087005280, node = 0xb7fff660, id = 3087005280, num = -1207962016}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 136330336, node = 0x8203c60, id = 136330336, num = 136330336}, { val = 136330296, node = 0x8203c38, id = 136330296, num = 136330296}, {val = 135571700, node = 0x814a8f4, id = 135571700, num = 135571700}, {val = 136550440, node = 0x8239828, id = 136550440, num = 136550440}, {val = 2863, node = 0xb2f, id = 2863, num = 2863}, { val = 2, node = 0x2, id = 2, num = 2}, {val = 136330240, node = 0x8203c00, id = 136330240, num = 136330240}, {val = 1, node = 0x1, id = 1, num = 1}, {val = 4, node = 0x4, id = 4, num = 4}, {val = 136330264, node = 0x8203c18, id = 136330264, num = 136330264}, { val = 136351724, node = 0x8208fec, id = 136351724, num = 136351724}, {val = 323598, node = 0x4f00e, id = 323598, num = 323598}, {val = 0, node = 0x0, id = 0, num = 0}, { val = 136330296, node = 0x8203c38, id = 136330296, num = 136330296}, {val = 135563461, node = 0x81488c5, id = 135563461, num = 135563461}, {val = 136590280, node = 0x82433c8, id = 136590280, num = 136590280}, {val = 1264, node = 0x4f0, id = 1264, num = 1264}, { val = 3086070978, node = 0xb7f1b4c2, id = 3086070978, num = -1208896318}, { val = 3086205868, node = 0xb7f3c3ac, id = 3086205868, num = -1208761428}, { val = 3086662295, node = 0xb7faba97, id = 3086662295, num = -1208305001}, { ---Type <return> to continue, or q <return> to quit--- val = 3086205868, node = 0xb7f3c3ac, id = 3086205868, num = -1208761428}, { val = 3086205824, node = 0xb7f3c380, id = 3086205824, num = -1208761472}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 3086662295, node = 0xb7faba97, id = 3086662295, num = -1208305001}, {val = 3086205872, node = 0xb7f3c3b0, id = 3086205872, num = -1208761424}, {val = 3086667417, node = 0xb7face99, id = 3086667417, num = -1208299879}, {val = 3086205824, node = 0xb7f3c380, id = 3086205824, num = -1208761472}, {val = 137040736, node = 0x82b1360, id = 137040736, num = 137040736}, { val = 136330416, node = 0x8203cb0, id = 136330416, num = 136330416}, {val = 0, node = 0x0, id = 0, num = 0}, {val = 136550440, node = 0x8239828, id = 136550440, num = 136550440}, { val = 3084869508, node = 0xb7df5f84, id = 3084869508, num = -1210097788}, {val = 137040736, node = 0x82b1360, id = 137040736, num = 137040736}, {val = 136330376, node = 0x8203c88, id = 136330376, num = 136330376}, {val = 135598333, node = 0x81510fd, id = 135598333, num = 135598333}, {val = 136393516, node = 0x821332c, id = 136393516, num = 136393516}} yyvs = 0x8203944 yyvsp = 0x820398c yystacksize = 200 yyn = 313 yyresult = 136603800 yytoken = 10 yyval = {val = 6, node = 0x6, id = 6, num = 6} yymsgbuf = '\000' <repeats 40 times>, "l\022+\b\020\026\a\bH\233#\b\000\000\000\000l\022+\b\020\026\a\b\f\233#\b\000\000\000\000\024\000\000\000\020\026\a\b \233#\b\000\000\000\000\024\000\000\000\f\233#\b\360\064!\b8\234#\bX9 \b\203\026\a\b\360\064!\b\000\000\000\000h9 \b\203\026\a\b" yymsg = 0x82038c0 "" yymsg_alloc = 128 yylen = 9 #9 0x080abf83 in yycompile0 (arg=137082016, tracing=0) at parse.y:5009 n = 136331280 tree = 0xb7f3c3c8 parser = 0x82bb4a0 #10 0x0815641c in ruby_suppress_tracing (func=0x80abe80 <yycompile0>, arg=137082016, always=1) at thread.c:4031 _th = 0x8213290 _tag = {buf = {{__jmpbuf = {136550440, -1210097788, 137040736, 136331256, -858214664, -1502679816}, __mask_was_saved = 0, __saved_mask = {__val = {137040736, 136331128, 3085340191, 136331128, 136393360, 136550440, 3084869508, 136331192, 136550440, 3084869508, 137040736, 136331176, 134679951, 42, 136821896, 20, 136550480, 136569860, 136821896, 136353776, 137082328, 6216, 8, 136331208, 134680280, 136393968, 42, 136331240, 135570501, 136550480, 6216, 137040736}}}}, tag = 0, retval = 137082328, prev = 0x82040ec} th = 0x8213290 state = 0 tracing = 0 raised = 0 result = 4 #11 0x080ac0d5 in yycompile (parser=0x82bb4a0, f=0x82bb428 "/home/sun/app/ruby/lib/ruby/1.9.1/date.rb", line=1) at parse.y:5035 No locals. #12 0x080ac4fa in rb_parser_compile_file (vparser=136550500, f=0x82bb428 "/home/sun/app/ruby/lib/ruby/1.9.1/date.rb", file=136550480, start=1) at parse.y:5164 parser = 0x82bb4a0 tmp = 136331364 node = 0x2 #13 0x080f0ba7 in load_file_internal (arg=136331712) at ruby.c:1582 argp = 0x82041c0 parser = 136550500 fname = 0x82bb428 "/home/sun/app/ruby/lib/ruby/1.9.1/date.rb" script = 0 ---Type <return> to continue, or q <return> to quit--- opt = 0x82041f8 f = 136550480 line_start = 1 tree = 0x0 enc = 0x8246898 set_encoding = 6216 #14 0x080644f9 in rb_ensure (b_proc=0x80f05f7 <load_file_internal>, data1=136331712, e_proc=0x80f0c36 <restore_lineno>, data2=1) at eval.c:695 _th = 0x8213290 _tag = {buf = {{__jmpbuf = {135203894, -1210097788, 137040736, 136331688, -869839112, -2144393992}, __mask_was_saved = 0, __saved_mask = {__val = {136331560, 134966724, 135912338, 2, 136331592, 135234776, 6347, 0, 136331592, 134966758, 135912338, 6347, 0, 136550500, 136331768, 136568020, 136331640, 135427485, 6347, 136336424, 136828320, 72, 0, 136828304, 136828304, 136828320, 137081936, 136331768, 136331688, 135427854, 136828304, 0}}}}, tag = 0, retval = 0, prev = 0x8204274} state = 0 result = 4 #15 0x080f0c9d in load_file (parser=136550500, fname=0x82bb428 "/home/sun/app/ruby/lib/ruby/1.9.1/date.rb", script=0, opt=0x82041f8) at ruby.c:1610 arg = {parser = 136550500, fname = 0x82bb428 "/home/sun/app/ruby/lib/ruby/1.9.1/date.rb", script = 0, opt = 0x82041f8} #16 0x080f0cd7 in rb_load_file (fname=0x82bb428 "/home/sun/app/ruby/lib/ruby/1.9.1/date.rb") at ruby.c:1618 opt = {sflag = 0, xflag = 0, do_loop = 0, do_print = 0, do_line = 0, do_split = 0, do_search = 0, disable = 0, verbose = 0, safe_level = 0, setids = 0, dump = 0, script = 0x0, script_name = 0, e_script = 0, src = {enc = {name = 0, index = -1}}, ext = {enc = {name = 0, index = -1}}, intern = {enc = {name = 0, index = -1}}, req_list = 0} #17 0x080659a9 in rb_load_internal (fname=136550700, wrap=0) at load.c:289 node = 0x8239878 iseq = 137027312 _th = 0x8213290 _tag = {buf = {{__jmpbuf = {136332384, -1210097788, 137040736, 136332104, -870174984, -2146162440}, __mask_was_saved = 0, __saved_mask = {__val = {24, 136331960, 135240468, 129642000, 3924919611, 16, 136332008, 137081984, 137039840, 98, 136331992, 134680280, 136393968, 24, 2369585980, 135615477, 0, 137027312, 136332056, 135235937, 24, 136332384, 136332056, 135615515, 129642000, 4, 42, 137081984, 137081896, 129642000, 137039800, 136332384}}}}, tag = 0, retval = 137040736, prev = 0x8204378} state = 0 th = 0x8213290 wrapper = 0 self = 136591700 loaded = 0 mild_compile_error = 0 #18 0x080664bf in rb_require_safe (fname=136550940, safe=0) at load.c:582 path = 136550700 handle = 1 found = 114 _th = 0x8213290 _tag = {buf = {{__jmpbuf = {136335472, -1210097788, 137040736, 136332376, -870297864, -2141119240}, __mask_was_saved = 0, __saved_mask = {__val = {0, 1, 136393360, 136335472, 3084869508, 136332280, 135570442, 136393360, 136568440, 5752, 1, 3084345380, 136813648, 36, 135571748, 136569860, 136813648, 136353056, 136393360, 5752, 8, 3085304102, 36, 3086202048, 136335472, 136332328, 135570501, 136568440, 5752, 1, 3084345380, 1}}}}, tag = 0, retval = 136332336, prev = 0x8204d38} result = 4 th = 0x8213290 errinfo = 4 state = 0 ---Type <return> to continue, or q <return> to quit--- saved = {safe = 0} ftptr = 0x82b0fb8 "/home/sun/app/ruby/lib/ruby/1.9.1/date.rb" #19 0x08065d59 in rb_f_require (obj=136591700, fname=136550960) at load.c:439 No locals. #20 0x0813ee9b in call_cfunc (func=0x8065d3f <rb_f_require>, recv=136591700, len=1, argc=1, argv=0xb7d76024) at vm_insnhelper.c:292 No locals. #21 0x0813f832 in vm_call_cfunc (th=0x8213290, reg_cfp=0xb7df5f84, num=1, recv=136591700, blockptr=0x0, flag=8, me=0x8291058) at vm_insnhelper.c:386 cfp = 0xb7df5f58 _th = 0x8213290 _tag = {buf = {{__jmpbuf = {760, 136332824, 134680367, 136393968, 103, 136332824}, __mask_was_saved = 135255526, __saved_mask = {__val = {136551000, 136551020, 136584860, 103, 136584860, 760, 136332888, 135262636, 137038364, 136551028, 1, 136393360, 136335472, 3084869508, 136332904, 135234776, 8456, 137038304, 0, 0, 0, 8456, 20, 0, 136335472, 3084869508, 136332952, 135562233, 136609856, 8456, 136332940, 2}}}}, tag = 0, retval = 1048576, prev = 0x8204d38} val = 0 state = 0 def = 0x8291090 klass = 136593940 id = 8456 #22 0x0813fd3d in vm_call_method (th=0x8213290, cfp=0xb7df5f84, num=1, blockptr=0x0, flag=8, id=8456, me=0x8291058, recv=136591700) at vm_insnhelper.c:511 val = 136551780 #23 0x08144196 in vm_exec_core (th=0x8213290, initial=0) at insns.def:994 v = 4 me = 0x8291058 recv = 136591700 flag = 8 klass = 136591680 blockptr = 0x0 num = 1 id = 8456 val = 4 ic = 0x82b04d0 blockiseq = 0x0 op_argc = 1 op_id = 8456 op_flag = 8 reg_pc = 0x82b1360 reg_cfp = 0xb7df5f84 insns_address_table = {0x8141f0c, 0x8141f1f, 0x8141f97, 0x8141ff2, 0x814208b, 0x81420f3, 0x81421b4, 0x8142257, 0x81422e9, 0x8142361, 0x814240a, 0x8142499, 0x814254a, 0x81425dc, 0x814264e, 0x81426a6, 0x8142701, 0x814275d, 0x81427bb, 0x814286b, 0x81428d8, 0x814294a, 0x8142a2e, 0x8142ab0, 0x8142bd2, 0x8142c72, 0x8142ce4, 0x8142d59, 0x8142ec5, 0x8142f90, 0x81431d0, 0x81432c8, 0x814337b, 0x81433ae, 0x814344e, 0x81434e3, 0x814357b, 0x81435e9, 0x8143661, 0x81436f7, 0x8143731, 0x8143b75, 0x8143c00, 0x8144030, 0x814420c, 0x81443e2, 0x8144498, 0x814458b, 0x81445cf, 0x8144658, 0x81446a6, 0x814471e, 0x8144796, 0x814483c, 0x81448ea, 0x81449d3, 0x8144afe, 0x8144b4d, 0x8144e9e, 0x8145160, 0x8145450, 0x81457d7, 0x8145be2, 0x8145d7b, 0x8145f9c, 0x8146236, 0x8146406, 0x81466a0, 0x8146870, 0x8146a87, 0x8146c9b, 0x8146eff, 0x8147186, 0x81473c2, 0x81475d4, 0x8147742, 0x81477c9, 0x814788a, 0x81478ed, 0x8147952} #24 0x0814e674 in vm_exec (th=0x8213290) at vm.c:1117 _th = 0x8213290 _tag = {buf = {{__jmpbuf = {136335472, 0, 0, 136334904, -868421896, -1519756040}, __mask_was_saved = 0, __saved_mask = {__val = {137038208, 136334744, 135504907, 1, 0, 136334744, 135503935, 137038208, 136334752, 136334792, 135443162, 137038056, ---Type <return> to continue, or q <return> to quit--- 136334752, 0, 0, 136334776, 3085340191, 136334792, 135505861, 137038208, 137038316, 0, 137039760, 136334752, 3084869552, 1, 136334824, 135579190, 136393360, 0, 81, 4}}}}, tag = 0, retval = 4, prev = 0x8204e84} state = 0 result = 1 err = 136334904 initial = 0 escape_dfp = 0x0 #25 0x0814ecb6 in rb_iseq_eval (iseqval=136551660) at vm.c:1327 th = 0x8213290 val = 0 tmp = 3 #26 0x08065a08 in rb_load_internal (fname=136552920, wrap=0) at load.c:293 node = 0x8239d14 iseq = 136551660 _th = 0x8213290 _tag = {buf = {{__jmpbuf = {136335472, 0, 0, 136335192, -868610312, -2146162440}, __mask_was_saved = 0, __saved_mask = {__val = {24, 136335048, 135240468, 372735741, 4082522556, 16, 136335096, 137027536, 137027428, 0, 136335080, 134680280, 136393968, 24, 1273695967, 135615477, 0, 137027312, 136335144, 135235937, 24, 11, 136335144, 135615515, 372735741, 4, 37, 137027536, 135917544, 137023241, 137027392, 136392712}}}}, tag = 0, retval = 0, prev = 0x8204f88} state = 0 th = 0x8213290 wrapper = 0 self = 136591700 loaded = 1 mild_compile_error = 0 #27 0x080664bf in rb_require_safe (fname=136553280, safe=0) at load.c:582 path = 136552920 handle = 135801851 found = 114 _th = 0x8213290 _tag = {buf = {{__jmpbuf = {136323376, 0, 0, 136335464, -868733192, -2141119240}, __mask_was_saved = 0, __saved_mask = {__val = {0, 136335320, 134682243, 136393968, 0, 0, 0, 0, 0, 136393360, 136393968, 0, 0, 136335352, 135243911, 0, 0, 0, 136553280, 0, 0, 136335400, 135244261, 136553288, 135801851, 10, 0, 0, 136553280, 0, 10, 0}}}}, tag = 0, retval = 136335432, prev = 0x82050b4} result = 4 th = 0x8213290 errinfo = 4 state = 0 saved = {safe = 0} ftptr = 0x82adf40 "/home/sun/lab/ruby-ucontext/hello.rb" #28 0x08066613 in rb_require (fname=0x8182bfb "./hello.rb") at load.c:618 fn = 136553280 #29 0x08064429 in rb_protect (proc=0x80665bd <rb_require>, data=135801851, state=0x8205244) at eval.c:670 _th = 0x8213290 _tag = {buf = {{__jmpbuf = {136323376, 0, 0, 136335896, -871911688, -2144408328}, __mask_was_saved = 0, __saved_mask = {__val = {136335696, 3086922597, 0, 0, 0, 0, 6, 0, 0, 0, 0, 3084897640, 3086991092, 136335644, 24, 11229533, 3084878060, 359345080, 8, 0, 0, 5, 624, 3084878104, 3086880104, 134573205, 3084934616, 134537100, 1, 3087003588, 136335920, 3087005720}}}}, tag = 0, retval = 3086923193, prev = 0x0} result = 4 status = 0 th = 0x8213290 cfp = 0xb7df5fdc ---Type <return> to continue, or q <return> to quit--- trap_tag = {prev = 0x0} org_jmpbuf = {{__jmpbuf = {0, 0, 0, 0, 0, 0}, __mask_was_saved = 0, __saved_mask = {__val = { 0 <repeats 32 times>}}}} #30 0x0805d09f in ruby_context_body_require (file=0x8182bfb "./hello.rb") at main.c:38 error = -1210091840 result = 3086202048 #31 0x0805d211 in ruby_context_body () at main.c:78 i = 3 #32 0xb7e3303b in makecontext () from /lib/libc.so.6 No symbol table info available. #33 0x08203140 in ?? () No symbol table info available. #34 0x00000000 in ?? () No symbol table info available. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26253] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
File ruby-ucontext.tgz added Hi, I ran a new experiment where the Ruby interpreter is completely enclosed by a System V context (previously it was initialized on the main() stack, and then run inside a System V context). Attached is a tarball containing source code and output log file. In this experiment, I noticed that Ruby 1.8.6 and 1.8.7 exhibit the same behavior (failure is in Kernel#require inside rb_require()) as they did in the original example test case. In contrast, Ruby 1.9 fails immediately at ruby_init(). Thanks for your consideration. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26255] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
File ruby-ucontext-half.tgz added File ruby-ucontext-full.tgz added Hi, For your convenience, I am attaching two tarballs: ruby-ucontext-half.tgz - example test case with ruby_init() in main() and rb_require() in SysV context ruby-ucontext-full.tgz - example test case with *both* ruby_init() and rb_require() inside SysV context Inside the tarballs, you will find an "output.log" file that shows the results of running `./run.sh` on my system. At this point, I believe the trouble I am having is due to Ruby stack initialization making assumptions that are not satisfied by the UNIX System V context containing Ruby. I will try to hack the Ruby source code @ SVN trunk to correct these assumptions accordingly. Any hints would be greatly appreciated. :-) Thanks for your consideration. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26257] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
Hi, I ran the ruby-ucontext-full.tgz example on Ruby @ SVN trunk in a debugger and found that the real problem was being hidden by a call to rb_longjmp(). Below is the stack trace of the real problem, just before the long jump is executed. The real problem is that the "stdin" value passed from Inito_IO() to prep_stdio() is becoming corrupted somehow: (gdb) f #1 0x0808b2e4 in Init_IO () at io.c:9785 (gdb) p stdin $3 = (struct _IO_FILE *) 0xb7f3b420 (gdb) down #0 prep_stdio (f=0x8213008, fmode=1, klass=136569860, path=0x81860bd "<STDIN>") at io.c:6267 Notice that stdin is 0xb7f3b420 inside Init_IO(), but inside prep_stdio() its value is 0x8213008. This can only mean *one thing*: the stack pointer in Init_IO() is radically different from the stack pointer in prep_stdio(), and the arguments for the function call to prep_stdio() are being placed at a different stack address than what prep_stdio() is reading from, as illustrated in this pseudo-assembly code: Init_IO(): stack.push stdin # 0xb7f3b420 (correct value) stack.push fmode stack.push klass stack.push path stack.push program_counter + size_of_machine_instruction jump prep_stdio prep_stdio(): # PROBLEM: stack pointer is wrong! return_address = stack.pop path = stack.pop klass = stack.pop fmode = stack.pop stdin = stack.pop # 0x8213008 (wrong value!) Any suggestions? Thanks for your consideration. ############################################################### # The full backtrace before longjmp() is executed: ############################################################### (gdb) bt full #0 0xb7e23201 in siglongjmp () from /lib/libc.so.6 No symbol table info available. #1 0x08063e73 in rb_longjmp (tag=6, mesg=136568440) at eval.c:425 at = 136588340 e = 136568440 th = 0x8213290 file = 0x0 line = 0 #2 0x08063eaa in rb_exc_raise (mesg=136568440) at eval.c:434 No locals. #3 0x08061866 in rb_raise (exc=136570260, fmt=0x8185657 "closed stream") at error.c:1150 args = 0x8205108 "h\275'\b\264\336#\b\b0!\b\001" mesg = 136568460 #4 0x0807a6e2 in rb_io_check_closed (fptr=0x827bd68) at io.c:248 No locals. #5 0x08085044 in prep_stdio (f=0x8213008, fmode=1, klass=136569860, path=0x81860bd "<STDIN>") at io.c:6267 fptr = 0x827bd68 io = 136568500 #6 0x0808b2e4 in Init_IO () at io.c:9785 rb_cARGF = 136570780 #7 0x0807a453 in rb_call_inits () at inits.c:43 No locals. #8 0x08063401 in ruby_init () at eval.c:59 _th = 0x8213290 _tag = {buf = {{__jmpbuf = {136323376, 0, 0, 136335960, -891095361, -2044316993}, __mask_was_saved = 0, __saved_mask = {__val = {134563877, 1, 136335872, 3086940374, 3087005720, 3084878200, 1, 1, 0, 1, 136335864, 3086200820, 136335880, 3085687571, 3086200820, 136335896, 3085687736, 3, 136335880, 8388608, 4294967295, 0, 0, 136335960, 135598991, 8388608, 0, 5, 0, 136335960, 3085266387, 136335960}}}}, tag = 0, retval = 0, prev = 0x0} initialized = 1 state = 0 #9 0x0805d235 in ruby_context_body () at main.c:84 variable_in_this_stack_frame = 0 i = 2 argc = 0 argv = 0x8182bc9 #10 0xb7e3303b in makecontext () from /lib/libc.so.6 No symbol table info available. #11 0x08203140 in ?? () No symbol table info available. #12 0x00000000 in ?? () No symbol table info available. (gdb) ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26258] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
Hi, I inspected the assembler code for the prep_stdio() function call inside Init_IO() and found that the problem was *not* a corrupted stack pointer as I had imagined, but instead, the wrong argument value was being passed to prep_stdio() by the assembler code: rb_stdin = prep_stdio(stdin, FMODE_READABLE, rb_cIO, "<STDIN>"); Dump of assembler code from 0x808b2bd to 0x808b3bd: 0x0808b2bd <Init_IO+4171>: mov 0x8212980,%edx 0x0808b2c3 <Init_IO+4177>: mov 0x8202fa4,%eax # <=== HERE 0x0808b2c8 <Init_IO+4182>: movl $0x81860bd,0xc(%esp) 0x0808b2d0 <Init_IO+4190>: mov %edx,0x8(%esp) 0x0808b2d4 <Init_IO+4194>: movl $0x1,0x4(%esp) 0x0808b2dc <Init_IO+4202>: mov %eax,(%esp) # <=== stdin 0x0808b2df <Init_IO+4205>: call 0x8084fee <prep_stdio> For some reason, the assembler code is passing the wrong value for the "stdin" parameter. GDB shows that the value of "stdin" inside Init_IO() is: (gdb) p stdin $8 = (struct _IO_FILE *) 0xb7f3b420 But the assembler code thinks that "stdin" is 0x8202fa4 (see "HERE" above). Any suggestions for debugging? Thanks for your consideration. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26259] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
Sorry, I meant that the assembler code thinks that "stdin" is 0x8213008. The value is initially 0x8202fa4 when stored in the EAX register, but at the time of the call instruction, the value is 0x8213008. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26266] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
Hi, I did some more debugging to find out why the value of "stdin" was incorrect inside Ruby's prep_stdio() but correct in main(). In my compilation of the ruby-ucontext-full.tgz test case, the value of "stdin" is always located at memory address 0x8202fa4. Before the System V context that houses Ruby is created in main(), the value at memory address 0x8202fa4 is 0xb7f3b420. During the course of running the System V context, the stack pointer occupies memory address 0x8202fa4 (which is supposed to be reserved for the "stdin" variable!) and overwrites its value with 0x8213008 -- which is the value of "stdin" as read inside Ruby's prep_stdio() function. By setting a watchpoint in GDB to stop the debugger as soon as the value at memory address 0x8202fa4 does not equal 0xb7f3b420, I found that the stack pointer was occupying the memory for "stdin". In conclusion, the problem is that the System V context's pre-allocated stack of SIGSTKSZ bytes (8192 bytes on my system) is insuffient to support the execution of the Ruby interpreter. I will try to malloc() a large region of heap memory according to getrlimit() results for use as the System V context's stack and I will post a new example test case that makes ruby-ucontext-full.tgz behave in the same way as ruby-ucontext-half.tgz: failure at Kernel#require inside rb_require() inside rb_protect inside SysV context. Thanks for your consideration. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26269] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
File ruby-ucontext-full.tgz added Hi, I am attaching a new ruby-ucontext-full.tgz example test case which statically allocates 4 MiB of memory for the System V context's (which houses the embedded Ruby interpreter) stack. Now the ruby-ucontext-full.tgz example fails at the same location as ruby-ucontext-half.tgz does: Program received signal SIGSEGV, Segmentation fault. #0 mark_locations_array (objspace=0x86114f0, x=0x86d7000, n=-303783813) at gc.c:1312 #1 0x08071bf8 in gc_mark_locations (objspace=0x86114f0, start=0x8601680, end=0xbffff1f0) at gc.c:1328 #2 0x080732f5 in mark_current_machine_context (objspace=0x86114f0, th=0x8611290) at gc.c:2123 ... Furthermore, this change fixes the problem of Kernel#require failing inside rb_require() for Ruby 1.8.6 and 1.8.7, as the "output.log" file inside ruby-ucontext-full.tgz shows. I will now debug the above backtrace for Ruby @ SVN trunk. Thanks for your consideration. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26270] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
Hi, I debugged the segfault during Kernel#require inside rb_require() inside rb_protect() inside a SysV context, and found that the culprit is gc_mark_locations(). It is processing (and corrupting) a small portion of the SysV context's stack space, regardless of whether the stack space is statically or dynamically allocated, as shown in the GDB output below. Notice that the "start" argument for gc_mark_locations() is within ruby_context.uc_ss_sp and ss_sp + ss_size. To solve this problem, I will try to add a function in Ruby's C API that tells Ruby the boundaries of its stack. This is strangely reminiscent of my feature request #2126. I suppose my experiments and discoveries so far provide make a case for exposing stack functions in the Ruby C API. Thanks for your consideration. ############################################################### # Statically allocated SysV context stack ############################################################### (gdb) p ruby_context.uc_stack $19 = {ss_sp = 0x82032a0, ss_flags = 0, ss_size = 4194304} (gdb) p /x ruby_context.uc_stack.ss_sp + ruby_context.uc_stack.ss_size $18 = 0x86032a0 (gdb) f #1 0x08071bf8 in gc_mark_locations (objspace=0x86114f0, start=0x8601680, end=0xbffff1f0) at gc.c:1328 ############################################################### # Dynamically allocated SysV context stack ############################################################### (gdb) p ruby_context.uc_stack $15 = {ss_sp = 0xb79f6008, ss_flags = 0, ss_size = 4194304} (gdb) p /x ruby_context.uc_stack.ss_sp + ruby_context.uc_stack.ss_size $16 = 0xb7df6008 (gdb) f #1 0x08071c00 in gc_mark_locations (objspace=0x82114f0, start=0xb7df4430, end=0xbffff1f0) at gc.c:1328 ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26279] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
File 0001-make-SET_STACK_END-macro-respect-rb_thread_t.machine.patch added Hi, The root cause of the problem of gc_mark_locations() processing (and corrupting) a portion of the SysV context's stack space was the SET_STACK_END macro. It was blindly setting machine_stack_end without respecting the machine_stack_maxsize limit in rb_thread_t. I am attaching a patch which solves this problem. I ran `make test` after applying this patch and all tests pass successfully, but it needs to be tested on more architectures (64-bit and opposite stack grow direction): PASS all 949 tests ./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./tool/runruby.rb --extout=.ext -- "./bootstraptest/runner.rb" --ruby="ruby" ./KNOWNBUGS.rb 2009-10-24 11:23:47 -0700 Driver is ruby 1.9.2dev (2009-10-23 trunk 25426) [i686-linux] Target is ruby 1.9.2dev (2009-10-23 trunk 25426) [i686-linux] With this patch, the ruby-ucontext-full.tgz example is able to proceed further --- but it still does not complete successfully. There still seems to be some amount of memory corruption occuring at the new point of failure (see below). Notice the fname parameter in some of these stack frames; the "`\266k\be" in "`\266k\be/sun/app/ruby/lib/ruby/1.9.1/date.rb" should really be "/home". I will debug this memory corruption now and try to make the ruby-ucontext-full.tgz example run successfully to completion. Thanks for your consideration. ############################################################### # new point of failure for Kernel#require inside rb_protect() ############################################################### Program received signal SIGSEGV, Segmentation fault. 0x080abc85 in parser_yyerror (parser=0x86b94a0, msg=0x86018c0 "syntax error, unexpected $end, expecting keyword_end") at parse.y:4897 (gdb) bt #0 0x080abc85 in parser_yyerror (parser=0x86b94a0, msg=0x86018c0 "syntax error, unexpected $end, expecting keyword_end") at parse.y:4897 #1 0x080ab651 in ruby_yyparse (parser=0x86b94a0) at parse.c:10412 #2 0x080ac10f in yycompile0 (arg=141268128, tracing=0) at parse.y:5009 #3 0x08156601 in ruby_suppress_tracing (func=0x80ac00c <yycompile0>, arg=141268128, always=1) at thread.c:4031 #4 0x080ac261 in yycompile (parser=0x86b94a0, f=0x86b9428 "`\266k\be/sun/app/ruby/lib/ruby/1.9.1/date.rb", line=1) at parse.y:5035 #5 0x080ac686 in rb_parser_compile_file (vparser=140736600, f=0x86b9428 "`\266k\be/sun/app/ruby/lib/ruby/1.9.1/date.rb", file=140736580, start=1) at parse.y:5164 #6 0x080f0d33 in load_file_internal (arg=140517824) at ruby.c:1582 #7 0x08064521 in rb_ensure (b_proc=0x80f0783 <load_file_internal>, data1=140517824, e_proc=0x80f0dc2 <restore_lineno>, data2=1) at eval.c:695 #8 0x080f0e29 in load_file (parser=140736600, fname=0x86b9428 "`\266k\be/sun/app/ruby/lib/ruby/1.9.1/date.rb", script=0, opt=0x86021f8) at ruby.c:1610 #9 0x080f0e63 in rb_load_file (fname=0x86b9428 "`\266k\be/sun/app/ruby/lib/ruby/1.9.1/date.rb") at ruby.c:1618 #10 0x080659d1 in rb_load_internal (fname=140736800, wrap=0) at load.c:289 #11 0x080664e7 in rb_require_safe (fname=140737040, safe=0) at load.c:582 #12 0x08065d81 in rb_f_require (obj=140777820, fname=140737060) at load.c:439 #13 0x0813f027 in call_cfunc (func=0x8065d67 <rb_f_require>, recv=140777820, len=1, argc=1, argv=0xb7d76024) at vm_insnhelper.c:292 #14 0x0813f9be in vm_call_cfunc (th=0x8611290, reg_cfp=0xb7df5f84, num=1, recv=140777820, blockptr=0x0, flag=8, me=0x868f058) at vm_insnhelper.c:386 #15 0x0813fec9 in vm_call_method (th=0x8611290, cfp=0xb7df5f84, num=1, blockptr=0x0, flag=8, id=8456, me=0x868f058, recv=140777820) at vm_insnhelper.c:511 #16 0x08144322 in vm_exec_core (th=0x8611290, initial=0) at insns.def:994 #17 0x0814e800 in vm_exec (th=0x8611290) at vm.c:1117 #18 0x0814ee42 in rb_iseq_eval (iseqval=140737760) at vm.c:1327 #19 0x08065a30 in rb_load_internal (fname=140739020, wrap=0) at load.c:293 #20 0x080664e7 in rb_require_safe (fname=140739380, safe=0) at load.c:582 #21 0x0806663b in rb_require (fname=0x8182e1e "./hello.rb") at load.c:618 #22 0x08064451 in rb_protect (proc=0x80665e5 <rb_require>, data=135802398, state=0x8603244) at eval.c:670 #23 0x0805d09f in ruby_context_body_require (file=0x8182e1e "./hello.rb") at main.c:38 #24 0x0805d282 in ruby_context_body () at main.c:93 #25 0xb7e3303b in makecontext () from /lib/libc.so.6 #26 0x08203140 in ?? () #27 0x00000000 in ?? () ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26286] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
Hi, The segfault mentioned in my previous message no longer occurs with the newer Ruby @ SVN r25457 plus my SET_STACK_END patch. The ruby-ucontext-full.tgz example now runs to completion without a segfault. However, an IO exception is raised during the call to Kernel.require('date') as follows: Ruby: require 'hello' begin ~~~~> Hello World! The time is 2009-10-24 18:52:00 -0700. ~~~~> Doing relay from /home/sun/lab/ruby-ucontext/hello.rb:3 Relay: ruby => main Relay: main <= ruby Relay: main => ruby Relay: ruby <= main ~~~~> OMG, back from main!! :-) rb_require('./hello.rb') failed with status=6 ... because an exception was raised: #<IOError: closed stream> /home/sun/lab/ruby-ucontext/hello.rb:7:in `require' /home/sun/lab/ruby-ucontext/hello.rb:7:in `<top (required)>' Ruby: require 'hello' end The corresponding GDB backtrace for this exception shows really strange file names (which seem to be source lines from a previously read file --- the standard "date.rb"): #0 rb_raise (exc=140756320, fmt=0x8185b03 "closed stream") at error.c:1150 [...] #14 0x080ac3a1 in yycompile (parser=0x86af230, f=0x86af158 " # The method will attempt to parse a date-time from the String\n", line=1) at parse.y:5035 #15 0x080ac7c6 in rb_parser_compile_file (vparser=140736400, f=0x86af158 " # The method will attempt to parse a date-time from the String\n", file=140736380, start=1) at parse.y:5164 #16 0x080f0e73 in load_file_internal (arg=140517824) at ruby.c:1582 #17 0x08064571 in rb_ensure (b_proc=0x80f08c3 <load_file_internal>, data1=140517824, e_proc=0x80f0f02 <restore_lineno>, data2=1) at eval.c:695 #18 0x080f0f69 in load_file (parser=140736400, fname=0x86af158 " # The method will attempt to parse a date-time from the String\n", script=0, opt=0x86021f8) at ruby.c:1610 #19 0x080f0fa3 in rb_load_file (fname=0x86af158 " # The method will attempt to parse a date-time from the String\n") at ruby.c:1618 #20 0x08065a21 in rb_load_internal (fname=140736600, wrap=0) at load.c:289 [...] Is this another case of memory corruption? Or perhaps this is a side-effect of setjmp/longjmp being used for exception handling? Thanks for your consideration. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26288] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
Hi, By adding a watchpoint on the filename, I found that it was being free()d by rb_newobj_from_heap() (not directly but via garbage_collect()) before allocating space for a few lines read from the standard "date.rb" file (see below). How strange! Why does the GC feel pressured to free the filename (which is a VALUE inside Ruby's stack space)? Is there not enough heap space for it to allocate a new object? These are the questions I will investigate next. Feel free to give me a hint if you know the answer. Thanks for your consideration. (gdb) bt #0 0xb7e65b21 in _int_free () from /lib/libc.so.6 #1 0xb7e68d4d in free () from /lib/libc.so.6 #2 0x08070f4e in vm_xfree (objspace=0x86114f0, ptr=0x86af158) at gc.c:730 #3 0x080710a5 in ruby_xfree (x=0x86af158) at gc.c:778 #4 0x080fc031 in rb_str_free (str=140736600) at string.c:772 #5 0x0807315e in obj_free (objspace=0x86114f0, obj=140736600) at gc.c:2000 #6 0x08072c34 in gc_sweep (objspace=0x86114f0) at gc.c:1876 #7 0x080737c0 in garbage_collect (objspace=0x86114f0) at gc.c:2204 #8 0x08071662 in rb_newobj_from_heap (objspace=0x86114f0) at gc.c:1011 #9 0x0807171b in rb_newobj () at gc.c:1094 #10 0x080fab39 in str_alloc (klass=140776360) at string.c:378 #11 0x080fabd6 in str_new (klass=140776360, ptr=0x86bab89 " new_by_frags(elem, sg)\n end\n\n # Create a new DateTime object by parsing from a String,\n # without specifying the format.\n #\n # +str+ is a String holding a date-time representation.\n # +comp+"..., len=27) at string.c:397 #12 0x080fad61 in rb_str_new (ptr=0x86bab89 " new_by_frags(elem, sg)\n end\n\n # Create a new DateTime object by parsing from a String,\n # without specifying the format.\n #\n # +str+ is a String holding a date-time representation.\n # +comp+"..., len=27) at string.c:417 #13 0x0807e083 in rb_io_getline_fast (fptr=0x86af2e8, enc=0x8644898) at io.c:2254 #14 0x0807e4fc in rb_io_getline_1 (rs=140755540, limit=-1, io=140736380) at io.c:2347 #15 0x0807e884 in rb_io_gets (io=140736380) at io.c:2436 #16 0x080ac71f in lex_io_gets (parser=0x86af230, io=140736380) at parse.y:5140 #17 0x080ac534 in lex_getline (parser=0x86af230) at parse.y:5072 #18 0x080ac8b5 in parser_nextc (parser=0x86af230) at parse.y:5221 #19 0x080afa65 in parser_yylex (parser=0x86af230) at parse.y:6453 #20 0x080b2a78 in yylex (lval=0x8601df4, p=0x86af230) at parse.y:7658 #21 0x080a2b1e in ruby_yyparse (parser=0x86af230) at parse.c:4733 #22 0x080ac24f in yycompile0 (arg=141226544, tracing=0) at parse.y:5009 #23 0x08156741 in ruby_suppress_tracing (func=0x80ac14c <yycompile0>, arg=141226544, always=1) at thread.c:4031 #24 0x080ac3a1 in yycompile (parser=0x86af230, f=0x86af158 "@\364j\be/sun/app/ruby/lib/ruby/1.9.1/date.rb", line=1) at parse.y:5035 #25 0x080ac7c6 in rb_parser_compile_file (vparser=140736400, f=0x86af158 "@\364j\be/sun/app/ruby/lib/ruby/1.9.1/date.rb", file=140736380, start=1) at parse.y:5164 #26 0x080f0e73 in load_file_internal (arg=140517824) at ruby.c:1582 ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26289] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
Sorry, I meant that the filename is a valid VALUE in the memory range that is scanned by mark_current_machine_context(). The filename is certainly *not* in Ruby's stack space. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26290] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
File 0001-add-ruby_bind_stack-to-inform-GC-about-explicit-stac.patch added File ruby-ucontext-full.tgz added Hi, I am happy to announce that the problem is now solved! :-) The attached 0001-add-ruby_bind_stack*.patch file adds a ruby_bind_stack() function to the Ruby C API which allows me to inform the GC about the stack boundaries of the System V context in which the Ruby interperter is running: void ruby_bind_stack(VALUE *lower, VALUE *upper); I am also attaching an updated ruby-ucontext-full.tgz example which makes use of the above ruby_bind_stack() function when it is available. Continue reading for a detailed explanation of the problem. Thanks for your consideration. ########################################################## # Problem explanation ########################################################## The problem was that the GC assumed that Ruby's stack was aligned with the native pthread's stack: upper=0xc1bff1f0 lower=0xbffff1f0 As Ruby executes, the lower boundary is adjusted to reflect the current C stack pointer by calls to the SET_STACK_END macro. In contrast, the upper boundary is not updated at all. When the GC runs, it scans from the current stack lower boundary to the upper boundary. Since the lower boundary was updated to reflect the C stack pointer, we face the following situation: (high memory address) 0xc1bff1f0 Ruby's stack upper boundary 0x086032a0 System V context's stack upper boundary 0x08601680 Ruby's stack lower boundary (after update by SET_STACK_END) 0x082032a0 System V context's stack lower boundary (low memory address) To correct this situation, we need to update Ruby's stack upper boundary to reflect the System V context's stack upper boundary: (high memory address) 0x086032a0 Ruby's stack upper boundary and also System V context's stack upper boundary 0x08601680 Ruby's stack lower boundary (after update by SET_STACK_END) 0x082032a0 System V context's stack lower boundary (low memory address) For machines where the stack grows upward, a similar problem would be faced where Ruby's stack lower boundary would need to be updated to reflect the System V context's stack lower boundary. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26292] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
File ruby-ucontext-static-stack.tgz added File ruby-ucontext-dynamic-stack.tgz added Hi, I am attaching two versions of the ruby-ucontext-full.tgz example: one which uses a statically allocated stack, and one which uses a dynamically allocated stack for the UNIX System V context which houses the Ruby interpreter. Thanks for your consideration. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26293] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
File ruby-libpcl-dynamic-stack.tgz added File ruby-libpcl-static-stack.tgz added File ruby-ucontext-dynamic-stack.tgz added File ruby-ucontext-static-stack.tgz added Hi, I am attaching variations of the ruby-ucontext examples which use libpcl[1] instead of UNIX System V contexts, as well as updated versions of the ruby-ucontext examples. Each tarball has an "output.log" file which contains the result of running `script -c ./run.sh output.log` on my machine: > uname -a Linux yantram 2.6.31-ARCH #1 SMP PREEMPT Tue Oct 13 13:36:23 CEST 2009 i686 Intel(R) Pentium(R) D CPU 3.00GHz GenuineIntel GNU/Linux The last section in output.log is for a Ruby 1.9.2dev which is patched with the 0001-add-ruby_bind_stack*.patch attached to this bug report. Thanks for your consideration. [1]: http://www.xmailserver.org/libpcl.html ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
|
|
[ruby-core:26298] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context failsIssue #2258 has been updated by Suraj Kurapati.
File ruby_bind_stack.patch added Hi, I am attaching a new "ruby_bind_stack.patch" file which fixes a bug in my previous patch, adds a Changelog entry, and renames the variables to better reflect their function. Thanks for your consideration. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2258 ---------------------------------------- http://redmine.ruby-lang.org |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |