Reputation: 10551
rake spec
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/common.rb:67: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0057 p:---- s:0169 b:0169 l:000168 d:000168 CFUNC :initialize
c:0056 p:---- s:0167 b:0167 l:000166 d:000166 CFUNC :new
c:0055 p:0099 s:0164 b:0162 l:000161 d:000161 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/common.rb:67
c:0054 p:0090 s:0153 b:0152 l:000151 d:000151 CLASS /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext.rb:17
c:0053 p:0011 s:0150 b:0150 l:000149 d:000149 CLASS /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext.rb:12
c:0052 p:0074 s:0148 b:0148 l:000147 d:000147 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext.rb:9
c:0051 p:---- s:0146 b:0146 l:000145 d:000145 FINISH
c:0050 p:---- s:0144 b:0144 l:000143 d:000143 CFUNC :require
c:0049 p:0027 s:0140 b:0140 l:000139 d:000139 CLASS /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json.rb:58
c:0048 p:0021 s:0138 b:0138 l:000137 d:000137 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json.rb:54
c:0047 p:---- s:0136 b:0136 l:000135 d:000135 FINISH
c:0046 p:---- s:0134 b:0134 l:000133 d:000133 CFUNC :require
c:0045 p:0011 s:0130 b:0130 l:000129 d:000129 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.1/lib/active_support/core_ext/object/json.rb:2
c:0044 p:---- s:0128 b:0128 l:000127 d:000127 FINISH
c:0043 p:---- s:0126 b:0126 l:000125 d:000125 CFUNC :require
c:0042 p:0107 s:0122 b:0122 l:000121 d:000121 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.1/lib/active_support/core_ext/object.rb:11
c:0041 p:---- s:0120 b:0120 l:000119 d:000119 FINISH
c:0040 p:---- s:0118 b:0118 l:000117 d:000117 CFUNC :require
c:0039 p:0023 s:0114 b:0114 l:000113 d:000113 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/configuration.rb:2
c:0038 p:---- s:0112 b:0112 l:000111 d:000111 FINISH
c:0037 p:---- s:0110 b:0110 l:000109 d:000109 CFUNC :require
c:0036 p:0023 s:0106 b:0106 l:000105 d:000105 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/railtie.rb:2
c:0035 p:---- s:0104 b:0104 l:000103 d:000103 FINISH
c:0034 p:---- s:0102 b:0102 l:000101 d:000101 CFUNC :require
c:0033 p:0011 s:0098 b:0098 l:000097 d:000097 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/engine.rb:1
c:0032 p:---- s:0096 b:0096 l:000095 d:000095 FINISH
c:0031 p:---- s:0094 b:0094 l:000093 d:000093 CFUNC :require
c:0030 p:0071 s:0090 b:0090 l:000089 d:000089 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/application.rb:6
c:0029 p:---- s:0088 b:0088 l:000087 d:000087 FINISH
c:0028 p:---- s:0086 b:0086 l:000085 d:000085 CFUNC :require
c:0027 p:0095 s:0082 b:0082 l:000081 d:000081 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails.rb:11
c:0026 p:---- s:0080 b:0080 l:000079 d:000079 FINISH
c:0025 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC :require
c:0024 p:0011 s:0074 b:0074 l:000073 d:000073 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/all.rb:1
c:0023 p:---- s:0072 b:0072 l:000071 d:000071 FINISH
c:0022 p:---- s:0070 b:0070 l:000069 d:000069 CFUNC :require
c:0021 p:0038 s:0066 b:0066 l:000065 d:000065 TOP /home/starkers/Documents/opensource_projects/gitlabhq/config/application.rb:3
c:0020 p:---- s:0064 b:0064 l:000063 d:000063 FINISH
c:0019 p:---- s:0062 b:0062 l:000061 d:000061 CFUNC :require
c:0018 p:0036 s:0058 b:0058 l:000057 d:000057 METHOD /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36
c:0017 p:0026 s:0051 b:0051 l:000050 d:000050 TOP /home/starkers/Documents/opensource_projects/gitlabhq/Rakefile:5
c:0016 p:---- s:0049 b:0049 l:000048 d:000048 FINISH
c:0015 p:---- s:0047 b:0047 l:000046 d:000046 CFUNC :load
c:0014 p:0013 s:0043 b:0043 l:000042 d:000042 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/rake_module.rb:28
c:0013 p:0252 s:0039 b:0039 l:000038 d:000038 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:687
c:0012 p:0009 s:0034 b:0034 l:000027 d:000033 BLOCK /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:94
c:0011 p:0007 s:0032 b:0032 l:000031 d:000031 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:176
c:0010 p:0011 s:0028 b:0028 l:000027 d:000027 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:93
c:0009 p:0019 s:0025 b:0025 l:000018 d:000024 BLOCK /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:77
c:0008 p:0007 s:0023 b:0023 l:000022 d:000022 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:176
c:0007 p:0011 s:0019 b:0019 l:000018 d:000018 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:75
c:0006 p:0060 s:0016 b:0016 l:000015 d:000015 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/bin/rake:33
c:0005 p:---- s:0014 b:0014 l:000013 d:000013 FINISH
c:0004 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC :load
c:0003 p:0167 s:0008 b:0008 l:001ac8 d:001588 EVAL /usr/local/bin/rake:23
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001ac8 d:001ac8 TOP
-- Ruby level backtrace information ----------------------------------------
/usr/local/bin/rake:23:in `<main>'
/usr/local/bin/rake:23:in `load'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:77:in `block in run'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:93:in `load_rakefile'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:94:in `block in load_rakefile'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:687:in `raw_load_rakefile'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load'
/home/starkers/Documents/opensource_projects/gitlabhq/Rakefile:5:in `<top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/home/starkers/Documents/opensource_projects/gitlabhq/config/application.rb:3:in `<top (required)>'
/home/starkers/Documents/opensource_projects/gitlabhq/config/application.rb:3:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/all.rb:1:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/all.rb:1:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails.rb:11:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails.rb:11:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/application.rb:6:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/application.rb:6:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/engine.rb:1:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/engine.rb:1:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/railtie.rb:2:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/railtie.rb:2:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/configuration.rb:2:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/configuration.rb:2:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.1/lib/active_support/core_ext/object.rb:11:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.1/lib/active_support/core_ext/object.rb:11:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.1/lib/active_support/core_ext/object/json.rb:2:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.1/lib/active_support/core_ext/object/json.rb:2:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json.rb:54:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json.rb:58:in `<module:JSON>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json.rb:58:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext.rb:9:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext.rb:12:in `<module:JSON>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext.rb:17:in `<module:Ext>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/common.rb:67:in `generator='
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/common.rb:67:in `new'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/common.rb:67:in `initialize'
-- A lot more stuff here!
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Aborted (core dumped)
When running rake spec
I get the above. I can't run my rails project.
1) Could someone explain how I can use this information to find the error?
2) Can anyone see my personal problem? I'm trying to run Gitlab, which is a pretty huge project which others could run into
3) How can I get around this if it is indeed a bug? Change rails version? Change ruby version? How can I go about doing this.
I'm on Ubuntu and installed via RVM. So I can change ruby version via that. What about my Gems though? ~> x.x.x
option and bundle install?
Upvotes: 2
Views: 5119
Reputation: 2704
It seems there is a problem with one of the dependencies, the json
gem. Following your numbering:
When you see a segmentation fault error it typically involves mismatching gemsets or gem's native extensions compiled against the wrong version of ruby, so you should look in that direction.
Indeed, the first line reports the gem being taken from one ruby 2.0.0p247 gemset while the second reports ruby 1.9.3p194 as the current interpreter.
In your particular case, I would cd
into the project folder, rebuild the gemset with gem pristine --all
, rebuild the project dependencies with bundle update
and then try re-running the command using the project binstub: ./bin/rake rspec
.
It doesn't seem a bug to me, but you should pay attention to the version of ruby you're using in every moment. With RVM you can specify a default wide system ruby version and gemset but also as many project specific ruby versions and gemsets as you wish, and it can lead to trouble sometimes.
Hope it helps.
Upvotes: 7