Question

I use the ruby 1.8.7 there are a good time, and I use this version of ruby with rails 3.0.x since of release of this version of rails. And I never got a Segmentation fault error. But now, after start develop the ruby 1.8.7 with the rails 3.1.3, when I execute the webrick and I surf the application, I have the error below:

/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/utils.rb:380: [BUG] Segmentation fault
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]

The error is very inconstant , sometime happens with httputils of the webrick and sometimes with the rack. Maybe the error have some relation with assets pipe line, because the errors happen before of some process like this:

Started GET "/assets/wymeditor/wymeditor/lang/zh_cn.js?body=1" for 127.0.0.1 at Wed Dec 28 09:22:23 -0200 2011
cache: [GET /assets/wymeditor/wymeditor/lang/zh_cn.js?body=1] stale, valid, store
Served asset /wymeditor/wymeditor/lang/zh_cn.js - 304 Not Modified (1ms)


Started GET "/assets/wymeditor/wymeditor/plugins/embed/jquery.wymeditor.embed.js?body=1" for 127.0.0.1 at Wed Dec 28 09:22:23 -0200 2011

Anybody can help me, about this issue. Since now I thanks for any help.

Thanks

Development log:

Started GET "/assets/wymeditor/wymeditor/lang/he.js?body=1" for 127.0.0.1 at Wed Dec 28 11:57:36 -0200 2011
cache: [GET /assets/wymeditor/wymeditor/lang/he.js?body=1] stale, valid, store
Served asset /wymeditor/wymeditor/lang/he.js - 304 Not Modified (0ms)
Started GET "/assets/wymeditor/wymeditor/lang/hr.js?body=1" for 127.0.0.1 at Wed Dec 28 11:57:36 -0200 2011
cache: [GET /assets/wymeditor/wymeditor/lang/hr.js?body=1] stale, valid, store
Served asset /wymeditor/wymeditor/lang/hr.js - 304 Not Modified (1ms)
Started GET "/assets/wymeditor/wymeditor/lang/hu.js?body=1" for 127.0.0.1 at Wed Dec 28 11:57:36 -0200 2011
cache: [GET /assets/wymeditor/wymeditor/lang/hu.js?body=1] stale, valid, store
Served asset /wymeditor/wymeditor/lang/hu.js - 304 Not Modified (1ms)
Started GET "/assets/wymeditor/wymeditor/lang/it.js?body=1" for 127.0.0.1 at Wed Dec 28 11:57:36 -0200 2011
cache: [GET /assets/wymeditor/wymeditor/lang/it.js?body=1] stale, valid, store
Served asset /wymeditor/wymeditor/lang/it.js - 304 Not Modified (1ms)
Started GET "/assets/wymeditor/wymeditor/lang/nb.js?body=1" for 127.0.0.1 at Wed Dec 28 11:57:36 -0200 2011
cache: [GET /assets/wymeditor/wymeditor/lang/nb.js?body=1] stale, valid, store
Served asset /wymeditor/wymeditor/lang/nb.js - 304 Not Modified (1ms)
Started GET "/assets/wymeditor/wymeditor/lang/nl.js?body=1" for 127.0.0.1 at Wed Dec 28 11:57:36 -0200 2011
cache: [GET /assets/wymeditor/wymeditor/lang/nl.js?body=1] stale, valid, store
Served asset /wymeditor/wymeditor/lang/nl.js - 304 Not Modified (4ms)
Started GET "/assets/wymeditor/wymeditor/lang/pl.js?body=1" for 127.0.0.1 at Wed Dec 28 11:57:36 -0200 2011
cache: [GET /assets/wymeditor/wymeditor/lang/pl.js?body=1] stale, valid, store
Served asset /wymeditor/wymeditor/lang/pl.js - 304 Not Modified (0ms)
Started GET "/assets/wymeditor/wymeditor/lang/pt-br.js?body=1" for 127.0.0.1 at Wed Dec 28 11:57:36 -0200 2011
cache: [GET /assets/wymeditor/wymeditor/lang/pt-br.js?body=1] stale, valid, store
Served asset /wymeditor/wymeditor/lang/pt-br.js - 304 Not Modified (3ms)
Started GET "/assets/wymeditor/wymeditor/lang/pt.js?body=1" for 127.0.0.1 at Wed Dec 28 11:57:36 -0200 2011
cache: [GET /assets/wymeditor/wymeditor/lang/pt.js?body=1] stale, valid, store
Served asset /wymeditor/wymeditor/lang/pt.js - 304 Not Modified (1ms)
Started GET "/assets/wymeditor/wymeditor/lang/ru.js?body=1" for 127.0.0.1 at Wed Dec 28 11:57:36 -0200 2011
/usr/lib/ruby/gems/1.8/gems/rack-cache-1.1/lib/rack/cache/metastore.rb:232: [BUG] Segmentation fault
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]
Abortado

Abortado in English is Aborted

