Bug #5655

Segfault in Net::HTTP on OS X Lion

Added by Alex Koppel over 2 years ago. Updated over 2 years ago.

[ruby-core:41177]
Status:Third Party's Issue
Priority:Normal
Assignee:-
Category:-
Target version:1.9.3
ruby -v:ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.1.0] Backport:

Description

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/RELEASEX8664 x86_64

Code to reproduce:
require 'net/https'
http = Net::HTTP.new("facebook.com", 443)
store = OpenSSL::X509::Store.new
store.setdefaultpaths
http.certstore = store
http.verify
mode = OpenSSL::SSL::VERIFYPEER
http.use
ssl = true
httprequest = 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 1.8 - Bug #4915: segmentation fault on net/http.rb:586 Third Party's Issue 06/22/2011
Related to ruby-trunk - Bug #4373: http.rb:677: [BUG] Segmentation fault Third Party's Issue 02/06/2011

History

#1 Updated by Yui NARUSE over 2 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