Project

General

Profile

Bug #9839

Segment fault in http

Added by siera (Ruo S) about 5 years ago. Updated over 2 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
[ruby-core:62586]

Description

I've got segment fault in ruby 2.1.1

/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:920: [BUG] Segmentation fault at 0x00000000000000
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0030 p:---- s:0248 e:000247 CFUNC :connect
c:0029 p:0008 s:0245 e:000244 BLOCK /home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:920
c:0028 p:0036 s:0243 E:001c10 BLOCK /home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:91 [FINISH]
c:0027 p:---- s:0238 e:000237 CFUNC :call
c:0026 p:0069 s:0234 E:0015c8 METHOD /home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:101
c:0025 p:0508 s:0223 E:001598 METHOD /home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:920
c:0024 p:0007 s:0212 e:000211 METHOD /home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:863
c:0023 p:0064 s:0209 e:000208 METHOD /home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:858
c:0022 p:0038 s:0206 e:000205 METHOD /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:700
c:0021 p:0445 s:0201 e:000200 METHOD /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:631
c:0020 p:0039 s:0188 e:000187 METHOD /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:994
c:0019 p:0324 s:0175 E:000920 METHOD /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:257
c:0018 p:0228 s:0157 e:000156 METHOD /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:974
c:0017 p:0647 s:0146 E:000660 METHOD /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:298
c:0016 p:0228 s:0128 e:000127 METHOD /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:974
c:0015 p:0647 s:0117 E:000df0 METHOD /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:298
c:0014 p:0228 s:0099 e:000098 METHOD /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:974
c:0013 p:0647 s:0088 E:000bb0 METHOD /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:298
c:0012 p:0176 s:0070 e:000069 METHOD /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize.rb:432
c:0011 p:0010 s:0061 e:000060 BLOCK /home/ubuntu/datametric-domaindata/app/services/scraper_base.rb:213
c:0010 p:0036 s:0058 E:001600 BLOCK /home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:91
c:0009 p:0008 s:0053 e:000052 BLOCK /home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:35 [FINISH]
c:0008 p:---- s:0051 e:000050 CFUNC :catch
c:0007 p:0052 s:0047 e:000046 METHOD /home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:35
c:0006 p:0088 s:0042 E:002188 METHOD /home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:106
c:0005 p:0047 s:0031 E:001498 METHOD /home/ubuntu/datametric-domaindata/app/services/scraper_base.rb:212
c:0004 p:0126 s:0024 e:000023 METHOD /home/ubuntu/datametric-domaindata/app/services/australia_domain.rb:52
c:0003 p:0041 s:0011 e:000010 METHOD /home/ubuntu/datametric-domaindata/app/services/scraper_base.rb:69
c:0002 p:0007 s:0004 e:000003 BLOCK /home/ubuntu/datametric-domaindata/app/services/scraper_base.rb:54 [FINISH]
c:0001 p:---- s:0002 e:000001 TOP [FINISH]

-- Ruby level backtrace information ----------------------------------------
/home/ubuntu/datametric-domaindata/app/services/scraper_base.rb:212:in send_request'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:106:in
timeout'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:35:in catch'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:35:in
catch'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:35:in block in catch'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:91:in
block in timeout'
/home/ubuntu/datametric-domaindata/app/services/scraper_base.rb:213:in block in send_request'
/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize.rb:432:in
get'
/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:298:in fetch'
/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:974:in
response_redirect'
/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:298:in fetch'
/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:974:in
response_redirect'
/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:298:in fetch'
/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:974:in
response_redirect'
/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:257:in fetch'
/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:994:in
request'
/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:631:in connection_for'
/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:700:in
start'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:858:in start'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:863:in
do_start'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:920:in connect'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:101:in
timeout'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:101:in call'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:91:in
block in timeout'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:920:in block in connect'
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:920:in
connect'

