S3 connection segmentation fault

33 views
Skip to first unread message

Nic

unread,
Apr 5, 2011, 3:29:41 PM4/5/11
to carrierwave
I am getting a seg fault when I try to use s3. The weird thing is
that I have s3 interaction working on a different project, but copying
and pasting that code into my new project gives a seg fault. I am
using fog 0.7.1 in my gemfile. I am using ruby-1.9.2-p136 on both
projects. Essentially I alter an already working uploader to try to
use s3 like this:


class VideoUploader < CarrierWave::Uploader::Base

storage :s3

def store_dir
"#{ENV['RAILS_ENV']}/assets/#{model.class.to_s.underscore}/
#{model.id}"
end

end

CarrierWave.configure do |config|
config.root = Rails.root.join('tmp')
config.cache_dir = 'carrierwave'
config.s3_access_key_id = 'XXXX'
config.s3_secret_access_key = 'XXXX'
config.s3_bucket = 'XXXX'
end


This crashes my server with a seg fault, the last few lines of the
trace are:


/Users/nic/.rvm/gems/ruby-1.9.2-p136@hci/gems/excon-0.6.0/lib/excon/
connection.rb:220: [BUG] Segmentation fault
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.6.0]

-- control frame ----------
c:0098 p:---- s:0521 b:0521 l:000520 d:000520 CFUNC :connect
c:0097 p:0372 s:0518 b:0518 l:000517 d:000517 METHOD /Users/nic/.rvm/
gems/ruby-1.9.2-p136@hci/gems/excon-0.6.0/lib/excon/connection.rb:220
c:0096 p:0030 s:0512 b:0509 l:000508 d:000508 METHOD /Users/nic/.rvm/
gems/ruby-1.9.2-p136@hci/gems/excon-0.6.0/lib/excon/connection.rb:239
c:0095 p:0580 s:0506 b:0506 l:000505 d:000505 METHOD /Users/nic/.rvm/
gems/ruby-1.9.2-p136@hci/gems/excon-0.6.0/lib/excon/connection.rb:126
c:0094 p:0100 s:0491 b:0491 l:000490 d:000490 METHOD /Users/nic/.rvm/
gems/ruby-1.9.2-p136@hci/gems/fog-0.7.1/lib/fog/core/connection.rb:20
c:0093 p:0106 s:0483 b:0483 l:000482 d:000482 METHOD /Users/nic/.rvm/
gems/ruby-1.9.2-p136@hci/gems/fog-0.7.1/lib/fog/storage/aws.rb:323


Thanks,
-Nic

Trevor Turk

unread,
Apr 10, 2011, 11:55:42 PM4/10/11
to carri...@googlegroups.com
I'd suggest using the latest fog/excon gems. That might help. 

Nic

unread,
Apr 11, 2011, 10:35:43 AM4/11/11
to carrierwave
Thanks for the reply. I tried upgrading to 0.7.2 to no avail. In
fact when I am using this other project all of my socket connections
seem to be breaking, even in http libraries, so I'm not sure if it is
carrierwave. I just don't understand what is different between the
projects that would break one and leave the other just fine...

Nic

unread,
Apr 12, 2011, 3:34:44 PM4/12/11
to carrierwave
Solved. The problem was the mysql gem. Use ruby-mysql or mysql2
instead.
Reply all
Reply to author
Forward
0 new messages