From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_PASS,T_DKIM_INVALID, T_RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 1F8201FA7B for ; Mon, 19 Jun 2017 15:27:20 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 12CC5120765; Tue, 20 Jun 2017 00:27:17 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id DFFAE12040E for ; Tue, 20 Jun 2017 00:27:14 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=NNU6XS/h+Kt5Ra0rvzpQsEVM46c=; b=VVTtZm9VAlI4ye8ALY U+PzgWe8OTQDtjcQ09g3JlkQhjK6dpeslUp3gqrABAUeODNvFGdHnzHeLUYDzkPC aXHNdh74gMlp4teciINwlInp5ulU9GcgTlLlBDd5kYKMtrEQWkR4rgL3k2q1RjDV 2NYDJhbh63TtCo4DjMNzwzH0k= Received: by filter0922p1mdw1.sendgrid.net with SMTP id filter0922p1mdw1-21267-5947ED2E-34 2017-06-19 15:26:38.241959405 +0000 UTC Received: from herokuapp.com (ec2-54-234-164-132.compute-1.amazonaws.com [54.234.164.132]) by ismtpd0006p1iad1.sendgrid.net (SG) with ESMTP id gSbHlQPBRbO5txLOSNM33g Mon, 19 Jun 2017 15:26:38.212 +0000 (UTC) Date: Mon, 19 Jun 2017 15:26:38 +0000 From: k@rhe.jp To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 56752 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11033 X-Redmine-Issue-Author: tknerr X-Redmine-Issue-Assignee: X-Redmine-Sender: rhenium X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS60U4xgr9n4TrtmTyubSS9+bRxjafR28WtbZd 8R34+zE8zfAjM90/bpFjSi6h6AR8TGlJ5KBz3rKOqCKlk14KWLo2DroWLbvkWnw3MvydpQ7DuSLWxr VEudP8Tfzo5pTnDSnvZAoolHAvRX1Wc6JExR X-ML-Name: ruby-core X-Mail-Count: 81723 Subject: [ruby-core:81723] [Ruby trunk Bug#11033] OpenSSL related threading issues in Ruby 2.1 and 2.2 X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11033 has been updated by rhenium (Kazuki Yamaguchi). File for-ruby-2-3-backport-805882145bde.patch added Now that openssl is a default gem, you can just update it before running 'bundle install': gem install openssl -v '~> 2.0.4' Anyway, I would like that patch to go to earlier versions of Ruby, too. 2.4 stable maintainer: Can you backport r59081? (I guess r58742 needs to be applied first.) 2.3 stable maintainer: I've attached a patch that applies on top of ruby_2_3. ---------------------------------------- Bug #11033: OpenSSL related threading issues in Ruby 2.1 and 2.2 https://bugs.ruby-lang.org/issues/11033#change-65424 * Author: tknerr (Torben Knerr) * Status: Closed * Priority: Normal * Assignee: openssl * Target version: * ruby -v: 2.1.5p273, 2.2.1p85 * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: REQUIRED ---------------------------------------- I'm experiencing some problems with multiple https connections in Ruby 2.1 and 2.2, whilst in Ruby 2.0 everything is working fine. This happens on a Windows 7 (64-bit) box in the context of installing multiple gems in parallel via bundlers `BUNDLE_JOBS=` setting. What I see are multiple `OpenSSL::SSL::SSLError: SSL_read: cert already in hash table` warnings and at some more or less random point it bails out because it cannot install a gem. When I repeat the `bundle install` command it will get past that gem and fail at a later one. I can repeat until all gems are installed. This is the stacktrace I get for every of the ssl warnings: ``` ... Installing polyglot 0.3.5 4: polyglot (0.3.5) from X:/home/.gem/ruby/2.2.0/specifications/polyglot-0.3.5.gemspec OpenSSL::SSL::SSLError: SSL_read: cert already in hash table X:/tools/ruby-2.2.1/lib/ruby/2.2.0/openssl/buffering.rb:182:in `sysread_nonblock' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/openssl/buffering.rb:182:in `read_nonblock' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/net/protocol.rb:153:in `rbuf_fill' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/net/protocol.rb:134:in `readuntil' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/net/protocol.rb:144:in `readline' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/net/http/response.rb:39:in `read_status_line' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/net/http/response.rb:28:in `read_new' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:1414:in `block in transport_request' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:1411:in `catch' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:1411:in `transport_request' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:1384:in `request' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/rubygems/request.rb:154:in `perform_request' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/rubygems/request.rb:109:in `fetch' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/rubygems/remote_fetcher.rb:346:in `request' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/rubygems/remote_fetcher.rb:231:in `fetch_http' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/rubygems/remote_fetcher.rb:247:in `fetch_http' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/rubygems/remote_fetcher.rb:267:in `fetch_path' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/rubygems/remote_fetcher.rb:302:in `cache_update_path' X:/tools/ruby-2.2.1/lib/ruby/2.2.0/rubygems/remote_fetcher.rb:168:in `download' X:/tools/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/rubygems_integration.rb:544:in `download_gem' X:/tools/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/fetcher.rb:63:in `download_gem_from_uri' X:/tools/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/source/rubygems.rb:370:in `fetch_gem' X:/tools/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/source/rubygems.rb:98:in `install' X:/tools/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/installer.rb:107:in `install_gem_from_spec' X:/tools/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/installer.rb:287:in `block in install_in_parallel' X:/tools/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/worker.rb:55:in `call' X:/tools/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/worker.rb:55:in `apply_func' X:/tools/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/worker.rb:50:in `block in process_queue' X:/tools/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/worker.rb:47:in `loop' X:/tools/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/worker.rb:47:in `process_queue' X:/tools/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/worker.rb:22:in `block (2 levels) in initialize' ... ``` This is originally reported here (with a bit more details): https://github.com/bundler/bundler/issues/3545 Any ideas? Might it be a regression of #8386? ---Files-------------------------------- for-ruby-2-3-backport-805882145bde.patch (2.89 KB) -- https://bugs.ruby-lang.org/