-- C level backtrace information -------------------------------------------
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1e154c) [0x7f349228354c] vm_dump.c:685
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x76f73) [0x7f3492118f73] error.c:307
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(rb_bug+0xb3) [0x7f3492119bc3] error.c:334
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x159d2e) [0x7f34921fbd2e] signal.c:704
/lib/x86_64-linux-gnu/libc.so.6(+0x36ff0) [0x7f3491d10ff0] ossl_cipher.c:578
/lib/x86_64-linux-gnu/libc.so.6(+0x14177f) [0x7f3491e1b77f] regexec.c:2413
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(rb_str_cat2+0x14) [0x7f3492219934] string.c:2158
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/x86_64-linux/openssl.so(+0x26f1c) [0x7f348efb4f1c] ossl.c:317
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/x86_64-linux/openssl.so(ossl_raise+0x87) [0x7f348efb5b57] ossl.c:337
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/x86_64-linux/openssl.so(+0x23486) [0x7f348efb1486] ossl_ssl.c:1288
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1d7a31) [0x7f3492279a31] vm_insnhelper.c:1470
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1cf984) [0x7f3492271984] insns.def:1028
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1d352c) [0x7f349227552c] vm.c:1304
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1d67e1) [0x7f34922787e1] vm.c:788
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1d682a) [0x7f349227882a] vm.c:807
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x86550) [0x7f3492128550] proc.c:734
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1caf44) [0x7f349226cf44] vm_insnhelper.c:1470
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1cf984) [0x7f3492271984] insns.def:1028
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1d352c) [0x7f349227552c] vm.c:1304
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1da874) [0x7f349227c874] vm.c:732
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1cca7a) [0x7f349226ea7a] vm_eval.c:1858
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(rb_catch_obj+0xc) [0x7f349226eaec] vm_eval.c:1837
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1ccb9e) [0x7f349226eb9e] vm_eval.c:1823
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1caf44) [0x7f349226cf44] vm_insnhelper.c:1470
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1d02c5) [0x7f34922722c5] insns.def:999
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1d352c) [0x7f349227552c] vm.c:1304
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1d67e1) [0x7f34922787e1] vm.c:788
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1d682a) [0x7f349227882a] vm.c:807
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1ec6cd) [0x7f349228e6cd] thread.c:535
/home/ubuntu/.rvm/rubies/ruby-2.1.1/lib/libruby.so.2.1(+0x1eca0b) [0x7f349228ea0b] thread_pthread.c:803
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7f6e) [0x7f3491ac4f6e]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f3491dd49cd] parse.c:5045


Files

sidekiq.log.1 (317 KB) sidekiq.log.1 segfault output pinfieldharm (Paul Infield-Harm), 05/30/2014 06:41 PM

Related issues

Is duplicate of Ruby trunk - Bug #9592: Fix segfault with old OpenSSLClosed03/05/2014Actions

History

Updated by usa (Usaku NAKAMURA) about 5 years ago

  • Status changed from Open to Feedback

What is the version of openssl?
It seems known problem of ruby 2.1.1.
Please try ruby 2.1.2.

Updated by pinfieldharm (Paul Infield-Harm) about 5 years ago

We also have the same problem, even after upgrading to ruby 2.1.2. I've attached the logging output. I can supply a core dump if that helps.

This has been happening on a regular basis (once every few days) for a few months, at least.

The version of openssl we're using is a recent version of openssl 1.0.1 on Ubuntu:

$ openssl version -a
OpenSSL 1.0.1 14 Mar 2012
built on: Mon Apr 7 20:33:29 UTC 2014
platform: debian-amd64
options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)
compiler: cc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DOPENSSL_NO_TLS1_2_CLIENT -DOPENSSL_MAX_TLS1_2_CIPHER_LENGTH=50 -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
OPENSSLDIR: "/usr/lib/ssl"

Also: Is there a way to change the priority? I'm not the original reporter, but this particular bug is causing a lot of problems at my company.

#3

Updated by rhenium (Kazuki Yamaguchi) over 2 years ago

  • Is duplicate of Bug #9592: Fix segfault with old OpenSSL added

Updated by rhenium (Kazuki Yamaguchi) over 2 years ago

  • Assignee deleted (cruby-linux)
  • Status changed from Feedback to Rejected

This should have been fixed at [Bug #9592]. I suspect Paul's is another issue ([Bug #12292]), though, I can't tell without a reproducer.

Also available in: Atom PDF