Bug #4875

Segmentation fault in http.rb

Added by Ilya Sokolov almost 3 years ago. Updated almost 3 years ago.

[ruby-core:37040]
Status:Closed
Priority:Normal
Assignee:Hiroshi Nakamura
Category:-
Target version:1.9.3
ruby -v:ruby 1.9.2p274 (2011-06-06 revision 31932) [x86_64-darwin10.7.0] Backport:

Description

=begin

It appears when i use omniauth in rails app

/Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:678: [BUG] Segmentation fault
ruby 1.9.2p274 (2011-06-06 revision 31932) [x86_64-darwin10.7.0]

-- control frame ----------
c:0065 p:---- s:0330 b:0330 l:000329 d:000329 CFUNC :connect
c:0064 p:0011 s:0327 b:0327 l:001c30 d:000326 BLOCK /Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:678
c:0063 p:0111 s:0325 b:0325 l:001460 d:001460 METHOD /Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/timeout.rb:58
c:0062 p:0026 s:0313 b:0313 l:000312 d:000312 METHOD /Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/timeout.rb:89
c:0061 p:0444 s:0307 b:0307 l:001c30 d:001c30 METHOD /Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:678
c:0060 p:0011 s:0299 b:0299 l:000298 d:000298 METHOD /Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:637
c:0059 p:0048 s:0296 b:0296 l:000295 d:000295 METHOD /Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:626
c:0058 p:0025 s:0293 b:0293 l:000292 d:000292 METHOD /Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1168
c:0057 p:0165 s:0286 b:0286 l:000285 d:000285 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oauth-0.4.4/lib/oauth/consumer.rb:164
c:0056 p:0028 s:0272 b:0272 l:000271 d:000271 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oauth-0.4.4/lib/oauth/consumer.rb:197
c:0055 p:0161 s:0263 b:0263 l:000262 d:000262 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oauth-0.4.4/lib/oauth/consumer.rb:139
c:0054 p:0028 s:0256 b:0256 l:000255 d:000255 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oa-oauth-0.2.6/lib/omniauth/strategies/oauth.rb:31
c:0053 p:0177 s:0251 b:0251 l:000250 d:000250 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oa-core-0.2.6/lib/omniauth/strategy.rb:58
c:0052 p:0177 s:0247 b:0247 l:000246 d:000246 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oa-core-0.2.6/lib/omniauth/strategy.rb:41
c:0051 p:0019 s:0243 b:0243 l:000242 d:000242 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oa-core-0.2.6/lib/omniauth/strategy.rb:30
c:0050 p:0044 s:0239 b:0239 l:000238 d:000238 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oa-core-0.2.6/lib/omniauth/builder.rb:30
c:0049 p:0015 s:0235 b:0235 l:000234 d:000234 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/actiondispatch/middleware/beststandardssupport.rb:17
c:0048 p:0093 s:0228 b:0228 l:000227 d:000227 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action
dispatch/middleware/head.rb:14
c:0047 p:0155 s:0221 b:0221 l:000220 d:000220 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/rack-1.2.3/lib/rack/methodoverride.rb:24
c:0046 p:0046 s:0215 b:0215 l:000214 d:000214 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/actiondispatch/middleware/paramsparser.rb:21
c:0045 p:0054 s:0210 b:0210 l:000209 d:000209 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/actiondispatch/middleware/flash.rb:182
c:0044 p:0027 s:0203 b:0203 l:000202 d:000202 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action
dispatch/middleware/session/abstractstore.rb:149
c:0043 p:0015 s:0192 b:0192 l:000191 d:000191 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action
dispatch/middleware/cookies.rb:302
c:0042 p:0014 s:0184 b:0184 l:002220 d:000183 BLOCK /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.8/lib/activerecord/querycache.rb:32
c:0041 p:0019 s:0182 b:0182 l:000181 d:000181 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.8/lib/activerecord/connectionadapters/abstract/querycache.rb:2
c:0040 p:0051 s:0178 b:0178 l:000177 d:000177 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.8/lib/active
record/querycache.rb:12
c:0039 p:0019 s:0174 b:0174 l:002220 d:002220 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.8/lib/active
record/querycache.rb:31
c:0038 p:0015 s:0170 b:0170 l:000169 d:000169 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.8/lib/active
record/connectionadapters/abstract/connectionpool.
c:0037 p:0029 s:0166 b:0166 l:000f90 d:000165 BLOCK /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/actiondispatch/middleware/callbacks.rb:46
c:0036 p:0155 s:0164 b:0164 l:000163 d:000163 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activesupport-3.0.8/lib/active
support/callbacks.rb:416
c:0035 p:0011 s:0154 b:0154 l:000f90 d:000f90 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/actiondispatch/middleware/callbacks.rb:44
c:0034 p:0015 s:0150 b:0150 l:000149 d:000149 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/rack-1.2.3/lib/rack/sendfile.rb:107
c:0033 p:0049 s:0140 b:0140 l:000139 d:000139 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action
dispatch/middleware/remoteip.rb:48
c:0032 p:0017 s:0136 b:0136 l:000135 d:000135 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action
dispatch/middleware/showexceptions.rb:47
c:0031 p:0027 s:0128 b:0128 l:000127 d:000127 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.8/lib/rails/rack/logger.rb:13
c:0030 p:0032 s:0124 b:0124 l:000123 d:000123 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/rack-1.2.3/lib/rack/runtime.rb:17
c:0029 p:0052 s:0115 b:0115 l:000114 d:000114 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activesupport-3.0.8/lib/active
support/cache/strategy/localcache.rb:72
c:0028 p:0014 s:0111 b:0111 l:000105 d:000110 BLOCK /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/rack-1.2.3/lib/rack/lock.rb:11
c:0027 p:0019 s:0109 b:0109 l:000108 d:000108 METHOD internal:prelude:10
c:0026 p:0054 s:0106 b:0106 l:000105 d:000105 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/rack-1.2.3/lib/rack/lock.rb:11
c:0025 p:0193 s:0101 b:0101 l:000100 d:000100 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action
dispatch/middleware/static.rb:30
c:0024 p:0032 s:0094 b:0094 l:000093 d:000093 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.8/lib/rails/application.rb:168
c:0023 p:0021 s:0090 b:0090 l:000089 d:000089 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.8/lib/rails/application.rb:77
c:0022 p:---- s:0085 b:0085 l:000084 d:000084 FINISH
c:0021 p:0027 s:0083 b:0083 l:000082 d:000082 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/httpserver.rb:546
c:0020 p:0029 s:0074 b:0074 l:0021b8 d:000073 BLOCK /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http
server.rb:624
c:0019 p:---- s:0070 b:0070 l:000069 d:000069 FINISH
c:0018 p:---- s:0068 b:0068 l:000067 d:000067 CFUNC :each
c:0017 p:0204 s:0065 b:0065 l:0021b8 d:0021b8 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/httpserver.rb:622
c:0016 p:0022 s:0054 b:0054 l:000035 d:000053 BLOCK /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http
server.rb:506
c:0015 p:---- s:0052 b:0052 l:000051 d:000051 FINISH
c:0014 p:---- s:0050 b:0050 l:000049 d:000049 CFUNC :fork
c:0013 p:0104 s:0047 b:0045 l:000035 d:000044 BLOCK /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/httpserver.rb:504
c:0012 p:---- s:0041 b:0041 l:000040 d:000040 FINISH
c:0011 p:---- s:0039 b:0039 l:000038 d:000038 CFUNC :each
c:0010 p:0023 s:0036 b:0036 l:000035 d:000035 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http
server.rb:500
c:0009 p:0058 s:0033 b:0033 l:000032 d:000032 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/httpserver.rb:513
c:0008 p:0353 s:0029 b:0029 l:001c28 d:001c28 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http
server.rb:163
c:0007 p:0033 s:0024 b:0024 l:000023 d:000023 METHOD /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn.rb:30
c:0006 p:0310 s:0019 b:0019 l:0005e8 d:0005e8 TOP /Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/bin/unicornrails:208
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :load
c:0003 p:0127 s:0007 b:0007 l:0014f8 d:001a30 EVAL /Users/Falcon/.rvm/gems/ruby-1.9.2-head/bin/unicorn
rails:19
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0014f8 d:0014f8 TOP


