Bug #3431: Segmentation fault in ruby-1.9.1-p378
http://redmine.ruby-lang.org/issues/show/3431

Author: David Sulc
Status: Open, Priority: Normal
ruby -v: ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]

I get a segmentation fault in rails-3.0.0.beta4 when creating a trivial app (i.e. generating one model via scaffolding, run the webrick server, and navigating to the controller's index, see example below). Segmentation fault:

d:1: [BUG] Segmentation fault
ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]

-- control frame ----------
c:0024 p:0233 s:0143 b:0142 l:000141 d:000141 METHOD d:1
c:0023 p:0024 s:0132 b:0132 l:000131 d:000131 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-3.0.0.beta4/lib/active_support/callbacks.rb:88
c:0022 p:0013 s:0126 b:0126 l:0021b8 d:0021b8 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/callbacks.rb:44
c:0021 p:0014 s:0122 b:0122 l:000121 d:000121 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/sendfile.rb:105
c:0020 p:0046 s:0112 b:0112 l:000111 d:000111 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/remote_ip.rb:48
c:0019 p:0014 s:0108 b:0108 l:000107 d:000107 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/show_exceptions.rb:48
c:0018 p:0026 s:0100 b:0100 l:000099 d:000099 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta4/lib/rails/rack/logger.rb:14
c:0017 p:0031 s:0096 b:0096 l:000095 d:000095 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/runtime.rb:17
c:0016 p:0051 s:0087 b:0087 l:000086 d:000086 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-3.0.0.beta4/lib/active_support/cache/strategy/local_cache.rb:72
c:0015 p:0013 s:0083 b:0083 l:000077 d:000082 BLOCK  /home/david/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/lock.rb:11
c:0014 p:0019 s:0081 b:0081 l:000080 d:000080 METHOD <internal:prelude>:8
c:0013 p:0052 s:0078 b:0078 l:000077 d:000077 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/lock.rb:11
c:0012 p:0189 s:0073 b:0073 l:000072 d:000072 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/static.rb:30
c:0011 p:0032 s:0066 b:0066 l:000065 d:000065 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta4/lib/rails/application.rb:145
c:0010 p:0021 s:0062 b:0062 l:000061 d:000061 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta4/lib/rails/application.rb:81
c:0009 p:---- s:0057 b:0057 l:000056 d:000056 FINISH
c:0008 p:0014 s:0055 b:0055 l:000054 d:000054 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta4/lib/rails/rack/log_tailer.rb:15
c:0007 p:0014 s:0050 b:0050 l:000049 d:000049 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/content_length.rb:13
c:0006 p:0320 s:0042 b:0042 l:000041 d:000041 METHOD /home/david/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48
c:0005 p:0256 s:0030 b:0030 l:000029 d:000029 METHOD /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/httpserver.rb:111
c:0004 p:0382 s:0020 b:0020 l:000019 d:000019 METHOD /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/httpserver.rb:70
c:0003 p:0123 s:0009 b:0009 l:000954 d:000008 BLOCK  /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/server.rb:183
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP   
---------------------------
-- Ruby level backtrace information-----------------------------------------
d:1:in `'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-3.0.0.beta4/lib/active_support/callbacks.rb:88:in `run_callbacks'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/sendfile.rb:105:in `call'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/show_exceptions.rb:48:in `call'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta4/lib/rails/rack/logger.rb:14:in `call'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/runtime.rb:17:in `call'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-3.0.0.beta4/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/lock.rb:11:in `block in call'
<internal:prelude>:8:in `synchronize'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/static.rb:30:in `call'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta4/lib/rails/application.rb:145:in `call'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta4/lib/rails/application.rb:81:in `method_missing'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta4/lib/rails/rack/log_tailer.rb:15:in `call'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
/home/david/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `service'
/home/david/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/home/david/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/home/david/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

-- C level backtrace information -------------------------------------------
0xb77efb79 /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(rb_vm_bugreport+0x69) [0xb77efb79]
0xb770898f /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(+0x4698f) [0xb770898f]
0xb7708a2a /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(rb_bug+0x3a) [0xb7708a2a]
0xb7795904 /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(+0xd3904) [0xb7795904]
0xb7850410 [0xb7850410]
0xb77e6e23 /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(+0x124e23) [0xb77e6e23]
0xb77dfb40 /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(+0x11db40) [0xb77dfb40]
0xb77e0205 /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(rb_funcall2+0x55) [0xb77e0205]
0xb77e0323 /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(+0x11e323) [0xb77e0323]
0xb77e954f /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(+0x12754f) [0xb77e954f]
0xb77e381d /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(+0x12181d) [0xb77e381d]
0xb77e6e23 /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(+0x124e23) [0xb77e6e23]
0xb77e8f78 /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(rb_vm_invoke_proc+0x278) [0xb77e8f78]
0xb77f4a44 /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(+0x132a44) [0xb77f4a44]
0xb77f4b61 /home/david/.rvm/rubies/ruby-1.9.1-p378/lib/libruby.so.1.9(+0x132b61) [0xb77f4b61]
0xb769896e /lib/tls/i686/cmov/libpthread.so.0(+0x596e) [0xb769896e]
0xb75a0a4e /lib/tls/i686/cmov/libc.so.6(clone+0x5e) [0xb75a0a4e]

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted

===

Steps taken to reproduce:

rvm use ruby-1.9.1-p378

rails new bug_test

rails bundle install (note: no additional gems were added to the Gemfile)

rails generate scaffold catalog_item brand:string reference:string

rake db:migrate

rails server

<navigate to localhost:3000/catalog_items>

(If I switch to "ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]" and run "rails server", same code works fine.)

===

Bug is likely related to Bug #3138, possibly to Bug #1937


----------------------------------------
http://redmine.ruby-lang.org