Bug #5655

Segfault in Net::HTTP on OS X Lion

Added by Alex Koppel about 4 years ago. Updated about 4 years ago.

Status:Third Party's Issue
ruby -v:ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.1.0] Backport:


When I make an SSL call using Net::HTTP in Ruby 1.9.3p0 (installed via RVM), I'm consistently getting a segfault in OS X Lion. I've attached the OS X crash log and the output from the crash, which includes the control frame information, Ruby level backtrace information, and loaded features.

I've also been able to reproduce this in 1.9.3-head (ruby -v: ruby 1.9.3p0 (2011-11-08 revision 33661) [x86_64-darwin11.1.0]).

My environment (uname -a): Darwin Ravasaur.local 11.1.0 Darwin Kernel Version 11.1.0: Tue Jul 26 16:07:11 PDT 2011; root:xnu-1699.22.81~1/RELEASE_X86_64 x86_64

Code to reproduce:
require 'net/https'
http = Net::HTTP.new("facebook.com", 443)
store = OpenSSL::X509::Store.new
http.cert_store = store
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.use_ssl = true
http_request = Net::HTTPGenericRequest.new("POST", true, true, "/koppel", {"Content-Length"=>"0"})
http.request http_request, ""

ruby_2011-11-21-170444_Ravasaur.crash - OS X crash log (15.1 KB) Alex Koppel, 11/22/2011 01:50 AM

crash_output.txt Magnifier - Ruby output from crash (33.1 KB) Alex Koppel, 11/22/2011 01:50 AM

Related issues

Related to Ruby trunk - Bug #4373: http.rb:677: [BUG] Segmentation fault Third Party's Issue 02/06/2011


#1 Updated by Yui NARUSE about 4 years ago

  • Status changed from Open to Third Party's Issue

Install openssl with macports or homebrew or something and use it.
See http://www.christopherirish.com/2011/09/02/ruby-1-9-2-segmentation-fault-and-openssl/

Also available in: Atom PDF