-- Ruby level backtrace information ----------------------------------------
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/bin/unicornrails:19:in <main>'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/bin/unicorn_rails:19:in
load'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/bin/unicorn
rails:208:in <top (required)>'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn.rb:30:in
run'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/httpserver.rb:163:in start'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http_server.rb:513:in
maintain
workercount'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http
server.rb:500:in spawn_missing_workers'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http_server.rb:500:in
each'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/httpserver.rb:504:in block in spawn_missing_workers'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http_server.rb:504:in
fork'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http
server.rb:506:in block (2 levels) in spawn_missing_workers'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http_server.rb:622:in
workerloop'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http
server.rb:622:in each'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http_server.rb:624:in
block in workerloop'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/unicorn-3.7.0/lib/unicorn/http
server.rb:546:in process_client'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.8/lib/rails/application.rb:77:in
methodmissing'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.8/lib/rails/application.rb:168:in call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action_dispatch/middleware/static.rb:30:in
call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/rack-1.2.3/lib/rack/lock.rb:11:in call'
<internal:prelude>:10:in
synchronize'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/rack-1.2.3/lib/rack/lock.rb:11:in block in call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activesupport-3.0.8/lib/active_support/cache/strategy/local_cache.rb:72:in
call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/rack-1.2.3/lib/rack/runtime.rb:17:in call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.8/lib/rails/rack/logger.rb:13:in
call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action
dispatch/middleware/showexceptions.rb:47:in call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action_dispatch/middleware/remote_ip.rb:48:in
call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/rack-1.2.3/lib/rack/sendfile.rb:107:in call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action_dispatch/middleware/callbacks.rb:44:in
call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activesupport-3.0.8/lib/active
support/callbacks.rb:416:in _run_call_callbacks'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action_dispatch/middleware/callbacks.rb:46:in
block in call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.8/lib/activerecord/connectionadapters/abstract/connectionpool.rb:354:in call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.8/lib/active_record/query_cache.rb:31:in
call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.8/lib/active
record/querycache.rb:12:in cache'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.8/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in
cache'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/activerecord-3.0.8/lib/active
record/querycache.rb:32:in block in call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action_dispatch/middleware/cookies.rb:302:in
call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action
dispatch/middleware/session/abstractstore.rb:149:in call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action_dispatch/middleware/flash.rb:182:in
call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action
dispatch/middleware/paramsparser.rb:21:in call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/rack-1.2.3/lib/rack/methodoverride.rb:24:in
call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action
dispatch/middleware/head.rb:14:in call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in
call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oa-core-0.2.6/lib/omniauth/builder.rb:30:in call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oa-core-0.2.6/lib/omniauth/strategy.rb:30:in
call'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oa-core-0.2.6/lib/omniauth/strategy.rb:41:in call!'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oa-core-0.2.6/lib/omniauth/strategy.rb:58:in
requestcall'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oa-oauth-0.2.6/lib/omniauth/strategies/oauth.rb:31:in request_phase'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oauth-0.4.4/lib/oauth/consumer.rb:139:in
get
request_token'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oauth-0.4.4/lib/oauth/consumer.rb:197:in token_request'
/Users/Falcon/.rvm/gems/ruby-1.9.2-head/gems/oauth-0.4.4/lib/oauth/consumer.rb:164:in
request'
/Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1168:in request'
/Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:626:in
start'
/Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:637:in do_start'
/Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:678:in
connect'
/Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/timeout.rb:89:in timeout'
/Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/timeout.rb:58:in
timeout'
/Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:678:in block in connect'
/Users/Falcon/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:678:in
connect'

