使用ruby 2.0.0的Rails 3.2应用程序中的分段错误

时间:2015-04-24 17:09:44

标签: ruby-on-rails ruby ruby-on-rails-3 passenger

我有一个rails应用程序,最近我将它的ruby从1.9.3升级到2.0.0,我在apache错误日志中看到很多分段错误。

Rails: 3.2.19
Ruby: ruby 2.0.0p643 (2015-02-25 revision 49749) [x86_64-linux]
App server: Phusion Passenger 4.0.57
Web server: Apache/2.2.24 (Unix)
Kernel: Linux rails-www-021001 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
OS: CentOS 6.5

如果有人能说出办法来解决这个问题,我们将不胜感激。它在重载时随机(但经常)发生。

App 21910 stderr:  /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middlewar
App 21910 stderr: c:0021 p:0011 s:0128 e:000127 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/sendfile.rb:102
App 21910 stderr: c:0020 p:0032 s:0118 e:000117 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middlewar
App 21910 stderr: c:0019 p:0013 s:0114 e:000113 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middlewar
App 21910 stderr: c:0018 p:0013 s:0107 e:000106 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middlewar
App 21910 stderr: c:0017 p:0077 s:0101 e:000100 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/railties-3.2.19/lib/rails/rack/logger.rb:32
App 21910 stderr: c:0016 p:0011 s:0096 e:000095 BLOCK  /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/railties-3.2.19/lib/rails/rack/logger.rb:16
App 21910 stderr: c:0015 p:0016 s:0094 e:000093 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.19/lib/active_support/tagged_
App 21910 stderr: c:0014 p:0054 s:0089 e:000088 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/railties-3.2.19/lib/rails/rack/logger.rb:16
App 21910 stderr: c:0013 p:0032 s:0084 e:000083 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middlewar
App 21910 stderr: c:0012 p:0075 s:0077 e:000076 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/methodoverride.rb:21
App 21910 stderr: c:0011 p:0024 s:0072 e:000071 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/runtime.rb:17
App 21910 stderr: c:0010 p:0037 s:0063 e:000062 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.19/lib/active_support/cache/s
App 21910 stderr: c:0009 p:0056 s:0059 e:000058 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/lock.rb:15
App 21910 stderr: c:0008 p:0016 s:0052 e:000051 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/railties-3.2.19/lib/rails/engine.rb:484
App 21910 stderr: c:0007 p:0024 s:0048 e:000047 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/railties-3.2.19/lib/rails/application.rb:231
App 21910 stderr: c:0006 p:0013 s:0044 e:000043 METHOD /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/railties-3.2.19/lib/rails/railtie/configurable.
App 21910 stderr: c:0005 p:0295 s:0039 E:001718 METHOD /opt/app1/passenger/lib/phusion_passenger/rack/thread_handler_extension.rb:74
App 21910 stderr: c:0004 p:0174 s:0024 e:000023 METHOD /opt/app1/passenger/lib/phusion_passenger/request_handler/thread_handler.rb:141
App 21910 stderr: c:0003 p:0079 s:0014 e:000013 METHOD /opt/app1/passenger/lib/phusion_passenger/request_handler/thread_handler.rb:109
App 21910 stderr: c:0002 p:0075 s:0006 e:000005 BLOCK  /opt/app1/passenger/lib/phusion_passenger/request_handler.rb:455 [FINISH]
App 21910 stderr: c:0001 p:---- s:0002 e:000001 TOP    [FINISH]
App 21910 stderr:
App 21910 stderr: -- Ruby level backtrace information ----------------------------------------
App 21910 stderr: /opt/app1/passenger/lib/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'
App 21910 stderr: /opt/app1/passenger/lib/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
App 21910 stderr: /opt/app1/passenger/lib/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
App 21910 stderr: /opt/app1/passenger/lib/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:in `method_missing'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/railties-3.2.19/lib/rails/application.rb:231:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/railties-3.2.19/lib/rails/engine.rb:484:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.19/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middleware/request_id.rb:22:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/railties-3.2.19/lib/rails/rack/logger.rb:16:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.19/lib/active_support/tagged_logging.rb:22:in `tagged'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/railties-3.2.19/lib/rails/rack/logger.rb:16:in `block in call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/railties-3.2.19/lib/rails/rack/logger.rb:32:in `call_app'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/sendfile.rb:102:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:81:in `run_callbacks'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:405:in `__run_callback'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:405:in `_run__3637224327961608679__call__1551869841760381707__callbacks'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/query_cache.rb:64:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middleware/cookies.rb:341:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middleware/flash.rb:242:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middleware/head.rb:14:in `c
App 21910 stderr: all'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/conditionalget.rb:25:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.19/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/lib/utf8_sanitizer.rb:23:in `call'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/lib/utf8_sanitizer.rb:23:in `each'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/lib/utf8_sanitizer.rb:25:in `block in call'
App 21910 stderr: /opt/app1/ruby/lib/ruby/2.0.0/uri/common.rb:649:in `unescape'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.19/lib/active_support/core_ext/uri.rb:18:in `unescape'
App 21910 stderr: /var/www/apps/app1/releases/current_rpm_installed/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.19/lib/active_support/core_ext/uri.rb:18:in `gsub'
App 21910 stderr:
App 21910 stderr: -- C level backtrace information -------------------------------------------
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x170da8) [0x7f50ac845da8]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x5f1dc) [0x7f50ac7341dc]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(rb_bug+0xb8) [0x7f50ac7344b8]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x106e56) [0x7f50ac7dbe56]
App 21910 stderr: /lib64/libpthread.so.0() [0x3564a0f710]
App 21910 stderr: /lib64/libc.so.6(memcpy+0xe) [0x356428967e]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x116ca2) [0x7f50ac7ebca2]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x117231) [0x7f50ac7ec231]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(rb_str_dup+0x49) [0x7f50ac7ec509]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x123c60) [0x7f50ac7f8c60]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x15bcb9) [0x7f50ac830cb9]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x16363a) [0x7f50ac83863a]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x1687f3) [0x7f50ac83d7f3]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(rb_yield+0x1e0) [0x7f50ac8407a0]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(rb_ary_each+0x57) [0x7f50ac703757]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x15bcb9) [0x7f50ac830cb9]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x16ce26) [0x7f50ac841e26]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x16363a) [0x7f50ac83863a]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x1687f3) [0x7f50ac83d7f3]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x16a89b) [0x7f50ac83f89b]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x16aa1a) [0x7f50ac83fa1a]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x177dbe) [0x7f50ac84cdbe]
App 21910 stderr: /opt/app1/ruby/lib/libruby.so.2.0(+0x17b430) [0x7f50ac850430]
App 21910 stderr: /lib64/libpthread.so.0() [0x3564a079d1]
App 21910 stderr: /lib64/libc.so.6(clone+0x6d) [0x35642e88fd]

0 个答案:

没有答案