开发者

Why am I getting a segmentation fault in libxml_ruby.bundle when using the pivotal-tracker gem?

I have a Ruby 1.9.2-p290 program which is using the pivotal-tracker gem. The configuration of the application environment is using RVM. When I execute this on one machine the application works as expected yet on a different machine it results in the error below.

To simplify the problem I made a new ruby file with only the following contents and still receive the error:

require 'pivotal-tracker'
puts 'hello'

Given this works on one machine and not another I assume there is a configuration difference of some sort between the two.

What is the best way to debug what is going on to cause this error?

Thank you in advance!

> /Users/isuttle/.rvm/gems/ruby-1.9.2-p290/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle:
> [BUG] Segmentation fault ruby 1.9.2p290 (2011-07-09 revision 32553)
> [x86_64-darwin10.8.0]
> 
> -- control frame ---------- c:0027 p:-540275480 s:0094 b:0094 l:000093
> d:000093 TOP    c:0026 p:---- s:0092 b:0092 l:000091 d:000091 CFUNC 
> :require c:0025 p:0174 s:0088 b:0088 l:000087 d:000087 METHOD
> /Users/isuttle/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55
> c:0024 p:0074 s:0081 b:0081 l:000080 d:000080 TOP   
> /Users/isuttle/.rvm/gem开发者_StackOverflows/ruby-1.9.2-p290/gems/libxml-ruby-1.1.4/lib/libxml.rb:9
> c:0023 p:---- s:0079 b:0079 l:000078 d:000078 FINISH c:0022 p:----
> s:0077 b:0077 l:000076 d:000076 CFUNC  :require c:0021 p:0174 s:0073
> b:0073 l:000072 d:000072 METHOD
> /Users/isuttle/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55
> c:0020 p:0011 s:0066 b:0066 l:000065 d:000065 TOP   
> /Users/isuttle/.rvm/gems/ruby-1.9.2-p290/gems/libxml-ruby-1.1.4/lib/xml.rb:11
> c:0019 p:---- s:0064 b:0064 l:000063 d:000063 FINISH c:0018 p:----
> s:0062 b:0062 l:000061 d:000061 CFUNC  :require c:0017 p:0174 s:0058
> b:0058 l:000057 d:000057 METHOD
> /Users/isuttle/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55
> c:0016 p:0035 s:0051 b:0051 l:000050 d:000050 TOP   
> /Users/isuttle/.rvm/gems/ruby-1.9.2-p290/gems/happymapper-0.3.2/lib/happymapper.rb:3
> c:0015 p:---- s:0049 b:0049 l:000048 d:000048 FINISH c:0014 p:----
> s:0047 b:0047 l:000046 d:000046 CFUNC  :require c:0013 p:0174 s:0043
> b:0043 l:000042 d:000042 METHOD
> /Users/isuttle/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55
> c:0012 p:0035 s:0036 b:0036 l:000035 d:000035 TOP   
> /Users/isuttle/.rvm/gems/ruby-1.9.2-p290/gems/pivotal-tracker-0.4.1/lib/pivotal-tracker.rb:3
> c:0011 p:---- s:0034 b:0034 l:000033 d:000033 FINISH c:0010 p:----
> s:0032 b:0032 l:000031 d:000031 CFUNC  :require c:0009 p:0073 s:0028
> b:0028 l:000024 d:000027 BLOCK 
> <internal:lib/rubygems/custom_require>:33 c:0008 p:0014 s:0025 b:0025
> l:000024 d:000024 METHOD <internal:lib/rubygems/custom_require>:29
> c:0007 p:0011 s:0020 b:0020 l:000019 d:000019 TOP   
> /Users/isuttle/Projects/amazon_tracker/amzn_iteration.rb:1 c:0006
> p:---- s:0018 b:0018 l:000017 d:000017 FINISH c:0005 p:---- s:0016
> b:0016 l:000015 d:000015 CFUNC  :require c:0004 p:0013 s:0012 b:0012
> l:000011 d:000011 METHOD <internal:lib/rubygems/custom_require>:29
> c:0003 p:0011 s:0007 b:0007 l:0014d8 d:001660 EVAL   sample.rb:1
> c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000
> s:0002 b:0002 l:0014d8 d:0014d8 TOP   
> 
> Ruby level backtrace information sample.rb:1:in `<main>'
> <internal:lib/rubygems/custom_require>:29:in `require'
> <internal:lib/rubygems/custom_require>:29:in `require'
> /Users/isuttle/Projects/amazon_tracker/amzn_iteration.rb:1:in `<top
> (required)>' <internal:lib/rubygems/custom_require>:29:in `require'
> <internal:lib/rubygems/custom_require>:33:in `rescue in require'
> <internal:lib/rubygems/custom_require>:33:in `require'
> /Users/isuttle/.rvm/gems/ruby-1.9.2-p290/gems/pivotal-tracker-0.4.1/lib/pivotal-tracker.rb:3:in
> `<top (required)>'
> /Users/isuttle/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in
> `require'
> /Users/isuttle/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in
> `require'
> /Users/isuttle/.rvm/gems/ruby-1.9.2-p290/gems/happymapper-0.3.2/lib/happymapper.rb:3:in
> `<top (required)>'
> /Users/isuttle/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in
> `require'
> /Users/isuttle/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in
> `require'
> /Users/isuttle/.rvm/gems/ruby-1.9.2-p290/gems/libxml-ruby-1.1.4/lib/xml.rb:11:in
> `<top (required)>'
> /Users/isuttle/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in
> `require'
> /Users/isuttle/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in
> `require'
> /Users/isuttle/.rvm/gems/ruby-1.9.2-p290/gems/libxml-ruby-1.1.4/lib/libxml.rb:9:in
> `<top (required)>'
> /Users/isuttle/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in
> `require'
> /Users/isuttle/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in
> `require'


It looks like libxml-ruby is the part that is segfaulting. I've had this before when system libraries have been updated possibly by:

  • System update (e.g. Snow Leopard to Lion)
  • Package updates (e.g. Homebrew, or Macports)

libxml-ruby is compiled against a specific version of the library libxml2, if the library is then updated it will sometimes work for a bit, but generally be unstable (like this). You could try and force it to recompile by doing something like:

$ gem uninstall libxml-ruby
$ gem install pivotal-tracker
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