-- C level backtrace information -------------------------------------------
0 libruby.1.9.1.dylib 0x0000000100180572 rbvmbugreport + 210
1 libruby.1.9.1.dylib 0x0000000100039f34 reportbug + 372
2 libruby.1.9.1.dylib 0x000000010003a0f8 rb
bug + 200
3 libruby.1.9.1.dylib 0x00000001000ffae4 sigsegv + 132
4 libSystem.B.dylib 0x00007fff84eb666a sigtramp + 26
5 ??? 0x0000000000000001 0x0 + 1
6 openssl.bundle 0x000000010441faca ossl
sslverifycallback + 42
7 libcrypto.1.0.0.dylib 0x00000001036ac80d X509verifycert + 557
8 libssl.1.0.0.dylib 0x0000000101752b50 sslverifycertchain + 336
9 libssl.1.0.0.dylib 0x0000000101733561 ssl3
getservercertificate + 705
10 libssl.1.0.0.dylib 0x000000010173615a ssl3connect + 2938
11 libssl.1.0.0.dylib 0x000000010173ea22 ssl23
connect + 3058
12 openssl.bundle 0x0000000104420337 osslstartssl + 119
13 libruby.1.9.1.dylib 0x000000010017ba83 vmcallmethod + 931
14 libruby.1.9.1.dylib 0x0000000100166e13 vmexeccore + 4739
15 libruby.1.9.1.dylib 0x000000010016f8d3 vmexec + 1507
16 libruby.1.9.1.dylib 0x000000010017133a vm
call0 + 1290
17 libruby.1.9.1.dylib 0x000000010017b2a1 vmmethodmissing + 481
18 libruby.1.9.1.dylib 0x000000010017bc18 vmcallmethod + 1336
19 libruby.1.9.1.dylib 0x0000000100166e13 vmexeccore + 4739
20 libruby.1.9.1.dylib 0x000000010016f8d3 vmexec + 1507
21 libruby.1.9.1.dylib 0x000000010017cd80 rb
yield + 640
22 libruby.1.9.1.dylib 0x0000000100009452 rbaryeach + 82
23 libruby.1.9.1.dylib 0x000000010017ba83 vmcallmethod + 931
24 libruby.1.9.1.dylib 0x0000000100166e13 vmexeccore + 4739
25 libruby.1.9.1.dylib 0x000000010016f8d3 vmexec + 1507
26 libruby.1.9.1.dylib 0x000000010017cdc4 rb
yield + 708
27 libruby.1.9.1.dylib 0x000000010003ee18 rbprotect + 232
28 libruby.1.9.1.dylib 0x00000001000c2208 rb
ffork + 104
29 libruby.1.9.1.dylib 0x000000010017ba83 vm
callmethod + 931
30 libruby.1.9.1.dylib 0x0000000100166e13 vm
execcore + 4739
31 libruby.1.9.1.dylib 0x000000010016f8d3 vm
exec + 1507
32 libruby.1.9.1.dylib 0x000000010017cd80 rbyield + 640
33 libruby.1.9.1.dylib 0x00000001000c8b2d range
each + 253
34 libruby.1.9.1.dylib 0x000000010017ba83 vmcallmethod + 931
35 libruby.1.9.1.dylib 0x0000000100166e13 vmexeccore + 4739
36 libruby.1.9.1.dylib 0x000000010016f8d3 vmexec + 1507
37 libruby.1.9.1.dylib 0x000000010016fd70 rb
iseqeval + 368
38 libruby.1.9.1.dylib 0x000000010004224c rb
loadinternal + 300
39 libruby.1.9.1.dylib 0x000000010004397d rb
fload + 109
40 libruby.1.9.1.dylib 0x000000010017ba83 vm
callmethod + 931
41 libruby.1.9.1.dylib 0x0000000100166e13 vm
execcore + 4739
42 libruby.1.9.1.dylib 0x000000010016f8d3 vm
exec + 1507
43 libruby.1.9.1.dylib 0x000000010016fbdb rbiseqevalmain + 507
44 libruby.1.9.1.dylib 0x000000010003f322 ruby
execinternal + 178
45 libruby.1.9.1.dylib 0x0000000100041e2c ruby
run_node + 60
46 ruby 0x0000000100000ecf main + 79
47 ruby 0x0000000100000e74 start + 52
48 ??? 0x0000000000000002 0x0 + 2

