taf2/curb — Issue #89: Segfault with on_debug under CentOS 5.7
Author: jwbrownatadobe
Created: 2011-10-27 17:54:12+00:00
State: open

I consistently get a segfault if I set an on_debug callback when running on my CentOS 5.7 machine.

My minimum repro source:

#!/usr/bin/env ruby

require 'rubygems'
require 'bundler/setup'
require 'curb'

curl = Curl::Easy.new("https://www.adobe.com")
curl.on_debug {}
curl.send("http_head")

The error:

$ bin/test
bin/test: [BUG] Segmentation fault
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

-- control frame ----------
c:0001 p:0000 s:0002 b:0002 l:000ab8 d:000ab8 TOP
---------------------------

-- C level backtrace information -------------------------------------------
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_vm_bugreport+0x5f) [0x2abce5d1400f]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9 [0x2abce5bfec2b]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_bug+0xb3) [0x2abce5bfeda3]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9 [0x2abce5ca849c]
/lib64/libpthread.so.0 [0x32ebc0eb70]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(st_lookup+0x26) [0x2abce5caeef6]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_method_entry_get_without_cache+0xa5) [0x2abce5cfecd5]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_funcall+0x168) [0x2abce5d02f28]
/home/jwbrown/app/.vendor/bundle/ruby/1.9.1/gems/curb-0.7.15/lib/curb_core.so [0x2aaaac0fcf09]
/usr/lib64/libcurl.so.3(Curl_debug+0x86) [0x32efc12d96]
/usr/lib64/libcurl.so.3(Curl_infof+0x13b) [0x32efc1362b]
/usr/lib64/libcurl.so.3(Curl_disconnect+0x81) [0x32efc18bf1]
/usr/lib64/libcurl.so.3 [0x32efc18fd3]
/usr/lib64/libcurl.so.3(Curl_close+0x28) [0x32efc1ea78]
/home/jwbrown/app/.vendor/bundle/ruby/1.9.1/gems/curb-0.7.15/lib/curb_core.so(curl_easy_free+0x33) [0x2aaaac0ff963]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9 [0x2abce5c12857]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9 [0x2abce5c13808]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(ruby_cleanup+0x1d4) [0x2abce5c03f14]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(ruby_run_node+0x36) [0x2abce5c041c6]
ruby(main+0x4f) [0x4008ef]
/lib64/libc.so.6(__libc_start_main+0xf4) [0x32eb41d994]
ruby [0x4007e9]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted
$