Ruby on Rails Eventmachine 段错误
Posted
技术标签:
【中文标题】Ruby on Rails Eventmachine 段错误【英文标题】:Ruby on Rails Eventmachine segfault
【发布时间】:2012-08-11 08:42:15
【问题描述】:
我的 rails 安装有一些非常奇怪的问题,非常感谢任何帮助。
这一切都始于我运行 bundle clean --force
希望解决项目中的一些 gem 问题。然后我运行了捆绑安装,但事情从来都不一样。首先,我在运行rails s
时遇到了一个奇怪的[BUG] cross-thread violation on rb_gc()
错误。运行gem clean
后,我设法继续处理一个新错误:
bundle exec rails s
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/rubyeventmachine.bundle: [BUG] 分段错误
ruby 1.9.3p125(2012-02-16 修订版 34643)[x86_64-darwin11.3.0]
-- 控制帧信息 --------------------------------------------------------- --
c:0034 p:-17535289580530 s:0105 b:0105 l:000104 d:000104 顶部
c:0033 p:---- s:0103 b:0103 l:000102 d:000102 CFUNC :要求
c:0032 p:0010 s:0099 b:0099 l:000091 d:000098 BLOCK /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies .rb:251
c:0031 p:0071 s:0097 b:0097 l:000096 d:000096 方法 /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies .rb:236
c:0030 p:0019 s:0092 b:0092 l:000091 d:000091 方法/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies .rb:251
c:0029 p:0150 s:0087 b:0087 l:000086 d:000086 TOP /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/eventmachine.rb :66
c:0028 p:---- s:0085 b:0085 l:000084 d:000084 完成
c:0027 p:---- s:0083 b:0083 l:000082 d:000082 CFUNC:要求
c:0026 p:0010 s:0079 b:0079 l:000071 d:000078 BLOCK /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies .rb:251
c:0025 p:0071 s:0077 b:0077 l:000076 d:000076 方法 /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies .rb:236
c:0024 p:0019 s:0072 b:0072 l:000071 d:000071 方法/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies .rb:251
c:0023 p:0083 s:0067 b:0067 l:000066 d:000066 TOP /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/thin-1.3.1/lib/thin.rb :7
c:0022 p:---- s:0065 b:0065 l:000064 d:000064 完成
c:0021 p:---- s:0063 b:0063 l:000062 d:000062 CFUNC:要求
c:0020 p:0026 s:0059 b:0059 l:000039 d:000058 BLOCK /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime .rb:68
c:0019 p:---- s:0056 b:0056 l:000055 d:000055 完成
c:0018 p:---- s:0054 b:0054 l:000053 d:000053 CFUNC :each
c:0017 p:0091 s:0051 b:0051 l:000039 d:000050 BLOCK /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime .rb:66
c:0016 p:---- s:0045 b:0045 l:000044 d:000044 完成
c:0015 p:---- s:0043 b:0043 l:000042 d:000042 CFUNC :each
c:0014 p:0046 s:0040 b:0040 l:000039 d:000039 方法/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime .rb:55
c:0013 p:0021 s:0036 b:0036 l:000035 d:000035 方法/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler.rb :119
c:0012 p:0089 s:0032 b:0032 l:000031 d:000031 TOP /Users/yuletide/code/txtyourcity_rails/config/application.rb:7
c:0011 p:---- s:0030 b:0030 l:000029 d:000029 完成
c:0010 p:---- s:0028 b:0028 l:000027 d:000027 CFUNC:要求
c:0009 p:0016 s:0024 b:0024 l:000015 d:000023 BLOCK /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands .rb:53
c:0008 p:---- s:0021 b:0021 l:000020 d:000020 完成
c:0007 p:---- s:0019 b:0019 l:000018 d:000018 CFUNC :点击
c:0006 p:0702 s:0016 b:0016 l:000015 d:000015 TOP /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands .rb:50
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 完成
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :require
c:0003 p:0061 s:0006 b:0006 l:000df8 d:0008c8 EVAL 脚本/rails:6
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 完成
c:0001 p:0000 s:0002 b:0002 l:000df8 d:000df8 顶部
-- Ruby 级别的回溯信息 ----------------------------------------
脚本/rails:6:in `'
脚本/rails:6:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands.rb:50:in `'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands.rb:50:in `tap'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands.rb:53:in `block in '
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands.rb:53:in `require'
/Users/yuletide/code/txtyourcity_rails/config/application.rb:7:in `'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `each'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `block in require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `each'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/thin-1.3.1/lib/thin.rb:7:in `'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/eventmachine.rb:66:in `'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
-- C级回溯信息--------------------------------------------------------
请参阅 ~/Library/Logs/CrashReporter 下的崩溃报告日志文件或
/Library/Logs/CrashReporter,了解更多详细信息。
-- 其他运行时信息 --------------------------------------------------------- --
* 加载脚本:script/rails
*加载的功能:
0 枚举器.so
1 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/enc/encdb.bundle
2 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/enc/trans/transdb.bundle
3 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
4 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/rbconfig.rb
5 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb
6 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb
7 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
8 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems.rb
9 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/pathname.bundle
10 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/pathname.rb
11 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/version.rb
12 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/etc.bundle
13 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb
14 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb
15 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb
16 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb
17 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb
18 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb
19 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/psych.bundle
20 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/stringio.bundle
21 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/node.rb
22 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/stream.rb
23 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/document.rb
24 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/sequence.rb
25 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/scalar.rb
26 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/mapping.rb
27 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes/alias.rb
28 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/nodes.rb
29 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/streaming.rb
30 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych/visitors/visitor.rb
31 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-darwin11.3.0/strscan.bundle
...剪断...
2.0.2/lib/simple_form/wrappers/builder.rb
第629章
630 /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/simple_form-2.0.2/lib/simple_form/wrappers/single.rb
631 /用户/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/simple_form-2.0.2/lib/simple_form/wrappers/root.rb
第632章 /Users/yuletide/.rvm/gems/ruby-1.9.3-p125/gems/simple_form-2.0.2/lib/simple_form.rb
第633章 /Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/timeout.rb
[笔记]
您可能在 Ruby 解释器或扩展库中遇到了错误。
欢迎提交错误报告。
详情:http://www.ruby-lang.org/bugreport.html
[1] 1577 中止捆绑 exec rails s
宝石环境
RubyGems 环境:
- 红宝石版本:1.8.21
- 红宝石版本:1.9.3(2012-02-16 补丁级别 125)[x86_64-darwin11.3.0]
- 安装目录:/Users/ayule/.rvm/gems/ruby-1.9.3-p125
- RUBY 可执行文件:/Users/ayule/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
- 可执行目录:/Users/ayule/.rvm/gems/ruby-1.9.3-p125/bin
- 红宝石平台:
- 红宝石
- x86_64-darwin-11
- 宝石路径:
- /Users/ayule/.rvm/gems/ruby-1.9.3-p125
- /Users/ayule/.rvm/gems/ruby-1.9.3-p125@global
- 宝石配置:
- :update_sources => 真
- :详细 => 真
- :基准 => 假
- :回溯 => 假
- :bulk_threshold => 1000
- 远程资源:
- http://rubygems.org/
rvm 似乎工作正常:
代码/txtyourcity_rails(master) ☸ 哪个红宝石
/Users/yuletide/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
代码/txtyourcity_rails(master) ☸ 哪个导轨
/Users/yuletide/.rvm/gems/ruby-1.9.3-p125/bin/rails
【问题讨论】:
【参考方案1】:
只是猜测 - 你是否使用 clang/LLVM 构建了你的 ruby,ruby 还没有准备好,这个 bug 最有可能报告给 bundler / ruby。
按照我的其他答案https://***.com/a/10540282/497756 中的说明解决类似问题。
【讨论】:
【参考方案2】:
不确定最初是什么原因导致的,但通过使用 rvm 升级到 1.9.3-p194,创建 .rvmrc,然后运行 bundle install
,设法消除了错误
【讨论】:
看起来更像 llvm 问题,您可以使用 ruby -rrbconfig -e 'system "#RbConfig::CONFIG["CC"] --version"'
检查用于 ruby 的编译器是否包含 llvm
或 clang
- 那么您知道它为什么失败并且它可能会失败再次 - 稍后,Ruby 还没有准备好使用 clang,最好使用 gcc-4.2
编译以避免随机失败以上是关于Ruby on Rails Eventmachine 段错误的主要内容,如果未能解决你的问题,请参考以下文章
ruby on rails - 问题捆绑安装nokogiri 1.7.2 on ruby on rails 4.x.
Ruby on Rails入门篇
markdown [rails:devise] Ruby on Rails的身份验证gem。 #ruby #rails
ruby Ruby on Rails:常见路由
ruby Ruby on rails类
Ruby on Rails 開發秘籍 | Ruby on Rails 快速入門