[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
=end


Related issues

Duplicates ruby-trunk - Bug #4611: [BUG] Segementation fault reported Feedback 04/26/2011

History

#1 Updated by Ilya Sokolov almost 3 years ago

export RUBYOPT='-r openssl'

fixes this

#2 Updated by Hiroshi Nakamura almost 3 years ago

Adding '-r openssl' would affect autloading but the location where an exception thrown is OpenSSL::SSL::SSLSocket#connect.

Does the SEGV always happens for you? It would help to show us a minimized reproducible code or concrete steps to reproduce the SEGV.

#3 Updated by Jerome Wilson almost 3 years ago

I get this any time I try any sort of HTTP call. There is some suggestion that it might relate to the use of the 'pg' gem for Postgres, see first few results:

http://www.google.com/search?q=http.rb+678+pg

/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]

-- control frame ----------
c:0042 p:---- s:0176 b:0176 l:000175 d:000175 CFUNC :connect
c:0041 p:0011 s:0173 b:0173 l:0002b0 d:000172 BLOCK /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678
c:0040 p:0031 s:0171 b:0171 l:000170 d:000170 METHOD /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:44
c:0039 p:0026 s:0159 b:0159 l:000158 d:000158 METHOD /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:87
c:0038 p:0444 s:0153 b:0153 l:0002b0 d:0002b0 METHOD /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678
c:0037 p:0011 s:0145 b:0145 l:000144 d:000144 METHOD /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:637
c:0036 p:0048 s:0142 b:0142 l:000141 d:000141 METHOD /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:626
c:0035 p:0025 s:0139 b:0139 l:000138 d:000138 METHOD /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:1168
c:0034 p:0071 s:0132 b:0132 l:000131 d:000131 METHOD /Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/rest-client-1.6.1/lib/restclient/nethttpext.rb:17
c:0033 p:0041 s:0126 b:0125 l:000124 d:000124 METHOD /Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/httparty-0.7.8/lib/httparty/request.rb:69
c:0032 p:0066 s:0122 b:0122 l:000121 d:000121 METHOD /Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/httparty-0.7.8/lib/httparty.rb:390
c:0031 p:0030 s:0116 b:0116 l:000115 d:000115 METHOD /Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/httparty-0.7.8/lib/httparty.rb:342
c:0030 p:0329 s:0111 b:0111 l:000110 d:000110 METHOD /Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/cheddargetterclientruby-0.3.2/lib/cheddargetter/client.rb:554
c:0029 p:0029 s:0104 b:0104 l:000103 d:000103 METHOD /Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/cheddargetter
clientruby-0.3.2/lib/cheddargetter/client.rb:38
c:0028 p:0017 s:0100 b:0100 l:0004d8 d:000099 EVAL (irb):5
c:0027 p:---- s:0098 b:0098 l:000097 d:000097 FINISH
c:0026 p:---- s:0096 b:0096 l:000095 d:000095 CFUNC :eval
c:0025 p:0028 s:0089 b:0089 l:000088 d:000088 METHOD /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/workspace.rb:80
c:0024 p:0033 s:0082 b:0081 l:000080 d:000080 METHOD /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/context.rb:254
c:0023 p:0031 s:0076 b:0076 l:0005d8 d:000075 BLOCK /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:159
c:0022 p:0042 s:0068 b:0068 l:000067 d:000067 METHOD /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:273
c:0021 p:0011 s:0063 b:0063 l:0005d8 d:000062 BLOCK /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:156
c:0020 p:0144 s:0059 b:0059 l:000042 d:000058 BLOCK /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:243
c:0019 p:---- s:0056 b:0056 l:000055 d:000055 FINISH
c:0018 p:---- s:0054 b:0054 l:000053 d:000053 CFUNC :loop
c:0017 p:0009 s:0051 b:0051 l:000042 d:000050 BLOCK /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:229
c:0016 p:---- s:0049 b:0049 l:000048 d:000048 FINISH
c:0015 p:---- s:0047 b:0047 l:000046 d:000046 CFUNC :catch
c:0014 p:0023 s:0043 b:0043 l:000042 d:000042 METHOD /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:228
c:0013 p:0046 s:0040 b:0040 l:0005d8 d:0005d8 METHOD /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:155
c:0012 p:0011 s:0037 b:0037 l:001978 d:000036 BLOCK /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:70
c:0011 p:---- s:0035 b:0035 l:000034 d:000034 FINISH
c:0010 p:---- s:0033 b:0033 l:000032 d:000032 CFUNC :catch
c:0009 p:0183 s:0029 b:0029 l:001978 d:001978 METHOD /Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:69
c:0008 p:0210 s:0024 b:0024 l:001690 d:001690 METHOD /Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.3/lib/rails/commands/console.rb:44
c:0007 p:0019 s:0020 b:0020 l:000019 d:000019 METHOD /Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.3/lib/rails/commands/console.rb:8
c:0006 p:0430 s:0016 b:0016 l:000015 d:000015 TOP /Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.3/lib/rails/commands.rb:23
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :require
c:0003 p:0061 s:0006 b:0006 l:0014e8 d:001488 EVAL script/rails:6
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH

