typhoeus/multi.rb:21: [BUG] Segmentation fault when posting - Rails 3.0 Application on Red Hat

531 views
Skip to first unread message

Dan Brandt

unread,
Jun 15, 2011, 7:16:48 AM6/15/11
to Typhoeus
We lost most of a day trying to fix this issue. I'm posting how we
resolved it in case others have the same issue.

Summary: Download and build a newer version of Curl (7.21.6). Remove
curl 7.15.5 and the curl-devel package (7.15.5)

Our Rails 3.0 application uses Typhoeus to communicate with a back end
server. I does both Get and Post requests. Everything worked fine on
our development and staging boxes. After we began testing on an
existing production environment a small number of requests failed with
the Seg fault. It turned out to be only Posts. Googling revealed that
this was probably an issue with the version of Curl on the system
(which Typhoeus uses).

It turns out that our OS Red Hat 5.6 only supports Curl 7.15.5 and
that is too old a version. We downloaded and compiled a newer version
7.21.6. That was the easy part.

We spent hours trying to get Typhoeus to use the new version but it
always showed 7.15.5 even though this version of Curl was no longer
installed on our system.

Our environment uses passenger-install-nginx-module. Following
installation instructions we installed the curl-devel package. Again
on RedHat 5.6, this package is for Curl 7.15.5. Curl-devel includes
only the header files and is not needed if you have the full Curl
installation including headers. The recipe we followed to install
passenger included a step to install Curl-devel. I've read that some
packages still have dependencies on curl-devel to install. When I
next install I will try to omit curl-devel and see if it's is even
needed.

Hope this saves someone the hours we lost on this bug!!!

Dejan Gojkovic

unread,
Oct 16, 2011, 4:13:22 AM10/16/11
to typh...@googlegroups.com
Thanks for sharing. We'll try that..

William Flanagan

unread,
Dec 1, 2011, 12:05:40 PM12/1/11
to typh...@googlegroups.com
Hi,

Any thoughts on what else to try for this error? I'm doing a simple Typhoeus::Request.get(url) and I'm regularly seeing this error.  

I'm on OSX Snow Leopard. 

So far, I've updated the curl version to 7.23.1 and reinstalled Typhoeus, upgrading to the most recent version. 

Thanks,

William

url 7.23.1 (x86_64-apple-darwin10.8.0) libcurl/7.23.1 OpenSSL/1.0.0e zlib/1.2.5 libidn/1.22
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp 
Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz 
Steig:marketfu wflanagan$ 

/Users/wflanagan/.rvm/gems/ruby-1.9.2-p180/gems/typhoeus-0.3.3/lib/typhoeus/multi.rb:21:in `multi_perform'
/Users/wflanagan/.rvm/gems/ruby-1.9.2-p180/gems/typhoeus-0.3.3/lib/typhoeus/multi.rb:21:in `perform'
/Users/wflanagan/.rvm/gems/ruby-1.9.2-p180/gems/typhoeus-0.3.3/lib/typhoeus/hydra.rb:95:in `run'
/Users/wflanagan/.rvm/gems/ruby-1.9.2-p180/gems/typhoeus-0.3.3/lib/typhoeus/request.rb:217:in `run'
/Users/wflanagan/.rvm/gems/ruby-1.9.2-p180/gems/typhoeus-0.3.3/lib/typhoeus/request.rb:222:in `get'
/Users//Users/wflanagan/.rvm/gems/ruby-1.9.2-p180/gems/typhoeus-0.3.3/lib/typhoeus/multi.rb:21:in `multi_perform'
/Users/wflanagan/.rvm/gems/

WilliamF

unread,
Dec 2, 2011, 4:56:25 PM12/2/11
to typh...@googlegroups.com
Alright. Bummer.  I've completely upgraded my operating system (from Snow leopard to Lion), and I still get this error. 

Anyone? 

WilliamF

unread,
Dec 3, 2011, 3:24:48 PM12/3/11
to typh...@googlegroups.com
Alright. Completely different box. Fresh 11.10 install. Everything upgraded to latest versions. And, this problem remains.  curl 7.21.3 on Ubuntu.

Dan Brandt

unread,
Jan 14, 2013, 3:09:51 PM1/14/13
to typh...@googlegroups.com
I neglected to add a little help to quickly check the version of Curl being used:

To check version run

irb
   require "tyhpoeus"
   Typhoeus::Easy.new.curl_version 
Reply all
Reply to author
Forward
0 new messages