Christian N. wrote:
I noticed that too (late), doing “make install” before testing makes it go
away, probably a path issue of the ruby interpreter.
Hmmm… So this may have something to do with the already installed
copy of Ruby that is in my /usr/bin path? I’ve tried a few more builds.
Let me list the results:
(just a note, the last build and these first few builds had the CFLAGS
environment variable set to “-mcpu=G5 -mtune=G5 -O3”)
First new run:
$ sudo gcc_select 3.3
$ ./configure --prefix=/usr
$ make
$ make test-all
results:
…/miniruby ./runruby.rb --extout=.ext – -C “./test” runner.rb
–runner=console
Loaded suite .
Started
Finished in 157.68762 seconds.
- Failure:
test_cgi(TestWEBrickCGI)
[./webrick/test_cgi.rb:27:in test_cgi' /usr/src/ruby/ruby-1.8.4/lib/net/http.rb:1049:in
request’
/usr/src/ruby/ruby-1.8.4/lib/net/http.rb:2104:in reading_body' /usr/src/ruby/ruby-1.8.4/lib/net/http.rb:1048:in
request’
/usr/src/ruby/ruby-1.8.4/lib/net/http.rb:1033:in request' /usr/src/ruby/ruby-1.8.4/lib/net/http.rb:545:in
start’
/usr/src/ruby/ruby-1.8.4/lib/net/http.rb:1031:in request' ./webrick/test_cgi.rb:27:in
test_cgi’
./webrick/utils.rb:26:in start_server' ./webrick/utils.rb:34:in
start_httpserver’
./webrick/test_cgi.rb:24:in `test_cgi’]:
<"/webrick.cgi"> expected but was
<"\n\n
Internal Server Error\n \n
Internal Server Error
\n Premature end of script headers:
/usr/src/ruby/ruby-1.8.4/test/webrick/webrick.cgi\n
\n
\n WEBrick/1.3.1 (Ruby/1.8.4/2005-12-24) OpenSSL/0.9.7b
at\n 127.0.0.1:64887\n \n \n\n">.
1313 tests, 14436 assertions, 1 failures, 0 errors
make: *** [test-all] Error 1
second run:
$ ./miniruby ./runruby.rb --extout=.ext – -C “./test” runner.rb
–runner=console
results:
third run:
$ sudo gcc_select 4.0
$ make clean
$ ./configure --prefix=/usr
$ make
$ make test-all
results:
fourth run:
$ gdb make
(gdb) run test-all
results:
Starting program: /usr/bin/make test-all
Reading symbols for shared libraries . done
…/miniruby ./runruby.rb --extout=.ext – -C “./test” runner.rb
–runner=console
Loaded suite .
Started
…/usr/src/ruby/ruby-1.8.4/lib/rinda/tuplespace.rb:173:
[BUG] Segmentation fault
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.3.0]
make: *** [test-all] Abort trap
Program exited with code 02.
(gdb) bt
No stack.
fifth run:
(I see that I couldn’t get a backtrace so I’ll try to run it outside of
make.)
I’m cutting the commands and results short since the debugger caught a
lot of SIGPIPE signals.
here is one result i received, with a backtrace:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xc24bc195
0x0000d608 in rb_eval ()
(gdb) bt
#0 0x0000d608 in rb_eval ()
#1 0x0000d658 in rb_eval ()
warning: Previous frame identical to this frame (corrupt stack?)
#2 0x0000bc1c in rb_eval ()
#3 0x0001104c in rb_call0 ()
#4 0x00011874 in rb_call ()
#5 0x0000d834 in rb_eval ()
#6 0x0000e710 in rb_eval ()
#7 0x0000c520 in rb_eval ()
#8 0x0001104c in rb_call0 ()
#9 0x00011874 in rb_call ()
#10 0x0000d834 in rb_eval ()
#11 0x0001104c in rb_call0 ()
#12 0x00011874 in rb_call ()
#13 0x0000d834 in rb_eval ()
#14 0x0000ce14 in rb_eval ()
#15 0x0001104c in rb_call0 ()
#16 0x00011874 in rb_call ()
#17 0x0000db30 in rb_eval ()
#18 0x0001104c in rb_call0 ()
#19 0x00011874 in rb_call ()
#20 0x00012440 in rb_f_send ()
#21 0x00010a80 in rb_call0 ()
#22 0x00011874 in rb_call ()
#23 0x0000d834 in rb_eval ()
#24 0x0001f238 in block_pass ()
#25 0x0000c6cc in rb_eval ()
#26 0x0000ce14 in rb_eval ()
#27 0x0001104c in rb_call0 ()
#28 0x00011874 in rb_call ()
#29 0x0000d834 in rb_eval ()
#30 0x0001104c in rb_call0 ()
#31 0x00011874 in rb_call ()
#32 0x0000d834 in rb_eval ()
#33 0x0000e9dc in rb_eval ()
#34 0x0001104c in rb_call0 ()
#35 0x00011874 in rb_call ()
#36 0x0000db30 in rb_eval ()
#37 0x0000ce14 in rb_eval ()
#38 0x0000cfcc in rb_eval ()
#39 0x0001104c in rb_call0 ()
#40 0x00011874 in rb_call ()
#41 0x0000d834 in rb_eval ()
#42 0x0001f238 in block_pass ()
#43 0x0000c6cc in rb_eval ()
#44 0x000188a0 in rb_yield_0 ()
#45 0x000322e4 in rb_ary_each ()
#46 0x00010a80 in rb_call0 ()
#47 0x00011874 in rb_call ()
#48 0x0000d834 in rb_eval ()
#49 0x0000c894 in rb_eval ()
#50 0x0001104c in rb_call0 ()
#51 0x00011874 in rb_call ()
#52 0x0000d834 in rb_eval ()
#53 0x0001f238 in block_pass ()
#54 0x0000c6cc in rb_eval ()
#55 0x000188a0 in rb_yield_0 ()
#56 0x000322e4 in rb_ary_each ()
#57 0x00010a80 in rb_call0 ()
#58 0x00011874 in rb_call ()
#59 0x0000d834 in rb_eval ()
#60 0x0000c894 in rb_eval ()
#61 0x0001104c in rb_call0 ()
#62 0x00011874 in rb_call ()
#63 0x0000d834 in rb_eval ()
#64 0x0001f238 in block_pass ()
#65 0x0000c6cc in rb_eval ()
#66 0x000188a0 in rb_yield_0 ()
#67 0x000322e4 in rb_ary_each ()
#68 0x00010a80 in rb_call0 ()
#69 0x00011874 in rb_call ()
#70 0x0000d834 in rb_eval ()
#71 0x0000c894 in rb_eval ()
#72 0x0001104c in rb_call0 ()
#73 0x00011874 in rb_call ()
#74 0x0000d834 in rb_eval ()
#75 0x0000c894 in rb_eval ()
#76 0x0001104c in rb_call0 ()
#77 0x00011874 in rb_call ()
#78 0x0000d834 in rb_eval ()
#79 0x0000d2e0 in rb_eval ()
#80 0x0001104c in rb_call0 ()
#81 0x00011874 in rb_call ()
#82 0x0000db30 in rb_eval ()
#83 0x0000d2e0 in rb_eval ()
#84 0x0001104c in rb_call0 ()
#85 0x00011874 in rb_call ()
#86 0x0000d834 in rb_eval ()
#87 0x0000d2e0 in rb_eval ()
#88 0x0001104c in rb_call0 ()
#89 0x00011874 in rb_call ()
#90 0x0000d834 in rb_eval ()
#91 0x0000d658 in rb_eval ()
#92 0x0001104c in rb_call0 ()
#93 0x00011874 in rb_call ()
#94 0x0000d834 in rb_eval ()
#95 0x0001104c in rb_call0 ()
#96 0x00011874 in rb_call ()
#97 0x0000d834 in rb_eval ()
#98 0x0000d900 in rb_eval ()
#99 0x000225c8 in ruby_exec_internal ()
#100 0x00022680 in ruby_run ()
#101 0x00002090 in main ()
Could these segmentation faults be due to the optimization flags I used
when building Ruby? I’ll try without the flags and try installing and
then testing to see how it runs.
sean