c:0001 p:0000 s:0002 b:0002 l:0014e8 d:0014e8 TOP

-- Ruby level backtrace information ----------------------------------------
script/rails:6:in <main>'
script/rails:6:in
require'
/Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.3/lib/rails/commands.rb:23:in <top (required)>'
/Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.3/lib/rails/commands/console.rb:8:in
start'
/Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.3/lib/rails/commands/console.rb:44:in start'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:69:in
start'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:69:in catch'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:70:in
block in start'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:155:in eval_input'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in
eachtoplevelstatement'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in catch'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in
block in each
toplevelstatement'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in loop'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in
block (2 levels) in eachtoplevelstatement'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:156:in block in eval_input'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:273:in
signal
status'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:159:in block (2 levels) in eval_input'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/context.rb:254:in
evaluate'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/workspace.rb:80:in evaluate'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/workspace.rb:80:in
eval'
(irb):5:in irb_binding'
/Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/cheddargetter_client_ruby-0.3.2/lib/cheddar_getter/client.rb:38:in
getplan'
/Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/cheddargetter
clientruby-0.3.2/lib/cheddargetter/client.rb:554:in do_request'
/Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/httparty-0.7.8/lib/httparty.rb:342:in
get'
/Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/httparty-0.7.8/lib/httparty.rb:390:in perform_request'
/Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/httparty-0.7.8/lib/httparty/request.rb:69:in
perform'
/Users/abailey/.rvm/gems/ruby-1.9.2-p180/gems/rest-client-1.6.1/lib/restclient/nethttpext.rb:17:in request'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:1168:in
request'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:626:in start'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:637:in
do_start'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678:in connect'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:87:in
timeout'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:44:in timeout'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678:in
block in connect'
/Users/abailey/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678:in `connect'

#4 Updated by Hiroshi Nakamura almost 3 years ago

  • Target version changed from 1.9.2 to 1.9.3

#5 Updated by Yui NARUSE almost 3 years ago

  • Status changed from Open to Assigned
  • Assignee set to Hiroshi Nakamura

#6 Updated by Hiroshi Nakamura almost 3 years ago

  • Status changed from Assigned to Feedback

Jerome, thanks for letting us know about 'pg'. With your help I found that a similar bug and solution.
https://github.com/rackspace/ruby-cloudfiles/issues/43

The reporter said that it was an error on OpenSSL when using a macports installation of either Postgres or Mysql. And installing from scratch or using Homebrew fixed the issue.

I checked ruby-pg gem. It links openssl by itself. For using native gems which depends on OpenSSL (such as pg and EventMachine) we need to make sure that all of OpenSSLs must be the same. Native extensions naturally uses mkmf.rb and try to detect system OpenSSL. This mismatch often occurs when you use --with-openssl-include for compiling ruby.

Ilya and Jerome, would you please make sure you're using same OpenSSL libraries for every gem you're using?

#7 Updated by Hiroshi Nakamura almost 3 years ago

  • Status changed from Feedback to Closed

I close this as a duplicate of #4611.

Also available in: Atom PDF