List of all my gems:

  • actionmailer (3.1.3)
    • actionpack (3.1.3)
    • activemodel (3.1.3)
    • activerecord (3.1.3)
    • activeresource (3.1.3)
    • activesupport (3.1.3)
    • arel (2.2.1)
    • bcrypt-ruby (3.0.1)
    • brI18n (3.0.4)
    • brazilian-rails (3.0.4)
    • brcep (3.0.4)
    • brcpfcnpj (3.0.4)
    • brdata (3.0.4)
    • brdinheiro (3.0.4)
    • brhelper (3.0.4)
    • brnumeros (3.0.4)
    • brstring (3.0.4)
    • builder (3.0.0)
    • bundler (1.0.15)
    • capybara (1.1.1)
    • childprocess (0.2.2)
    • coffee-rails (3.1.1)
    • coffee-script (2.2.0)
    • coffee-script-source (1.1.3)
    • columnize (0.3.4)
    • cucumber (1.1.0)
    • cucumber-rails (1.1.1)
    • database_cleaner (0.6.7)
    • devise (1.4.8)
    • diff-lcs (1.1.3)
    • dragonfly (0.9.8)
    • erubis (2.7.0)
    • execjs (1.2.12)
    • factory_girl (2.2.0)
    • factory_girl_rails (1.3.0)
    • ffi (1.0.9)
    • gherkin (2.5.1)
    • hike (1.2.1)
    • i18n (0.6.0)
    • jquery-rails (1.0.19)
    • json (1.6.3)
    • json_pure (1.6.1)
    • linecache (0.46)
    • mail (2.3.0)
    • mime-types (1.17.2)
    • multi_json (1.0.4)
    • mysql2 (0.3.11)
    • nokogiri (1.5.0)
    • orm_adapter (0.0.5)
    • polyglot (0.3.3)
    • rack (1.3.5)
    • rack-cache (1.1)
    • rack-mount (0.8.3)
    • rack-ssl (1.3.2)
    • rack-test (0.6.1)
    • rails (3.1.3)
    • railties (3.1.3)
    • rake (0.9.2.2)
    • rbx-require-relative (0.0.5)
    • rdoc (3.11)
    • rspec (2.6.0)
    • rspec-core (2.6.4)
    • rspec-expectations (2.6.0)
    • rspec-mocks (2.6.0)
    • rspec-rails (2.6.1)
    • ruby-debug (0.10.4)
    • ruby-debug-base (0.10.4)
    • rubyzip (0.9.4)
    • sass (3.1.11)
    • sass-rails (3.1.5)
    • selenium-client (1.2.18)
    • selenium-webdriver (2.8.0)
    • sprockets (2.0.3)
    • term-ansicolor (1.0.7)
    • thor (0.14.6)
    • tilt (1.3.3)
    • treetop (1.4.10)
    • tzinfo (0.3.31)
    • uglifier (1.1.0)
    • warden (1.0.6)
    • webrat (0.7.3)
    • wymeditor (0.5.0.rc2)
    • xpath (0.1.4)

Ruby version: ruby 1.8.7 (2010-06-23 patchlevel 299) Arch: [i686-linux]

The only stack trace that I get:

/usr/lib/ruby/1.8/webrick/httpserver.rb:50
while timeout > 0
(rdb:2) n
[2011-12-28 16:22:52] ERROR #<Class:0xb6614868>: execution expired
   /usr/lib/ruby/1.8/timeout.rb:64:in `timeout'
   /usr/lib/ruby/1.8/timeout.rb:101:in `timeout'
   /usr/lib/ruby/1.8/webrick/httprequest.rb:326:in `_read_data'
   /usr/lib/ruby/1.8/webrick/httprequest.rb:337:in `read_line'
   /usr/lib/ruby/1.8/webrick/httprequest.rb:240:in `read_header'
   /usr/lib/ruby/1.8/webrick/httprequest.rb:88:in `parse'
   /usr/lib/ruby/1.8/webrick/httpserver.rb:56:in `run'
   /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
   /usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
   /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
   /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
   /usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
   /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
   /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
   /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
   /usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/handler/webrick.rb:13:in `run'
   /usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/server.rb:265:in `start'
   /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/commands/server.rb:70:in `start'
   /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/commands.rb:54
   /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/commands.rb:49:in `tap'
   /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/commands.rb:49
   script/rails:6:in `require'
   script/rails:6
/usr/lib/ruby/1.8/webrick/httpserver.rb:51
break if IO.select([sock], nil, nil, 0.5)

The error didn't happen with easily in debug mode, line by line. I did have just one stack trace, and I didn't get more than one time.

At this moment I disabled the asset pipeline, coffeescript and sass. And I didn't got more the error, but I don't have more these functions.

Was it helpful?

Solution

A note from guides.rubyonrails.org says:

Note that Ruby 1.8.7 p248 and p249 have marshaling bugs that crash Rails 3.0. Ruby Enterprise Edition have these fixed since release 1.8.7-2010.02 though. On the 1.9 front, Ruby 1.9.1 is not usable because it outright segfaults on Rails 3.0, so if you want to use Rails 3 with 1.9.x jump on 1.9.2 for smooth sailing.

I've had very good luck with 1.9.2 and rvm makes it easy to switch between multiple versions of ruby. Would you be able to try this?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top