Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gem push fails with Broken Pipe IOError #242

Open
AndyObtiva opened this issue Sep 30, 2021 · 51 comments
Open

gem push fails with Broken Pipe IOError #242

AndyObtiva opened this issue Sep 30, 2021 · 51 comments

Comments

@AndyObtiva
Copy link

Environment Information

Provide at least:

  • JRuby version (jruby -v) and command line (flags, JRUBY_OPTS, etc): 9.3.0.0
  • Operating system and platform (e.g. uname -a): Darwin Andys-MacBook-Pro.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64

Other relevant info you may wish to add:

  • gem --version returns 3.2.28

Expected Behavior

Running gem push path_to_gem.gem should result in releasing the gem to RubyGems.org successfully.

This works in jruby-9.2.19.0

Actual Behavior

In jruby-9.3.0.0, I get a broken pipe IOError when running gem push path_to_gem.gem:

% gem push pkg/glimmer-dsl-swt-4.21.0.1.gem 
Pushing gem to https://rubygems.org...
ERROR:  While executing gem ... (IOError)
    Broken pipe

It works fine in ruby-3.0.2 and jruby-9.2.19.0. My Internet works well and the same in all cases.

@headius
Copy link
Member

headius commented Oct 6, 2021

Could you try to run this with more debugging output, via some combination of --verbose and --backtrace and --debug?

I'm trying to figure out if there's a dummy RG server somewhere I could use to test this. If you can get more debugging output we might have enough information to narrow the scope of this issue.

@AndyObtiva
Copy link
Author

OK, I just did and here is what I got:

% gem push --verbose --backtrace --debug pkg/glimmer-dsl-swt-4.21.0.2.gem 
NOTE:  Debugging mode prints all exceptions even when rescued
Exception `OptionParser::InvalidOption' at /Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/optparse.rb:1769 - invalid option: no-document
Exception `OptionParser::InvalidOption' at /Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/optparse.rb:1769 - invalid option: --no-document
Pushing gem to https://rubygems.org...
POST https://rubygems.org/api/v1/gems
Exception `IOError' at org/jruby/ext/openssl/SSLSocket.java:941 - Broken pipe
Exception `IOError' at org/jruby/ext/openssl/SSLSocket.java:941 - Broken pipe
Exception `IOError' at org/jruby/ext/openssl/SSLSocket.java:941 - Broken pipe
ERROR:  While executing gem ... (IOError)
    Broken pipe
	org/jruby/ext/openssl/SSLSocket.java:941:in `syswrite_nonblock'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/gems/shared/gems/jruby-openssl-0.10.7-java/lib/jopenssl23/openssl/buffering.rb:383:in `write_nonblock'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/protocol.rb:296:in `block in write0'
	org/jruby/RubyArray.java:1865:in `each'
	org/jruby/RubyEnumerable.java:1143:in `each_with_index'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/protocol.rb:275:in `write0'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/protocol.rb:248:in `block in write'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/protocol.rb:265:in `writing'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/protocol.rb:247:in `write'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/http/generic_request.rb:189:in `send_request_with_body'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/http/generic_request.rb:123:in `exec'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/http.rb:1518:in `block in transport_request'
	org/jruby/RubyKernel.java:1237:in `catch'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/http.rb:1517:in `transport_request'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/http.rb:1490:in `request'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/request.rb:220:in `perform_request'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/request.rb:152:in `fetch'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/remote_fetcher.rb:309:in `request'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/gemcutter_utilities.rb:234:in `request_with_otp'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/gemcutter_utilities.rb:105:in `rubygems_api_request'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/commands/push_command.rb:89:in `send_push_request'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/commands/push_command.rb:81:in `send_gem'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/commands/push_command.rb:66:in `execute'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/command.rb:323:in `invoke_with_build_args'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/command_manager.rb:178:in `process_args'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/command_manager.rb:147:in `run'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/gem_runner.rb:53:in `run'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/bin/gem:15:in `<main>'
Exception `Gem::SystemExitException' at /Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/user_interaction.rb:365 - Exiting RubyGems with exit_code 1

I deleted my ~/.gemrc, which had the --no-document option and ran the gem push command again, getting this output:

 % gem push --verbose --backtrace --debug pkg/glimmer-dsl-swt-4.21.0.2.gem
NOTE:  Debugging mode prints all exceptions even when rescued
Pushing gem to https://rubygems.org...
POST https://rubygems.org/api/v1/gems
Exception `IOError' at org/jruby/ext/openssl/SSLSocket.java:941 - Broken pipe
Exception `IOError' at org/jruby/ext/openssl/SSLSocket.java:941 - Broken pipe
Exception `IOError' at org/jruby/ext/openssl/SSLSocket.java:941 - Broken pipe
ERROR:  While executing gem ... (IOError)
    Broken pipe
	org/jruby/ext/openssl/SSLSocket.java:941:in `syswrite_nonblock'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/gems/shared/gems/jruby-openssl-0.10.7-java/lib/jopenssl23/openssl/buffering.rb:383:in `write_nonblock'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/protocol.rb:289:in `block in write0'
	org/jruby/RubyArray.java:1865:in `each'
	org/jruby/RubyEnumerable.java:1143:in `each_with_index'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/protocol.rb:275:in `write0'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/protocol.rb:248:in `block in write'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/protocol.rb:265:in `writing'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/protocol.rb:247:in `write'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/http/generic_request.rb:189:in `send_request_with_body'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/http/generic_request.rb:123:in `exec'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/http.rb:1518:in `block in transport_request'
	org/jruby/RubyKernel.java:1237:in `catch'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/http.rb:1517:in `transport_request'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/net/http.rb:1490:in `request'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/request.rb:220:in `perform_request'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/request.rb:152:in `fetch'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/remote_fetcher.rb:309:in `request'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/gemcutter_utilities.rb:234:in `request_with_otp'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/gemcutter_utilities.rb:105:in `rubygems_api_request'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/commands/push_command.rb:89:in `send_push_request'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/commands/push_command.rb:81:in `send_gem'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/commands/push_command.rb:66:in `execute'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/command.rb:323:in `invoke_with_build_args'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/command_manager.rb:178:in `process_args'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/command_manager.rb:147:in `run'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/gem_runner.rb:53:in `run'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/bin/gem:15:in `<main>'
Exception `Gem::SystemExitException' at /Users/andymaleh/.rvm/rubies/jruby-9.3.0.0/lib/ruby/stdlib/rubygems/user_interaction.rb:365 - Exiting RubyGems with exit_code 1

@headius
Copy link
Member

headius commented Oct 7, 2021

On master, I was able to push a gem ok (Java 11, macOS 10.15). I will try with released 9.3 and see if I can repro.

@headius
Copy link
Member

headius commented Oct 7, 2021

Oh and thank you for the extra logging output! Seems like this ties the issue back to jruby-openssl. However, I think we shipped the same jruby-openssl in 9.2.19.0 so there's more to the story.

I was able to push a gem with the 9.3.0.0 release (installed via rvm) so we need to dig deeper on why this is failing for you.

[] ~/projects/weakling $ jruby -v
jruby 9.3.0.0 (2.6.8) 2021-09-17 85c20e780f OpenJDK 64-Bit Server VM 25.222-b10 on 1.8.0_222-b10 +jit [darwin-x86_64]

[] ~/projects/weakling $ gem -v
3.2.14

@kares Any thoughts here?

@AndyObtiva
Copy link
Author

AndyObtiva commented Oct 7, 2021

Thanks for giving it a try.

Sorry, I forgot to provide the full version line, which indicates I am using JDK 16.

% jruby -v
jruby 9.3.0.0 (2.6.8) 2021-09-17 85c20e780f Java HotSpot(TM) 64-Bit Server VM 16.0.2+7-67 on 16.0.2+7-67 +jit [darwin-x86_64]
% gem -v
3.2.28
% rvm --version
rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
% uname -a
Darwin Andys-MacBook-Pro.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64

I am using MacOS Big Sur 11.6

Perhaps you would get different results with JDK 16?

@headius
Copy link
Member

headius commented Oct 8, 2021

I will give that a shot. I also have a macOS 11 system here that I'll try to fire up tomorrow.

@headius
Copy link
Member

headius commented Oct 11, 2021

Pushing on Java 16 appears to work fine for me locally, on Catalina.

[] ~/projects/weakling $ gem push weakling-0.0.5.pre2-java.gem 
Pushing gem to https://rubygems.org...
You have enabled multi-factor authentication. Please enter OTP code.
Code:   433294
Successfully registered gem: weakling (0.0.5.pre2-java)

[] ~/projects/weakling $ java -version
openjdk version "16-ea" 2021-03-16
OpenJDK Runtime Environment (build 16-ea+29-2091)
OpenJDK 64-Bit Server VM (build 16-ea+29-2091, mixed mode, sharing)

@enebo
Copy link
Member

enebo commented Oct 12, 2021

I just tried with Fedora Core 34 using both Java 8 and Java 16 and this also works for me. Just thinking outloud perhaps some SSL settings is different for your env than ours and this is tripping over something?

@AndyObtiva
Copy link
Author

AndyObtiva commented Oct 12, 2021

Thank you for testing with Java 16.

Please keep in mind that gem pushing works for me on the same machine setup with earlier versions of JRuby and with CRuby as well.

Also, did you notice the linkage from this issue by michaelklishin? ruby-amqp/march_hare#156

It seems he encountered the same issue. He also had to resort to CRuby to push his gem.

@headius
Copy link
Member

headius commented Oct 12, 2021

Right, I believe you, I'm just trying to find a way to reproduce it here so we can fix it. I will try a few more things.

@headius
Copy link
Member

headius commented Oct 12, 2021

This is an x86_64 MBP, yes?

@headius
Copy link
Member

headius commented Oct 12, 2021

I attempted to push with Java 16 (x86_64) on a macOS 11.5 M1 machine and it also pushed ok there.

Need to figure out how to get more information from your system. Have we tried all the relevant flags at this point?

@headius
Copy link
Member

headius commented Oct 12, 2021

@michaelklishin If you are able to reproduce we could use another data point. JDK version? OS version? Hardware?

@AndyObtiva
Copy link
Author

“This is an x86_64 MBP, yes?”

Yes, correct.

@michaelklishin
Copy link

I ran into this with JDK 13.0.2 on MacOS 11.6 (Intel hardware).

@headius
Copy link
Member

headius commented Oct 13, 2021

@michaelklishin Thank you!

@headius
Copy link
Member

headius commented Oct 13, 2021

@AndyObtiva @michaelklishin If you are able to reproduce this consistently, stop by our Matrix chat and I can work with you directly to figure out what is happening.

@headius
Copy link
Member

headius commented Oct 14, 2021

I've upgrade my work machine to 11.6 and will try a few things to reproduce this again.

@headius
Copy link
Member

headius commented Oct 14, 2021

Sadly I was still unable to reproduce this issue. @deivid-rodriguez Could there be something different when I am pushing a pre gem? Is there something more we could pass to RubyGems to get additional debugging output on the systems where this fails?

@deivid-rodriguez
Copy link
Contributor

I don't think a pre release would make any difference? And no, I think you're already using the full debugging output that we have available 😅.

I looked for the error message and found a couple of links with the same error that may have useful information:

  • One in excon. Closed due to inactivity and links to another one closed to inactivity too. That led me to find some fixes thereabout writing ssl sockets in non blocking mode, which may ring any bells 🤷.
  • Another one in rb-redis where the OP says that it was related to their local network environment.

@AndyObtiva
Copy link
Author

AndyObtiva commented Oct 15, 2021

I just tried jruby-9.3.1.0 on a different machine (a MacBook Air x86-64 running Catalina 10.15.7) with JDK 16, and encountered the same exact issue:

gem push ./pkg/glimmer-dsl-swt-4.21.1.0.gem
Pushing gem to https://rubygems.org...
ERROR:  While executing gem ... (IOError)
    Broken pipe
rake aborted!
Command failed with status (1): [gem push ./pkg/glimmer-dsl-swt-4.21.1.0.ge...]
/Users/andy/.rvm/gems/jruby-9.3.1.0@glimmer-dsl-swt/gems/juwelier-2.4.9/lib/juwelier/commands/release_to_rubygems.rb:15:in `run'
/Users/andy/.rvm/gems/jruby-9.3.1.0@glimmer-dsl-swt/gems/juwelier-2.4.9/lib/juwelier.rb:137:in `release_gem_to_rubygems'
/Users/andy/.rvm/gems/jruby-9.3.1.0@glimmer-dsl-swt/gems/juwelier-2.4.9/lib/juwelier/rubygems_dot_org_tasks.rb:31:in `block in define'
org/jruby/ext/monitor/Monitor.java:82:in `synchronize'
org/jruby/ext/monitor/Monitor.java:82:in `synchronize'
Tasks: TOP => release => gemcutter:release
(See full trace by running task with --trace)
uname -a
Darwin MacBook-Air.local 19.6.0 Darwin Kernel Version 19.6.0: Tue Aug 24 20:28:00 PDT 2021; root:xnu-6153.141.40~1/RELEASE_X86_64 x86_64
jruby --version
jruby 9.3.1.0 (2.6.8) 2021-10-13 2e01e7199d Java HotSpot(TM) 64-Bit Server VM 16.0.2+7-67 on 16.0.2+7-67 +jit [darwin-x86_64]
gem --version
3.2.29
rvm --version
rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]

Here is output with extra debugging options:

% gem push --verbose --backtrace --debug pkg/glimmer-dsl-swt-4.21.1.0.gem 
NOTE:  Debugging mode prints all exceptions even when rescued
Exception `OptionParser::InvalidOption' at /Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/optparse.rb:1769 - invalid option: no-document
Exception `OptionParser::InvalidOption' at /Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/optparse.rb:1769 - invalid option: --no-document
Pushing gem to https://rubygems.org...
POST https://rubygems.org/api/v1/gems
Exception `IOError' at org/jruby/ext/openssl/SSLSocket.java:941 - Broken pipe
Exception `IOError' at org/jruby/ext/openssl/SSLSocket.java:941 - Broken pipe
Exception `IOError' at org/jruby/ext/openssl/SSLSocket.java:941 - Broken pipe
ERROR:  While executing gem ... (IOError)
    Broken pipe
	org/jruby/ext/openssl/SSLSocket.java:941:in `syswrite_nonblock'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/gems/shared/gems/jruby-openssl-0.10.7-java/lib/jopenssl23/openssl/buffering.rb:383:in `write_nonblock'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/net/protocol.rb:296:in `block in write0'
	org/jruby/RubyArray.java:1865:in `each'
	org/jruby/RubyEnumerable.java:1143:in `each_with_index'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/net/protocol.rb:275:in `write0'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/net/protocol.rb:248:in `block in write'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/net/protocol.rb:265:in `writing'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/net/protocol.rb:247:in `write'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/net/http/generic_request.rb:189:in `send_request_with_body'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/net/http/generic_request.rb:123:in `exec'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/net/http.rb:1518:in `block in transport_request'
	org/jruby/RubyKernel.java:1237:in `catch'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/net/http.rb:1517:in `transport_request'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/net/http.rb:1490:in `request'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/request.rb:220:in `perform_request'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/request.rb:152:in `fetch'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/remote_fetcher.rb:309:in `request'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/gemcutter_utilities.rb:234:in `request_with_otp'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/gemcutter_utilities.rb:105:in `rubygems_api_request'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/commands/push_command.rb:89:in `send_push_request'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/commands/push_command.rb:81:in `send_gem'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/commands/push_command.rb:66:in `execute'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/command.rb:323:in `invoke_with_build_args'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/command_manager.rb:178:in `process_args'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/command_manager.rb:147:in `run'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/gem_runner.rb:53:in `run'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/bin/jgem:21:in `<main>'
	org/jruby/RubyKernel.java:1052:in `load'
	/Users/andy/.rvm/rubies/jruby-9.3.1.0/bin/gem:4:in `<main>'
Exception `Gem::SystemExitException' at /Users/andy/.rvm/rubies/jruby-9.3.1.0/lib/ruby/stdlib/rubygems/user_interaction.rb:365 - Exiting RubyGems with exit_code 1

Otherwise, I just joined the Matrix chat: https://matrix.to/#/#jruby:matrix.org

@AndyObtiva
Copy link
Author

OK, so the good news is that I tried pushing the gem with JRuby-9.3.1.0 on Windows 10 x64, and that worked!

The issue only seems to occur on Mac for me. I had it re-occur on a 3rd machine.

MacBook Pro (13-inch, Mid 2012)

% uname -a
Darwin Andys-MacBook-Pro.local 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
% jruby --version
jruby 9.3.1.0 (2.6.8) 2021-10-13 2e01e7199d Java HotSpot(TM) 64-Bit Server VM 16.0.2+7-67 on 16.0.2+7-67 +jit [darwin-x86_64]
% gem --version
3.2.29
 % rvm --version
rvm 1.29.12-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]

@AndyObtiva
Copy link
Author

AndyObtiva commented Nov 1, 2021

Gem pushing with JRuby-9.3.1.0 on Linux also works (I just performed successfully in Linux Mint Cinnamon). Given that it works on Windows too, that leaves only the Mac (x64) as a culprit.

@headius headius transferred this issue from jruby/jruby Dec 2, 2021
@headius
Copy link
Member

headius commented Dec 2, 2021

I transferred this to jruby-openssl since that seems to be where the error originates. This may still be a JRuby issue.

The best way for us to investigate this would be to reproduce with a local gem server. If it is possible to do this in an example repo, it would greatly speed our ability to fix this. As it stands I have not been able to reproduce in any environment, including my x86_64 MacOS environment. I'm a bit stuck here!

@AndyObtiva
Copy link
Author

OK.

I setup my own gem server with the gemstash gem following these instructions:
https://github.com/rubygems/gemstash/blob/master/docs/gemstash-private-gems.7.md

I was unable to push a gem to it, but for a reason that seems unrelated to this issue:

% gem push --key test_key --host http://localhost:9292/private pkg/glimmer-dsl-swt-4.21.3.0.gem
Pushing gem to http://localhost:9292/private...
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    too many connection resets (http://localhost:9292/private/api/v1/gems)

I got the same result in CRuby.

I would be happy to follow any exact instructions you could provide to push a gem locally.

@headius
Copy link
Member

headius commented Dec 7, 2021

I will try to set up a server locally over the holidays to reproduce, and will share my setup once I have that working.

@AndyObtiva
Copy link
Author

Good news! With JDK17, I do not encounter the issue that I had with JDK16:

...
Pushing gem to https://rubygems.org...
Successfully registered gem ...
% jruby -v
jruby 9.3.1.0 (2.6.8) 2021-10-13 2e01e7199d Java HotSpot(TM) 64-Bit Server VM 17.0.1+12-LTS-39 on 17.0.1+12-LTS-39 +jit [darwin-x86_64]

@AndyObtiva
Copy link
Author

Nevermind. I got the error again today with JDK17:

gem push ./pkg/glimmer-dsl-swt-4.22.1.0.gem
Pushing gem to https://rubygems.org...
ERROR:  While executing gem ... (IOError)
    Broken pipe

Maybe some piece of software on my system is getting old or out of date and then starts causing trouble with openssl afterwards. I am only guessing that given that when I installed JDK17, I was able to push a gem in JRuby 9.3.1.0, but now I can't anymore.

@AndyObtiva
Copy link
Author

AndyObtiva commented Jan 8, 2022

OK, I was able to push successfully again with JRuby 9.3.1.0 on JDK17, but in a brand new project with a fresh RVM gemset. The mystery continues I guess!

% gem push ./pkg/glimmer-cp-cylinder-0.1.0.gem
Pushing gem to https://rubygems.org...
Successfully registered gem: glimmer-cp-cylinder (0.1.0)

% jruby -v
jruby 9.3.1.0 (2.6.8) 2021-10-13 2e01e7199d Java HotSpot(TM) 64-Bit Server VM 17.0.1+12-LTS-39 on 17.0.1+12-LTS-39 +jit [darwin-x86_64]

@kares
Copy link
Member

kares commented Jan 11, 2022

Sounds like a local gems mess. It's still weird but pbly needs to be figured out locally, might relate to smt being loaded.
Maybe start with comparing the $LOADED_FEATURES set between gemsets right about when the RGs push happens.

@AndyObtiva
Copy link
Author

I started my glimmer-dsl-swt project RVM gemset fresh when I installed jruby-9.3.1.0 (though have upgraded some gems a few times since). In case one of its gems is causing the issue, here are the glimmer-dsl-swt RVM gemset installed gems:

% gem list

*** LOCAL GEMS ***

addressable (2.8.0)
array_include_methods (1.4.0)
awesome_print (1.9.2)
builder (3.2.4)
bundler (2.2.33, default: 2.2.29)
bundler-unload (1.0.2)
cmath (default: 1.0.0)
concurrent-ruby (1.1.9)
coveralls (0.8.23)
csv (default: 3.1.2)
descendants_tracker (0.0.4)
did_you_mean (1.3.0)
diff-lcs (1.4.4)
docile (1.4.0)
e2mmap (default: 0.1.0)
executable-hooks (1.6.1)
facets (3.1.0)
faraday (1.8.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
ffi (default: 1.15.4 java)
fileutils (default: 1.4.1)
forwardable (default: 1.2.0)
gem-wrappers (1.4.0)
git (1.9.1)
github_api (0.19.0)
glimmer (2.5.5, 2.5.4, 2.5.1, 2.5.0, 2.4.0)
hashie (3.6.0)
highline (2.0.3)
io-console (default: 0.5.9 java)
ipaddr (default: 1.2.2)
irb (default: 1.0.0)
jar-dependencies (default: 0.4.1)
jruby-jars (9.3.1.0)
jruby-launcher (1.1.19 java)
jruby-openssl (0.11.0 java, default: 0.10.7 java)
jruby-rack (1.1.21)
jruby-readline (default: 1.3.7 java)
jruby-win32ole (0.8.5)
json (2.6.1 java, default: 2.5.1 java)
juwelier (2.4.9)
jwt (2.3.0)
kamelcase (0.0.2)
little-plugger (1.1.4)
logger (default: 1.3.0)
matrix (default: 0.3.0)
method_source (1.0.0)
minitest (5.11.3)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
mutex_m (default: 0.1.0)
nested_inherited_jruby_include_package (0.3.0)
net-telnet (0.1.1)
nokogiri (1.12.5 java)
oauth2 (1.4.7)
os (1.1.4, 1.1.1)
ostruct (default: 0.1.0)
pastel (0.8.0)
power_assert (1.1.3)
prime (default: 0.1.0)
psych (default: 3.3.2 java)
public_suffix (4.0.6)
puts_debuggerer (0.13.1)
racc (1.6.0 java, default: 1.5.2 java)
rack (2.2.3)
rake (13.0.6, 12.3.3)
rake-ant (default: 1.0.4)
rake-tui (0.2.3)
rchardet (1.8.0)
rdoc (6.3.3, 6.3.2, default: 6.1.2.1)
rexml (default: 3.1.9.1)
rouge (3.26.1)
rspec (3.10.0)
rspec-core (3.10.1)
rspec-expectations (3.10.1)
rspec-mocks (3.10.2)
rspec-support (3.10.3, 3.10.2)
rss (default: 0.2.7)
ruby2_keywords (0.0.5)
rubygems-bundler (1.4.5)
rubygems-update (default: 3.2.29)
rubyzip (1.3.0)
rvm (1.11.3.9)
scanf (default: 1.0.0)
semver2 (3.4.2)
shell (default: 0.7)
simplecov (0.16.1)
simplecov-html (0.10.2)
simplecov-lcov (0.7.0)
super_module (1.4.1)
sync (default: 0.5.0)
term-ansicolor (1.7.1)
test-unit (3.2.9)
text-table (1.2.4)
thor (1.1.0)
thread_safe (0.3.6 java)
thwait (default: 0.1.0)
tins (1.29.1)
tracer (default: 0.1.0)
tty-color (0.6.0)
tty-cursor (0.7.1)
tty-prompt (0.23.1)
tty-reader (0.9.0)
tty-screen (0.8.1)
warbler (2.0.5)
webrick (default: 1.7.0)
wisper (2.0.1)
xmlrpc (0.3.0)

Here are the glimmer-cp-cylinder RVM gemset installed gems for one of my new projects that were able to gem push:

% gem list 

*** LOCAL GEMS ***

addressable (2.8.0)
array_include_methods (1.4.0)
awesome_print (1.9.2)
builder (3.2.4)
bundler (2.2.33, default: 2.2.29)
bundler-unload (1.0.2)
cmath (default: 1.0.0)
concurrent-ruby (1.1.9)
csv (default: 3.1.2)
descendants_tracker (0.0.4)
did_you_mean (1.3.0)
diff-lcs (1.5.0)
docile (1.4.0)
e2mmap (default: 0.1.0)
executable-hooks (1.6.1)
facets (3.1.0)
faraday (1.9.3)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
ffi (default: 1.15.4 java)
fileutils (default: 1.4.1)
forwardable (default: 1.2.0)
gem-wrappers (1.4.0)
git (1.10.2)
github_api (0.19.0)
glimmer (2.5.4)
glimmer-dsl-swt (4.22.1.1)
hashie (3.6.0)
highline (2.0.3)
io-console (default: 0.5.9 java)
ipaddr (default: 1.2.2)
irb (default: 1.0.0)
jar-dependencies (default: 0.4.1)
jruby-jars (9.3.2.0)
jruby-launcher (1.1.19 java)
jruby-openssl (0.11.0 java, default: 0.10.7 java)
jruby-rack (1.1.21)
jruby-readline (default: 1.3.7 java)
jruby-win32ole (0.8.5)
json (default: 2.5.1 java)
juwelier (2.4.9)
jwt (2.3.0)
kamelcase (0.0.2)
logger (default: 1.3.0)
matrix (default: 0.3.0)
method_source (1.0.0)
minitest (5.11.3)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
mutex_m (default: 0.1.0)
nested_inherited_jruby_include_package (0.3.0)
net-telnet (0.1.1)
nokogiri (1.13.0 java)
oauth2 (1.4.7)
os (1.1.4)
ostruct (default: 0.1.0)
pastel (0.8.0)
power_assert (1.1.3)
prime (default: 0.1.0)
psych (default: 3.3.2 java)
public_suffix (4.0.6)
puts_debuggerer (0.13.2)
racc (1.6.0 java, default: 1.5.2 java)
rack (2.2.3)
rake (13.0.6, 12.3.3)
rake-ant (default: 1.0.4)
rake-tui (0.2.3)
rchardet (1.8.0)
rdoc (6.3.3, default: 6.1.2.1)
rexml (default: 3.1.9.1)
rouge (3.27.0)
rspec (3.5.0)
rspec-core (3.5.4)
rspec-expectations (3.5.0)
rspec-mocks (3.5.0)
rspec-support (3.5.0)
rss (default: 0.2.7)
ruby2_keywords (0.0.5)
rubygems-bundler (1.4.5)
rubygems-update (default: 3.2.29)
rubyzip (1.3.0)
rvm (1.11.3.9)
scanf (default: 1.0.0)
semver2 (3.4.2)
shell (default: 0.7)
simplecov (0.21.2)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.3)
super_module (1.4.1)
sync (default: 0.5.0)
test-unit (3.2.9)
text-table (1.2.4)
thread_safe (0.3.6 java)
thwait (default: 0.1.0)
tracer (default: 0.1.0)
tty-color (0.6.0)
tty-cursor (0.7.1)
tty-prompt (0.23.1)
tty-reader (0.9.0)
tty-screen (0.8.1)
warbler (2.0.5)
webrick (default: 1.7.0)
wisper (2.0.1)
xmlrpc (0.3.0)

Here are gems that are in the first project (glimmer-dsl-swt that cannot gem push) but not the second:

coveralls (0.8.23)
diff-lcs (1.4.4)
faraday (1.8.0)
git (1.9.1)
jruby-jars (9.3.1.0)
json (2.6.1 java, default: 2.5.1 java)
little-plugger (1.1.4)
nokogiri (1.12.5 java)
os (1.1.4, 1.1.1)
puts_debuggerer (0.13.1)
rdoc (6.3.3, 6.3.2, default: 6.1.2.1)
rouge (3.26.1)
rspec (3.10.0)
rspec-core (3.10.1)
rspec-expectations (3.10.1)
rspec-mocks (3.10.2)
rspec-support (3.10.3, 3.10.2)
simplecov (0.16.1)
simplecov-html (0.10.2)
simplecov-lcov (0.7.0)
term-ansicolor (1.7.1)
thor (1.1.0)
tins (1.29.1)

Here are gems that are in the second working project (glimmer-cp-cylinder) but not the first:

diff-lcs (1.5.0)
faraday (1.9.3)
faraday-multipart (1.0.2)
faraday-retry (1.0.3)
git (1.10.2)
glimmer (2.5.4)
glimmer-dsl-swt (4.22.1.1)
jruby-jars (9.3.2.0)
json (default: 2.5.1 java)
nokogiri (1.13.0 java)
os (1.1.4)
puts_debuggerer (0.13.2)
rdoc (6.3.3, default: 6.1.2.1)
rouge (3.27.0)
rspec (3.5.0)
rspec-core (3.5.4)
rspec-expectations (3.5.0)
rspec-mocks (3.5.0)
rspec-support (3.5.0)
simplecov (0.21.2)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.3)

@AndyObtiva
Copy link
Author

AndyObtiva commented Jan 14, 2022

No dice again! I just created a brand new JRuby project and was not able to push a gem for it with JRuby:

gem push ./pkg/glimmer_metronome-1.0.0.gem
Pushing gem to https://rubygems.org...
ERROR:  While executing gem ... (IOError)
    Connection reset

That renders my theory completely false. Even brand new projects might have issues with gem pushing I suppose.

That said, the gems that were pushed successfully before (e.g. glimmer-cp-cube and glimmer-cp-cylinder) were custom component gems whereas this one is an application. There is a difference in the gems as a result, but I doubt that it is the cause.

In any case, here are the gems I am using in glimmer_metronome:

abbrev (default: 0.1.0)
base64 (default: 0.1.1)
benchmark (default: 0.2.0)
bigdecimal (default: 3.1.1)
bundler (default: 2.3.3)
bundler-unload (1.0.2)
cgi (default: 0.3.1)
csv (default: 3.2.2)
date (default: 3.2.2)
debug (1.4.0)
delegate (default: 0.2.0)
did_you_mean (default: 1.6.1)
digest (default: 3.1.0)
drb (default: 2.1.0)
english (default: 0.7.1)
erb (default: 2.2.3)
error_highlight (default: 0.3.0)
etc (default: 1.3.0)
executable-hooks (1.6.1)
fcntl (default: 1.0.1)
fiddle (default: 1.1.0)
fileutils (default: 1.6.0)
find (default: 0.1.1)
forwardable (default: 1.3.2)
gem-wrappers (1.4.0)
getoptlong (default: 0.1.1)
io-console (default: 0.5.10)
io-nonblock (default: 0.1.0)
io-wait (default: 0.2.1)
ipaddr (default: 1.2.3)
irb (default: 1.4.1)
json (default: 2.6.1)
logger (default: 1.5.0)
matrix (0.4.2)
minitest (5.15.0)
mutex_m (default: 0.1.1)
net-ftp (0.1.3)
net-http (default: 0.2.0)
net-imap (0.2.2)
net-pop (0.1.1)
net-protocol (default: 0.1.2)
net-smtp (0.3.1)
nkf (default: 0.1.1)
observer (default: 0.1.1)
open-uri (default: 0.2.0)
open3 (default: 0.1.1)
openssl (default: 3.0.0)
optparse (default: 0.2.0)
ostruct (default: 0.5.2)
pathname (default: 0.2.0)
power_assert (2.0.1)
pp (default: 0.3.0)
prettyprint (default: 0.1.1)
prime (0.1.2)
pstore (default: 0.1.1)
psych (default: 4.0.3)
racc (default: 1.6.0)
rake (13.0.6)
rbs (2.0.0)
rdoc (default: 6.4.0)
readline (default: 0.0.3)
readline-ext (default: 0.1.4)
reline (default: 0.3.0)
resolv (default: 0.2.1)
resolv-replace (default: 0.1.0)
rexml (3.2.5)
rinda (default: 0.1.1)
rss (0.2.9)
ruby2_keywords (default: 0.0.5)
rubygems-bundler (1.4.5)
rvm (1.11.3.9)
securerandom (default: 0.1.1)
set (default: 1.0.2)
shellwords (default: 0.1.0)
singleton (default: 0.1.1)
stringio (default: 3.0.1)
strscan (default: 3.0.1)
syslog (default: 0.1.0)
tempfile (default: 0.1.2)
test-unit (3.5.3)
time (default: 0.2.0)
timeout (default: 0.2.0)
tmpdir (default: 0.1.2)
tsort (default: 0.1.0)
typeprof (0.21.1)
un (default: 0.2.0)
uri (default: 0.11.0)
weakref (default: 0.1.1)
yaml (default: 0.2.0)
zlib (default: 2.1.1)

@AndyObtiva
Copy link
Author

AndyObtiva commented Jan 15, 2022

I don't get it. It worked again! And, with the app that failed last time (Glimmer Metronome).

gem push ./pkg/glimmer_metronome-1.1.0.gem
Pushing gem to https://rubygems.org...
Successfully registered gem: glimmer_metronome (1.1.0)

This is definitely a transient issue (with JDK17 at least, but with JDK16 I never got it to work though that doesn't matter to me at this point).

@headius
Copy link
Member

headius commented Jan 18, 2022

This is frustratingly difficult to get a bead on. I have never been able to reproduce it myself.

@AndyObtiva If you still have configurations where you can reproduce easily, try adding this env (to a debug/verbose/backtrace gem install) to get more information: JRUBY_OPTS=-Xbacktrace.style=full

The trace we did get from you above helps, but the additional backtrace style flag will let us see the entire JVM call stack and the exact line where the error happens.

@AndyObtiva
Copy link
Author

AndyObtiva commented Jan 21, 2022

There you go:

% JRUBY_OPTS=-Xbacktrace.style=full gem push --verbose --backtrace --debug pkg/glimmer-dsl-swt-4.22.2.1.gem
NOTE:  Debugging mode prints all exceptions even when rescued
Pushing gem to https://rubygems.org...
POST https://rubygems.org/api/v1/gems
Exception `IOError' at java/lang/Thread.java:1610 - Broken pipe
Exception `IOError' at java/lang/Thread.java:1610 - Broken pipe
Exception `IOError' at java/lang/Thread.java:1610 - Broken pipe
ERROR:  While executing gem ... (IOError)
    Broken pipe
	java/lang/Thread.java:1610:in `getStackTrace'
	org/jruby/runtime/backtrace/TraceType.java:247:in `getBacktraceData'
	org/jruby/runtime/backtrace/TraceType.java:53:in `getBacktrace'
	org/jruby/RubyException.java:402:in `captureBacktrace'
	org/jruby/exceptions/RaiseException.java:208:in `preRaise'
	org/jruby/exceptions/RaiseException.java:65:in `<init>'
	org/jruby/exceptions/Exception.java:39:in `<init>'
	org/jruby/exceptions/StandardError.java:38:in `<init>'
	org/jruby/exceptions/IOError.java:38:in `<init>'
	org/jruby/RubyIOError.java:51:in `constructThrowable'
	org/jruby/RubyException.java:364:in `toThrowable'
	org/jruby/exceptions/RaiseException.java:84:in `from'
	org/jruby/Ruby.java:4296:in `newRaiseException'
	org/jruby/Ruby.java:4206:in `newIOError'
	org/jruby/ext/openssl/SSLSocket.java:915:in `syswriteImpl'
	org/jruby/ext/openssl/SSLSocket.java:941:in `syswrite_nonblock'
	org/jruby/ext/openssl/SSLSocket$INVOKER$i$syswrite_nonblock.gen:-1:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:204:in `call'
	Users/andymaleh/$_dot_rvm/rubies/jruby_minus_9_dot_3_dot_3_dot_0/lib/ruby/gems/shared/gems/jruby_minus_openssl_minus_0_dot_11_dot_0_minus_java/lib/jopenssl23/openssl//Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/gems/shared/gems/jruby-openssl-0.11.0-java/lib/jopenssl23/openssl/buffering.rb:383:in `invokeOther1:syswrite_nonblock'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/gems/shared/gems/jruby-openssl-0.11.0-java/lib/jopenssl23/openssl/buffering.rb:383:in `write_nonblock'
	org/jruby/internal/runtime/methods/CompiledIRMethod.java:139:in `call'
	org/jruby/internal/runtime/methods/CompiledIRMethod.java:175:in `call'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:222:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:214:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:204:in `call'
	org/jruby/ir/interpreter/InterpreterEngine.java:325:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/Interpreter.java:116:in `INTERPRET_BLOCK'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/net/protocol.rb:296:in `block in write0'
	org/jruby/runtime/MixedModeIRBlockBody.java:136:in `commonYieldPath'
	org/jruby/runtime/IRBlockBody.java:66:in `call'
	org/jruby/runtime/IRBlockBody.java:48:in `call'
	org/jruby/runtime/Block.java:169:in `call'
	org/jruby/RubyEnumerable.java:1103:in `call'
	org/jruby/runtime/CallBlock.java:97:in `doYield'
	org/jruby/runtime/BlockBody.java:108:in `yield'
	org/jruby/runtime/Block.java:188:in `yield'
	org/jruby/RubyArray.java:1865:in `each'
	org/jruby/RubyArray$INVOKER$i$0$0$each.gen:-1:in `call'
	org/jruby/internal/runtime/methods/JavaMethod.java:560:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:85:in `call'
	org/jruby/RubyEnumerable.java:105:in `callEach'
	org/jruby/RubyEnumerable.java:1120:in `each_with_indexCommon'
	org/jruby/RubyEnumerable.java:1143:in `each_with_index'
	org/jruby/RubyEnumerable$INVOKER$s$0$0$each_with_index.gen:-1:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:85:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:94:in `callIter'
	org/jruby/ir/instructions/CallBase.java:546:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:361:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:128:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/net/protocol.rb:275:in `write0'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:115:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:85:in `call'
	org/jruby/ir/instructions/CallBase.java:549:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:361:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/Interpreter.java:116:in `INTERPRET_BLOCK'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/net/protocol.rb:248:in `block in write'
	org/jruby/runtime/MixedModeIRBlockBody.java:136:in `commonYieldPath'
	org/jruby/runtime/IRBlockBody.java:76:in `yieldSpecific'
	org/jruby/runtime/Block.java:157:in `yieldSpecific'
	org/jruby/ir/runtime/IRRuntimeHelpers.java:498:in `yieldSpecific'
	org/jruby/ir/instructions/YieldInstr.java:76:in `interpret'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:176:in `processOtherOp'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:104:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:128:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/net/protocol.rb:265:in `writing'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:115:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:85:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:94:in `callIter'
	org/jruby/ir/instructions/CallBase.java:546:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:361:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:86:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:201:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/net/protocol.rb:247:in `write'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:188:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:206:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:372:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:175:in `call'
	org/jruby/ir/interpreter/InterpreterEngine.java:316:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:128:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/net/http/generic_request.rb:189:in `send_request_with_body'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:115:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:329:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:87:in `call'
	org/jruby/ir/instructions/CallBase.java:549:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:361:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:128:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/net/http/generic_request.rb:123:in `exec'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:115:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:329:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:87:in `call'
	org/jruby/ir/instructions/CallBase.java:549:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:361:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/Interpreter.java:116:in `INTERPRET_BLOCK'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/net/http.rb:1518:in `block in transport_request'
	org/jruby/runtime/MixedModeIRBlockBody.java:136:in `commonYieldPath'
	org/jruby/runtime/IRBlockBody.java:170:in `doYield'
	org/jruby/runtime/BlockBody.java:108:in `yield'
	org/jruby/runtime/Block.java:188:in `yield'
	org/jruby/exceptions/CatchThrow.java:32:in `enter'
	org/jruby/RubyKernel.java:1237:in `rbCatch'
	org/jruby/RubyKernel$INVOKER$s$rbCatch.gen:-1:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:383:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:185:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:192:in `callIter'
	org/jruby/ir/interpreter/InterpreterEngine.java:337:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:86:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:201:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/net/http.rb:1517:in `transport_request'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:188:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:383:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:185:in `call'
	org/jruby/ir/interpreter/InterpreterEngine.java:338:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:86:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:201:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/net/http.rb:1490:in `request'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:188:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:206:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:372:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:175:in `call'
	org/jruby/ir/interpreter/InterpreterEngine.java:316:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:86:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:201:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/rubygems/request.rb:220:in `perform_request'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:188:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:206:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:372:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:175:in `call'
	org/jruby/ir/interpreter/InterpreterEngine.java:316:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:128:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/rubygems/request.rb:152:in `fetch'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:115:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:329:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:87:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:94:in `callIter'
	org/jruby/ir/instructions/CallBase.java:546:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:361:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:128:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/rubygems/remote_fetcher.rb:309:in `request'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:115:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:329:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:87:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:94:in `callIter'
	org/jruby/ir/instructions/CallBase.java:546:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:361:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:128:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/rubygems/gemcutter_utilities.rb:234:in `request_with_otp'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:115:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:329:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:87:in `call'
	org/jruby/ir/instructions/CallBase.java:549:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:361:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:128:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/rubygems/gemcutter_utilities.rb:105:in `rubygems_api_request'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:115:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:329:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:87:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:94:in `callIter'
	org/jruby/ir/instructions/CallBase.java:546:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:361:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:92:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:238:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/rubygems/commands/push_command.rb:89:in `send_push_request'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:225:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:214:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:393:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:206:in `call'
	org/jruby/ir/interpreter/InterpreterEngine.java:325:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:86:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:201:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/rubygems/commands/push_command.rb:81:in `send_gem'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:188:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:206:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:372:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:175:in `call'
	org/jruby/ir/interpreter/InterpreterEngine.java:316:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:80:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:164:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/rubygems/commands/push_command.rb:66:in `execute'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:151:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:198:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:351:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:144:in `call'
	org/jruby/ir/interpreter/InterpreterEngine.java:345:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:92:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:238:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/rubygems/command.rb:323:in `invoke_with_build_args'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:225:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:214:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:393:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:206:in `call'
	org/jruby/ir/interpreter/InterpreterEngine.java:325:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:92:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:238:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/rubygems/command_manager.rb:178:in `process_args'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:225:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:214:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:393:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:206:in `call'
	org/jruby/ir/interpreter/InterpreterEngine.java:325:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:92:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:238:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/rubygems/command_manager.rb:147:in `run'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:225:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:214:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:393:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:206:in `call'
	org/jruby/ir/interpreter/InterpreterEngine.java:325:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/InterpreterEngine.java:86:in `interpret'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:201:in `INTERPRET_METHOD'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/lib/ruby/stdlib/rubygems/gem_runner.rb:53:in `run'
	org/jruby/internal/runtime/methods/MixedModeIRMethod.java:188:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:206:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:372:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:175:in `call'
	org/jruby/ir/interpreter/InterpreterEngine.java:316:in `processCall'
	org/jruby/ir/interpreter/StartupInterpreterEngine.java:72:in `interpret'
	org/jruby/ir/interpreter/Interpreter.java:96:in `INTERPRET_ROOT'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/bin/jgem:21:in `<main>'
	org/jruby/ir/interpreter/Interpreter.java:81:in `execute'
	org/jruby/ir/interpreter/Interpreter.java:30:in `execute'
	org/jruby/ir/IRTranslator.java:42:in `execute'
	org/jruby/Ruby.java:1270:in `runInterpreter'
	org/jruby/Ruby.java:2865:in `loadFile'
	org/jruby/runtime/load/LibrarySearcher.java:937:in `load'
	org/jruby/runtime/load/LibrarySearcher.java:895:in `load'
	org/jruby/runtime/load/LoadService.java:322:in `load'
	org/jruby/RubyKernel.java:1082:in `loadCommon'
	org/jruby/RubyKernel.java:1052:in `load'
	org/jruby/RubyKernel$INVOKER$s$load.gen:-1:in `call'
	org/jruby/internal/runtime/methods/JavaMethod.java:422:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:372:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:175:in `call'
	Users/andymaleh/$_dot_rvm/rubies/jruby_minus_9_dot_3_dot_3_dot_0/bin//Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/bin/gem:4:in `invokeOther2:load'
	/Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/bin/gem:4:in `<main>'
	Users/andymaleh/$_dot_rvm/rubies/jruby_minus_9_dot_3_dot_3_dot_0/bin//Users/andymaleh/.rvm/rubies/jruby-9.3.3.0/bin/gem:-1:in `run'
	java/lang/invoke/MethodHandle.java:732:in `invokeWithArguments'
	org/jruby/ir/Compiler.java:114:in `load'
	org/jruby/Ruby.java:1257:in `runScript'
	org/jruby/Ruby.java:1176:in `runNormally'
	org/jruby/Ruby.java:1158:in `runNormally'
	org/jruby/Ruby.java:1194:in `runNormally'
	org/jruby/Ruby.java:977:in `runFromMain'
	org/jruby/Main.java:406:in `doRunFromMain'
	org/jruby/Main.java:290:in `internalRun'
	org/jruby/Main.java:235:in `run'
	org/jruby/Main.java:207:in `main'
Exception `Gem::SystemExitException' at java/lang/Thread.java:1610 - Exiting RubyGems with exit_code 1

@kares
Copy link
Member

kares commented Mar 8, 2022

this issue is likely environment specific - don't think there's much we can do here except keeping it open.

also added some debugging statements acddd54 + made sure the underlying Java exception isn't lost as it might be of value here. one last thing you could try is see the SSL engine debug output JRUBY_OPTS=-J-Djavax.net.debug=all
(will likely print the "Broken pipe" exception if it happens during the initial hand-shake).

@AndyObtiva
Copy link
Author

AndyObtiva commented Mar 12, 2022

Please, do not forget that michaelklishin also reported this issue and linked to it in: ruby-amqp/march_hare#156

So, it is not necessarily a non-reproducable issue since someone else encountered it.

In any case, interestingly enough, I got a different error with a new Glimmer DSL for SWT desktop project I built recently of the game Wordle, when I tried to gem push.

gem push ./pkg/glimmer_wordle-1.1.2.gem
Pushing gem to https://rubygems.org...
ERROR:  While executing gem ... (IOError)
    Connection reset
rake aborted!

When I added the option you asked me for, I got a very long log (too big to post here or attach), but strangely enough, gem push worked! As mentioned before, it seems like the error is transient.

The odd thing is my Internet, which is about 60mbps, is very reliable and solid. And, the MacBook Pro 13" (2012) laptop, although old, was recently rebuilt from scratch, so it is very clean software-wise, let alone JRuby 9.3.3.0 was installed recently from RVM. Last but not least, I do not get these errors in CRuby, so something is definitely up with JRuby.

@AndyObtiva
Copy link
Author

AndyObtiva commented Mar 19, 2022

Again, when I ran gem push without your suggested option, it did not work and gave me a 'Connection reset' (even with multiple tries), but when I added the jruby option you suggested, it worked, which seems to indicate that logging might be affecting the functionality (perhaps slowing it down to have the right sequence if it involved network asynchronous calls):

JRUBY_OPTS=-J-Djavax.net.debug=all gem push pkg/glimmer_wordle-1.1.3.gem
...
javax.net.ssl|DEBUG|10|main|2022-03-19 12:07:14.834 EDT|SSLEngineInputRecord.java:213|READ: TLSv1.2 application_data, length = 101
javax.net.ssl|DEBUG|10|main|2022-03-19 12:07:14.835 EDT|SSLCipher.java:1675|Plaintext after DECRYPTION (
  0000: 1F 8B 08 00 B2 FF 35 62   00 03 0A 2E 4D 4E 4E 2D  ......5b....MNN-
  0010: 2E 4E 2B CD C9 A9 54 28   4A 4D CF 2C 2E 49 2D 4A  .N+...T(JM.,.I-J
  0020: 4D 51 48 4F CD B5 52 48   CF C9 CC CD 4D 2D 8A 2F  MQHO..RH....M-./
  0030: CF 2F 4A C9 49 55 D0 30   D4 33 D4 33 D6 04 00 00  ./J.IU.0.3.3....
  0040: 00 FF FF 03 00 65 41 49   6E 33 00 00 00           .....eAIn3...
)
javax.net.ssl|DEBUG|10|main|2022-03-19 12:07:14.836 EDT|SSLEngineInputRecord.java:176|Raw read (
  0000: 17 03 03 00 1A 04 88 B3   95 F8 EB 50 43 E1 EE 2A  ...........PC..*
  0010: D7 58 CF 0D DC 15 1C 12   33 8B 76 96 45 E3 43 17  .X......3.v.E.C.
  0020: 03 03 00 1D 04 88 B3 95   F8 EB 50 44 CD 48 65 00  ..........PD.He.
  0030: 85 D1 14 A1 AB 42 BF 34   3D 04 71 73 56 F8 AF AC  .....B.4=.qsV...
  0040: 41                                                 A
)
javax.net.ssl|DEBUG|10|main|2022-03-19 12:07:14.836 EDT|SSLEngineInputRecord.java:213|READ: TLSv1.2 application_data, length = 26
javax.net.ssl|DEBUG|10|main|2022-03-19 12:07:14.836 EDT|SSLCipher.java:1675|Plaintext after DECRYPTION (
  0000: 0D 0A                                              ..
)
javax.net.ssl|DEBUG|10|main|2022-03-19 12:07:14.837 EDT|SSLEngineInputRecord.java:176|Raw read (
  0000: 17 03 03 00 1D 04 88 B3   95 F8 EB 50 44 CD 48 65  ...........PD.He
  0010: 00 85 D1 14 A1 AB 42 BF   34 3D 04 71 73 56 F8 AF  ......B.4=.qsV..
  0020: AC 41                                              .A
)
javax.net.ssl|DEBUG|10|main|2022-03-19 12:07:14.837 EDT|SSLEngineInputRecord.java:213|READ: TLSv1.2 application_data, length = 29
javax.net.ssl|DEBUG|10|main|2022-03-19 12:07:14.837 EDT|SSLCipher.java:1675|Plaintext after DECRYPTION (
  0000: 30 0D 0A 0D 0A                                     0....
)
Successfully registered gem: glimmer_wordle (1.1.3)

@AndyObtiva
Copy link
Author

Fascinating!

I just released Glimmer DSL for SWT 4.23.0.0

I installed JDK18 and uninstalled/reinstalled JRuby 9.3.3.0 on top of JDK18.

Afterwards, when I ran gem push, I got the usual Broken Pipe message!

However, when I added the latest option you suggested @kares (JRUBY_OPTS=-J-Djavax.net.debug=all), gem push worked!

That logging definitely seems to be resequencing things in a way where the problem is solved! It is kind of disappointing for troubleshooting though.

@jsvd
Copy link

jsvd commented Jun 3, 2022

Bit more detail, of all the possible values of -J-Djavax.net.debug=, it's plaintext that makes it work, other values give you "Broken Pipe":

JRUBY_OPTS="-J-Djavax.net.debug=plaintext" jgem push file.gem

which points at some issue around buffering of data. I can replicate consistently in my mac (both natively w/ aarch64 zulu jdk11 and emulated w/ rosetta and x64 temurin jdk 11).

@kares
Copy link
Member

kares commented Jul 3, 2022

there's some progress on the issue, namely 2 things in latest release (0.14.0) :

  • JRUBY_OPTS="-J-Djruby.openssl.debug=true" will now include the stack-trace for the Broken pipe/Connection reset
  • there's a 0.14.1.cr2 pre-release that attempts to fix the issue ... but the fix might be wrong

if anyone could test these out (it's the last few days that I have a laptop usable for work),
just in case it's good we could push a 0.14.1 otherwise it's likely to be yank-ed.

@AndyObtiva
Copy link
Author

OK, I just saw this. I’ll take a look (test) tomorrow and get back to you.

@AndyObtiva
Copy link
Author

No dice (when executing gem push without debugging)!

gem push ./pkg/glimmer-dsl-swt-4.24.0.1.gem
Pushing gem to https://rubygems.org...
ERROR:  While executing gem ... (IOError)
    Broken pipe

If I add the debugging JRUBY_OPTS you mentioned, I get the following:

% JRUBY_OPTS="-J-Djruby.openssl.debug=true" gem push pkg/glimmer-dsl-swt-4.24.0.1.gem 
Pushing gem to https://rubygems.org...
SSLSocket.syswriteImpl java.io.IOException: Broken pipe
	at java.base/sun.nio.ch.FileDispatcherImpl.write0(Native Method)
	at java.base/sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:62)
	at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:137)
	at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:102)
	at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:58)
	at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:532)
	at org.jruby.ext.openssl.SSLSocket$JavaSocketChannel.write(SSLSocket.java:1294)
	at org.jruby.ext.openssl.SSLSocket.writeToChannel(SSLSocket.java:652)
	at org.jruby.ext.openssl.SSLSocket.flushData(SSLSocket.java:640)
	at org.jruby.ext.openssl.SSLSocket.write(SSLSocket.java:695)
	at org.jruby.ext.openssl.SSLSocket.syswriteImpl(SSLSocket.java:955)
	at org.jruby.ext.openssl.SSLSocket.syswrite_nonblock(SSLSocket.java:990)
	at org.jruby.ext.openssl.SSLSocket$INVOKER$i$syswrite_nonblock.call(SSLSocket$INVOKER$i$syswrite_nonblock.gen)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:204)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:204)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
	at org.jruby.dist/org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
	at org.jruby.dist/org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:66)
	at org.jruby.dist/org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:48)
	at org.jruby.dist/org.jruby.runtime.Block.call(Block.java:169)
	at org.jruby.dist/org.jruby.RubyEnumerable$EachWithIndex.call(RubyEnumerable.java:1103)
	at org.jruby.dist/org.jruby.runtime.CallBlock.doYield(CallBlock.java:97)
	at org.jruby.dist/org.jruby.runtime.BlockBody.yield(BlockBody.java:108)
	at org.jruby.dist/org.jruby.runtime.Block.yield(Block.java:188)
	at org.jruby.dist/org.jruby.RubyArray.each(RubyArray.java:1865)
	at org.jruby.dist/org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen)
	at org.jruby.dist/org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:560)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
	at org.jruby.dist/org.jruby.RubyEnumerable.callEach(RubyEnumerable.java:105)
	at org.jruby.dist/org.jruby.RubyEnumerable.each_with_indexCommon(RubyEnumerable.java:1120)
	at org.jruby.dist/org.jruby.RubyEnumerable.each_with_index(RubyEnumerable.java:1143)
	at org.jruby.dist/org.jruby.RubyEnumerable$INVOKER$s$0$0$each_with_index.call(RubyEnumerable$INVOKER$s$0$0$each_with_index.gen)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
	at org.jruby.dist/org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
	at org.jruby.dist/org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:76)
	at org.jruby.dist/org.jruby.runtime.Block.yieldSpecific(Block.java:157)
	at org.jruby.dist/org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:498)
	at org.jruby.dist/org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:76)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:176)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
	at org.jruby.dist/org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
	at org.jruby.dist/org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:170)
	at org.jruby.dist/org.jruby.runtime.BlockBody.yield(BlockBody.java:108)
	at org.jruby.dist/org.jruby.runtime.Block.yield(Block.java:188)
	at org.jruby.dist/org.jruby.exceptions.CatchThrow.enter(CatchThrow.java:32)
	at org.jruby.dist/org.jruby.RubyKernel.rbCatch(RubyKernel.java:1237)
	at org.jruby.dist/org.jruby.RubyKernel$INVOKER$s$rbCatch.call(RubyKernel$INVOKER$s$rbCatch.gen)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:383)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:185)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:192)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:337)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:383)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:185)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:338)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.dist/org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.dist/org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.dist/org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.dist/org.jruby.Ruby.runInterpreter(Ruby.java:1270)
	at org.jruby.dist/org.jruby.Ruby.loadFile(Ruby.java:2865)
	at org.jruby.dist/org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:937)
	at org.jruby.dist/org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:895)
	at org.jruby.dist/org.jruby.runtime.load.LoadService.load(LoadService.java:323)
	at org.jruby.dist/org.jruby.RubyKernel.loadCommon(RubyKernel.java:1082)
	at org.jruby.dist/org.jruby.RubyKernel.load(RubyKernel.java:1052)
	at org.jruby.dist/org.jruby.RubyKernel$INVOKER$s$load.call(RubyKernel$INVOKER$s$load.gen)
	at org.jruby.dist/org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:422)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
	at Users.andymaleh.$_dot_rvm.rubies.jruby_minus_9_dot_3_dot_4_dot_0.bin.gem.invokeOther2:load(/Users/andymaleh/.rvm/rubies/jruby-9.3.4.0/bin/gem:4)
	at Users.andymaleh.$_dot_rvm.rubies.jruby_minus_9_dot_3_dot_4_dot_0.bin.gem.RUBY$script(/Users/andymaleh/.rvm/rubies/jruby-9.3.4.0/bin/gem:4)
	at Users.andymaleh.$_dot_rvm.rubies.jruby_minus_9_dot_3_dot_4_dot_0.bin.gem.run(/Users/andymaleh/.rvm/rubies/jruby-9.3.4.0/bin/gem)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:731)
	at org.jruby.dist/org.jruby.ir.Compiler$1.load(Compiler.java:114)
	at org.jruby.dist/org.jruby.Ruby.runScript(Ruby.java:1257)
	at org.jruby.dist/org.jruby.Ruby.runNormally(Ruby.java:1176)
	at org.jruby.dist/org.jruby.Ruby.runNormally(Ruby.java:1158)
	at org.jruby.dist/org.jruby.Ruby.runNormally(Ruby.java:1194)
	at org.jruby.dist/org.jruby.Ruby.runFromMain(Ruby.java:977)
	at org.jruby.dist/org.jruby.Main.doRunFromMain(Main.java:406)
	at org.jruby.dist/org.jruby.Main.internalRun(Main.java:290)
	at org.jruby.dist/org.jruby.Main.run(Main.java:235)
	at org.jruby.dist/org.jruby.Main.main(Main.java:207)
SSLSocket.close doShutdown failed java.io.IOException: Broken pipe
ERROR:  While executing gem ... (IOError)
    Broken pipe

In any case, I hope the output above has helpful information for you.

Below is my system info again (same Intel Mac as before).

% jruby -v
jruby 9.3.4.0 (2.6.8) 2022-03-23 eff48c1ebf Java HotSpot(TM) 64-Bit Server VM 18+36-2087 on 18+36-2087 +jit [x86_64-darwin]
% uname -a
Darwin Andys-MacBook-Pro-13.local 19.6.0 Darwin Kernel Version 19.6.0: Mon Apr 18 21:50:40 PDT 2022; root:xnu-6153.141.62~1/RELEASE_X86_64 x86_64

Cheers!

@kares
Copy link
Member

kares commented Jul 4, 2022

Interesting, we had a Connection reset before but have a Broken pipe from the write itself...
Wonder if any exception happens before, would be interesting to see the full details from :
JRUBY_OPTS="-J-Djruby.openssl.debug=true -J-Djavax.net.debug=ssl:handshake" gem push ...
(assuming it reproduces the issue)

@AndyObtiva
Copy link
Author

% JRUBY_OPTS="-J-Djruby.openssl.debug=true -J-Djavax.net.debug=ssl:handshake" gem push pkg/glimmer-dsl-swt-4.24.0.1.gem  
Pushing gem to https://rubygems.org...
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.454 EDT|SSLCipher.java:466|jdk.tls.keyLimits:  entry = AES/GCM/NoPadding KeyUpdate 2^37. AES/GCM/NOPADDING:KEYUPDATE = 137438953472
javax.net.ssl|INFO|10|main|2022-07-05 17:26:27.578 EDT|AlpnExtension.java:182|No available application protocols
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.578 EDT|SSLExtensions.java:272|Ignore, context unavailable extension: application_layer_protocol_negotiation
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.579 EDT|SessionTicketExtension.java:408|Stateless resumption supported
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.582 EDT|SSLExtensions.java:272|Ignore, context unavailable extension: cookie
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.616 EDT|PreSharedKeyExtension.java:661|No session to resume.
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.616 EDT|SSLExtensions.java:272|Ignore, context unavailable extension: pre_shared_key
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.625 EDT|ClientHello.java:641|Produced ClientHello handshake message (
"ClientHello": {
  "client version"      : "TLSv1.2",
  "random"              : "054015A2D1EA875056C20A68BF963FC251BF558A2E489A9C82C7DAF58A047A6E",
  "session id"          : "C54174DC57983C18C2DEFB3CDE3157E3C7A18BD7509C8C20EA87582F2F0A6B6F",
  "cipher suites"       : "[TLS_AES_256_GCM_SHA384(0x1302), TLS_AES_128_GCM_SHA256(0x1301), TLS_CHACHA20_POLY1305_SHA256(0x1303), TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384(0xC02C), TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256(0xC02B), TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384(0xC030), TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256(0xC02F), TLS_DHE_RSA_WITH_AES_256_GCM_SHA384(0x009F), TLS_DHE_DSS_WITH_AES_256_GCM_SHA384(0x00A3), TLS_DHE_RSA_WITH_AES_128_GCM_SHA256(0x009E), TLS_DHE_DSS_WITH_AES_128_GCM_SHA256(0x00A2), TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384(0xC024), TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384(0xC028), TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256(0xC023), TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256(0xC027), TLS_DHE_RSA_WITH_AES_256_CBC_SHA256(0x006B), TLS_DHE_DSS_WITH_AES_256_CBC_SHA256(0x006A), TLS_DHE_RSA_WITH_AES_128_CBC_SHA256(0x0067), TLS_DHE_DSS_WITH_AES_128_CBC_SHA256(0x0040), TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384(0xC02E), TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384(0xC032), TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256(0xC02D), TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256(0xC031), TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384(0xC026), TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384(0xC02A), TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256(0xC025), TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256(0xC029), TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA(0xC00A), TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA(0xC014), TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA(0xC009), TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA(0xC013), TLS_DHE_RSA_WITH_AES_256_CBC_SHA(0x0039), TLS_DHE_DSS_WITH_AES_256_CBC_SHA(0x0038), TLS_DHE_RSA_WITH_AES_128_CBC_SHA(0x0033), TLS_DHE_DSS_WITH_AES_128_CBC_SHA(0x0032), TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA(0xC005), TLS_ECDH_RSA_WITH_AES_256_CBC_SHA(0xC00F), TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA(0xC004), TLS_ECDH_RSA_WITH_AES_128_CBC_SHA(0xC00E), TLS_RSA_WITH_AES_256_GCM_SHA384(0x009D), TLS_RSA_WITH_AES_128_GCM_SHA256(0x009C), TLS_RSA_WITH_AES_256_CBC_SHA256(0x003D), TLS_RSA_WITH_AES_128_CBC_SHA256(0x003C), TLS_RSA_WITH_AES_256_CBC_SHA(0x0035), TLS_RSA_WITH_AES_128_CBC_SHA(0x002F)]",
  "compression methods" : "00",
  "extensions"          : [
    "server_name (0)": {
      type=host_name (0), value=rubygems.org
    },
    "status_request (5)": {
      "certificate status type": ocsp
      "OCSP status request": {
        "responder_id": <empty>
        "request extensions": {
          <empty>
        }
      }
    },
    "supported_groups (10)": {
      "versions": [x25519, secp256r1, secp384r1, secp521r1, x448, ffdhe2048, ffdhe3072, ffdhe4096, ffdhe6144, ffdhe8192]
    },
    "ec_point_formats (11)": {
      "formats": [uncompressed]
    },
    "status_request_v2 (17)": {
      "cert status request": {
        "certificate status type": ocsp_multi
        "OCSP status request": {
          "responder_id": <empty>
          "request extensions": {
            <empty>
          }
        }
      }
    },
    "extended_master_secret (23)": {
      <empty>
    },
    "session_ticket (35)": {
      <empty>
    },
    "signature_algorithms (13)": {
      "signature schemes": [ecdsa_secp256r1_sha256, ecdsa_secp384r1_sha384, ecdsa_secp521r1_sha512, ed25519, ed448, rsa_pss_rsae_sha256, rsa_pss_rsae_sha384, rsa_pss_rsae_sha512, rsa_pss_pss_sha256, rsa_pss_pss_sha384, rsa_pss_pss_sha512, rsa_pkcs1_sha256, rsa_pkcs1_sha384, rsa_pkcs1_sha512, dsa_sha256, ecdsa_sha224, rsa_sha224, dsa_sha224, ecdsa_sha1, rsa_pkcs1_sha1, dsa_sha1]
    },
    "supported_versions (43)": {
      "versions": [TLSv1.3, TLSv1.2]
    },
    "psk_key_exchange_modes (45)": {
      "ke_modes": [psk_dhe_ke]
    },
    "signature_algorithms_cert (50)": {
      "signature schemes": [ecdsa_secp256r1_sha256, ecdsa_secp384r1_sha384, ecdsa_secp521r1_sha512, ed25519, ed448, rsa_pss_rsae_sha256, rsa_pss_rsae_sha384, rsa_pss_rsae_sha512, rsa_pss_pss_sha256, rsa_pss_pss_sha384, rsa_pss_pss_sha512, rsa_pkcs1_sha256, rsa_pkcs1_sha384, rsa_pkcs1_sha512, dsa_sha256, ecdsa_sha224, rsa_sha224, dsa_sha224, ecdsa_sha1, rsa_pkcs1_sha1, dsa_sha1]
    },
    "key_share (51)": {
      "client_shares": [  
        {
          "named group": x25519
          "key_exchange": {
            0000: FB E5 06 31 1A 1F B3 F0   27 DC F3 69 2E 7C 0A 6E  ...1....'..i...n
            0010: 45 48 62 1B D8 A6 E5 E4   20 4F E4 27 CF 47 0C 77  EHb..... O.'.G.w
          }
        },
        {
          "named group": secp256r1
          "key_exchange": {
            0000: 04 15 85 F4 1D 05 6E 47   82 58 35 98 71 7A 20 E7  ......nG.X5.qz .
            0010: 84 4E FC B0 D9 30 89 29   7F 39 48 B5 88 0D FB 03  .N...0.).9H.....
            0020: A0 C3 3D D1 A7 B9 D3 55   B5 D6 E6 5D 41 DA 00 ED  ..=....U...]A...
            0030: C6 75 87 66 F1 76 EC A7   CB 12 C0 21 61 96 0D 0A  .u.f.v.....!a...
            0040: 44 
          }
        },
      ]
    },
    "renegotiation_info (65,281)": {
      "renegotiated connection": [<no renegotiated connection>]
    }
  ]
}
)
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.652 EDT|ServerHello.java:888|Consuming ServerHello handshake message (
"ServerHello": {
  "server version"      : "TLSv1.2",
  "random"              : "791496B159FDACBEE07EB516DE4F9246E55CC8EE878F2A5BE6361F8E07FD9CAC",
  "session id"          : "C54174DC57983C18C2DEFB3CDE3157E3C7A18BD7509C8C20EA87582F2F0A6B6F",
  "cipher suite"        : "TLS_AES_256_GCM_SHA384(0x1302)",
  "compression methods" : "00",
  "extensions"          : [
    "supported_versions (43)": {
      "selected version": [TLSv1.3]
    },
    "key_share (51)": {
      "server_share": {
        "named group": x25519
        "key_exchange": {
          0000: 93 D4 8E 16 7A B9 55 43   D5 1A 09 0C 55 D6 98 4B  ....z.UC....U..K
          0010: 8C 63 01 38 3F 15 02 06   51 EA 0A 4E A2 EF CB 65  .c.8?...Q..N...e
        }
      },
    }
  ]
}
)
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.652 EDT|SSLExtensions.java:204|Consumed extension: supported_versions
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.653 EDT|ServerHello.java:984|Negotiated protocol version: TLSv1.3
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.654 EDT|SSLExtensions.java:175|Ignore unsupported extension: server_name
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.654 EDT|SSLExtensions.java:175|Ignore unsupported extension: max_fragment_length
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.654 EDT|SSLExtensions.java:175|Ignore unsupported extension: status_request
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.654 EDT|SSLExtensions.java:175|Ignore unsupported extension: ec_point_formats
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.654 EDT|SSLExtensions.java:175|Ignore unsupported extension: application_layer_protocol_negotiation
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.654 EDT|SSLExtensions.java:175|Ignore unsupported extension: status_request_v2
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.655 EDT|SSLExtensions.java:175|Ignore unsupported extension: extended_master_secret
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.655 EDT|SSLExtensions.java:175|Ignore unsupported extension: session_ticket
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.655 EDT|SSLExtensions.java:204|Consumed extension: supported_versions
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.658 EDT|SSLExtensions.java:204|Consumed extension: key_share
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.658 EDT|SSLExtensions.java:175|Ignore unsupported extension: renegotiation_info
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.658 EDT|PreSharedKeyExtension.java:924|Handling pre_shared_key absence.
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.659 EDT|SSLExtensions.java:219|Ignore unavailable extension: server_name
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.659 EDT|SSLExtensions.java:219|Ignore unavailable extension: max_fragment_length
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.659 EDT|SSLExtensions.java:219|Ignore unavailable extension: status_request
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.659 EDT|SSLExtensions.java:219|Ignore unavailable extension: ec_point_formats
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.660 EDT|SSLExtensions.java:219|Ignore unavailable extension: application_layer_protocol_negotiation
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.660 EDT|SSLExtensions.java:219|Ignore unavailable extension: status_request_v2
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.660 EDT|SSLExtensions.java:219|Ignore unavailable extension: extended_master_secret
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.660 EDT|SSLExtensions.java:219|Ignore unavailable extension: session_ticket
javax.net.ssl|WARNING|10|main|2022-07-05 17:26:27.660 EDT|SSLExtensions.java:227|Ignore impact of unsupported extension: supported_versions
javax.net.ssl|WARNING|10|main|2022-07-05 17:26:27.661 EDT|SSLExtensions.java:227|Ignore impact of unsupported extension: key_share
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.661 EDT|SSLExtensions.java:219|Ignore unavailable extension: renegotiation_info
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.661 EDT|SSLExtensions.java:219|Ignore unavailable extension: pre_shared_key
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.669 EDT|SSLCipher.java:1870|KeyLimit read side: algorithm = AES/GCM/NOPADDING:KEYUPDATE
countdown value = 137438953472
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.671 EDT|SSLCipher.java:2024|KeyLimit write side: algorithm = AES/GCM/NOPADDING:KEYUPDATE
countdown value = 137438953472
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.672 EDT|ChangeCipherSpec.java:246|Consuming ChangeCipherSpec message
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.676 EDT|EncryptedExtensions.java:171|Consuming EncryptedExtensions handshake message (
"EncryptedExtensions": [
  "server_name (0)": {
    <empty extension_data field>
  }
]
)
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.676 EDT|SSLExtensions.java:204|Consumed extension: server_name
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.676 EDT|SSLExtensions.java:185|Ignore unavailable extension: max_fragment_length
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.676 EDT|SSLExtensions.java:185|Ignore unavailable extension: supported_groups
javax.net.ssl|WARNING|10|main|2022-07-05 17:26:27.676 EDT|SSLExtensions.java:227|Ignore impact of unsupported extension: server_name
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.677 EDT|SSLExtensions.java:219|Ignore unavailable extension: max_fragment_length
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.677 EDT|SSLExtensions.java:219|Ignore unavailable extension: supported_groups
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.677 EDT|SSLExtensions.java:219|Ignore unavailable extension: application_layer_protocol_negotiation
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.699 EDT|CertificateMessage.java:1166|Consuming server Certificate handshake message (
"Certificate": {
  "certificate_request_context": "",
  "certificate_list": [  
  {
    "certificate" : {
      "version"            : "v3",
      "serial number"      : "01EA737E74EDDF1C82AF20BF7FCAA4D3",
      "signature algorithm": "SHA256withRSA",
      "issuer"             : "CN=GlobalSign Atlas R3 DV TLS CA 2022 Q1, O=GlobalSign nv-sa, C=BE",
      "not before"         : "2022-01-22 11:45:18.000 EST",
      "not  after"         : "2023-02-23 11:45:17.000 EST",
      "subject"            : "CN=rubygems.org",
      "subject public key" : "RSA",
      "extensions"         : [
        {
          ObjectId: 1.3.6.1.4.1.11129.2.4.2 Criticality=false
        },
        {
          ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false
          AuthorityInfoAccess [
            [
             accessMethod: ocsp
             accessLocation: URIName: http://ocsp.globalsign.com/ca/gsatlasr3dvtlsca2022q1
          , 
             accessMethod: caIssuers
             accessLocation: URIName: http://secure.globalsign.com/cacert/gsatlasr3dvtlsca2022q1.crt
          ]
          ]
        },
        {
          ObjectId: 2.5.29.35 Criticality=false
          AuthorityKeyIdentifier [
          KeyIdentifier [
          0000: 9C 2A 67 D0 B4 83 31 5B   80 CB 29 96 55 75 09 37  .*g...1[..).Uu.7
          0010: 38 B8 3C A5                                        8.<.
          ]
          ]
        },
        {
          ObjectId: 2.5.29.19 Criticality=true
          BasicConstraints:[
            CA:false
            PathLen: undefined
          ]
        },
        {
          ObjectId: 2.5.29.31 Criticality=false
          CRLDistributionPoints [
            [DistributionPoint:
               [URIName: http://crl.globalsign.com/ca/gsatlasr3dvtlsca2022q1.crl]
          ]]
        },
        {
          ObjectId: 2.5.29.32 Criticality=false
          CertificatePolicies [
            [CertificatePolicyId: [2.23.140.1.2.1]
          []  ]
            [CertificatePolicyId: [1.3.6.1.4.1.4146.10.1.3]
          [PolicyQualifierInfo: [
            qualifierID: 1.3.6.1.5.5.7.2.1
            qualifier: 0000: 16 26 68 74 74 70 73 3A   2F 2F 77 77 77 2E 67 6C  .&https://www.gl
          0010: 6F 62 61 6C 73 69 67 6E   2E 63 6F 6D 2F 72 65 70  obalsign.com/rep
          0020: 6F 73 69 74 6F 72 79 2F                            ository/
          
          ]]  ]
          ]
        },
        {
          ObjectId: 2.5.29.37 Criticality=false
          ExtendedKeyUsages [
            serverAuth
            clientAuth
          ]
        },
        {
          ObjectId: 2.5.29.15 Criticality=true
          KeyUsage [
            DigitalSignature
            Key_Encipherment
          ]
        },
        {
          ObjectId: 2.5.29.17 Criticality=false
          SubjectAlternativeName [
            DNSName: rubygems.org
            DNSName: *.rubygems.org
            DNSName: *.staging.rubygems.org
            DNSName: staging.rubygems.org
          ]
        },
        {
          ObjectId: 2.5.29.14 Criticality=false
          SubjectKeyIdentifier [
          KeyIdentifier [
          0000: 2B CC 19 A8 81 A6 65 07   F5 D0 DC 22 87 46 EA DD  +.....e....".F..
          0010: 75 A4 1C B3                                        u...
          ]
          ]
        }
      ]}
    "extensions": {
      "status_request (5)": {
        "certificate status response type": ocsp
        "OCSP status response": {
          OCSP Response:
          Response Status: SUCCESSFUL
          Responder ID: byKey: B1B3287498FF4E39FABAC59D13EE5C7D2468C167
          Produced at: Tue Jul 05 09:56:00 EDT 2022
          1 response:
          SingleResponse:
          CertId 
          Algorithm: SHA-1
          issuerNameHash 
          0000: BE A5 33 2D 84 76 B9 7D   60 19 EA B7 4B 4D 17 DD  ..3-.v..`...KM..
          0010: AF 0E BA 51 
          issuerKeyHash: 
          0000: 9C 2A 67 D0 B4 83 31 5B   80 CB 29 96 55 75 09 37  .*g...1[..).Uu.7
          0010: 38 B8 3C A5 
          SerialNumber: [    01ea737e 74eddf1c 82af20bf 7fcaa4d3]
          CertStatus: GOOD
          thisUpdate is Tue Jul 05 09:00:00 EDT 2022
          nextUpdate is Tue Jul 05 21:00:00 EDT 2022
        }
      }
    }
  },
  {
    "certificate" : {
      "version"            : "v3",
      "serial number"      : "7AFB337E594D23C76FDB7C4C629BDAD6",
      "signature algorithm": "SHA256withRSA",
      "issuer"             : "CN=GlobalSign, O=GlobalSign, OU=GlobalSign Root CA - R3",
      "not before"         : "2021-10-20 08:00:00.000 EDT",
      "not  after"         : "2024-10-19 20:00:00.000 EDT",
      "subject"            : "CN=GlobalSign Atlas R3 DV TLS CA 2022 Q1, O=GlobalSign nv-sa, C=BE",
      "subject public key" : "RSA",
      "extensions"         : [
        {
          ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false
          AuthorityInfoAccess [
            [
             accessMethod: ocsp
             accessLocation: URIName: http://ocsp2.globalsign.com/rootr3
          , 
             accessMethod: caIssuers
             accessLocation: URIName: http://secure.globalsign.com/cacert/root-r3.crt
          ]
          ]
        },
        {
          ObjectId: 2.5.29.35 Criticality=false
          AuthorityKeyIdentifier [
          KeyIdentifier [
          0000: 8F F0 4B 7F A8 2E 45 24   AE 4D 50 FA 63 9A 8B DE  ..K...E$.MP.c...
          0010: E2 DD 1B BC                                        ....
          ]
          ]
        },
        {
          ObjectId: 2.5.29.19 Criticality=true
          BasicConstraints:[
            CA:true
            PathLen:0
          ]
        },
        {
          ObjectId: 2.5.29.31 Criticality=false
          CRLDistributionPoints [
            [DistributionPoint:
               [URIName: http://crl.globalsign.com/root-r3.crl]
          ]]
        },
        {
          ObjectId: 2.5.29.32 Criticality=false
          CertificatePolicies [
            [CertificatePolicyId: [2.23.140.1.2.1]
          []  ]
            [CertificatePolicyId: [1.3.6.1.4.1.4146.10.1.3]
          [PolicyQualifierInfo: [
            qualifierID: 1.3.6.1.5.5.7.2.1
            qualifier: 0000: 16 26 68 74 74 70 73 3A   2F 2F 77 77 77 2E 67 6C  .&https://www.gl
          0010: 6F 62 61 6C 73 69 67 6E   2E 63 6F 6D 2F 72 65 70  obalsign.com/rep
          0020: 6F 73 69 74 6F 72 79 2F                            ository/
          
          ]]  ]
          ]
        },
        {
          ObjectId: 2.5.29.37 Criticality=false
          ExtendedKeyUsages [
            serverAuth
            clientAuth
          ]
        },
        {
          ObjectId: 2.5.29.15 Criticality=true
          KeyUsage [
            DigitalSignature
            Key_CertSign
            Crl_Sign
          ]
        },
        {
          ObjectId: 2.5.29.14 Criticality=false
          SubjectKeyIdentifier [
          KeyIdentifier [
          0000: 9C 2A 67 D0 B4 83 31 5B   80 CB 29 96 55 75 09 37  .*g...1[..).Uu.7
          0010: 38 B8 3C A5                                        8.<.
          ]
          ]
        }
      ]}
    "extensions": {
      <no extension>
    }
  },
]
}
)
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.700 EDT|SSLExtensions.java:204|Consumed extension: status_request
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.700 EDT|SSLExtensions.java:185|Ignore unavailable extension: status_request
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.795 EDT|CertificateVerify.java:1166|Consuming CertificateVerify handshake message (
"CertificateVerify": {
  "signature algorithm": rsa_pss_rsae_sha256
  "signature": {
    0000: 66 6F B8 EF 17 E0 85 3B   36 2E 5B 5C CB A3 FB A1  fo.....;6.[\....
    0010: 41 48 37 E7 51 B7 F2 49   8A 7F 18 64 C8 57 F9 DB  AH7.Q..I...d.W..
    0020: B9 3A B6 79 63 CC A1 43   37 BE 12 09 36 08 19 5D  .:.yc..C7...6..]
    0030: 54 E7 10 40 68 46 45 22   67 9F 8B 4B 97 E9 70 7F  T..@hFE"g..K..p.
    0040: 56 67 81 C9 49 E1 6B 6B   19 AE FD CD 85 F7 9E 67  Vg..I.kk.......g
    0050: 7E 76 3C D3 43 66 60 F6   54 0A 2D E1 6A CD CF FB  .v<.Cf`.T.-.j...
    0060: 24 05 F1 09 38 01 05 40   F5 80 5B 4C C1 C9 3B B0  $...8..@..[L..;.
    0070: 35 BC 6C 4B C8 BD 3A A8   DA 6F 6B 75 B2 1B 09 2E  5.lK..:..oku....
    0080: 7C A0 F8 CD 45 60 97 AB   EB 45 E1 EE 4B 5A 1C B7  ....E`...E..KZ..
    0090: 93 46 32 71 DC E2 B4 19   17 FC 59 3D 26 45 DE BA  .F2q......Y=&E..
    00A0: CF 50 A1 97 95 8E 1D A5   B2 BB 54 EE FF D6 2F 94  .P........T.../.
    00B0: 28 BD E1 FD B1 3F 91 08   64 19 18 02 43 82 CF 39  (....?..d...C..9
    00C0: 76 29 0F 9F 23 BD CC CF   83 16 76 5B EA 93 83 84  v)..#.....v[....
    00D0: 2C 9B 75 40 44 E6 82 68   6B 84 C5 72 0F C1 03 C3  ,.u@D..hk..r....
    00E0: DB 8E 39 35 B2 6E FA 83   EF A3 DC 5A 4E 00 BC 95  ..95.n.....ZN...
    00F0: BE 51 C8 A7 22 A3 33 17   17 0B 04 71 16 02 92 79  .Q..".3....q...y
  }
}
)
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.798 EDT|Finished.java:917|Consuming server Finished handshake message (
"Finished": {
  "verify data": {
    0000: 16 99 DB FF 59 E1 20 4D   CB A2 DF 1F A3 B1 0D 1A  ....Y. M........
    0010: 7F F8 95 CC E2 1C 17 FD   A2 27 4F CD 55 27 B6 11  .........'O.U'..
    0020: C2 CD 96 5A 96 D3 68 0D   87 0B E8 26 DE 66 CB 37  ...Z..h....&.f.7
  }'}
)
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.799 EDT|SSLCipher.java:1870|KeyLimit read side: algorithm = AES/GCM/NOPADDING:KEYUPDATE
countdown value = 137438953472
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.801 EDT|Finished.java:687|Produced client Finished handshake message (
"Finished": {
  "verify data": {
    0000: 07 22 F9 57 8D 70 C5 06   41 3B 4C ED 4F 19 46 AE  .".W.p..A;L.O.F.
    0010: 7A 96 C1 2F 40 20 E2 DA   19 7C 66 1C EC 04 3F E6  z../@ ....f...?.
    0020: 49 17 8B EB 06 AD 5E 84   32 38 54 79 57 B1 72 F4  I.....^.28TyW.r.
  }'}
)
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.801 EDT|SSLCipher.java:2024|KeyLimit write side: algorithm = AES/GCM/NOPADDING:KEYUPDATE
countdown value = 137438953472
javax.net.ssl|DEBUG|10|main|2022-07-05 17:26:27.804 EDT|NewSessionTicket.java:567|Consuming NewSessionTicket message (
"NewSessionTicket": {
  "ticket_lifetime"      : "604,800",
  "ticket_age_add"       : "<omitted>",
  "ticket_nonce"         : "",
  "ticket"               : {
    0000: 24 FD 0B 68 55 4A E4 71   E7 CF D9 46 19 5D 15 D3  $..hUJ.q...F.]..
    0010: EC 32 FC 6D 2C 0C 43 33   B7 A7 5B 30 9D 77 C0 0A  .2.m,.C3..[0.w..
    0020: 53 21 0B E7 BB FB 04 94   86 18 DC E8 62 24 4F 81  S!..........b$O.
    0030: 9D F2 B1 C2 B2 EC B4 0E   12 80 9D 99 23 18 1D 03  ............#...
    0040: 28 FD CD E9 6C 76 2D D9   CD 8D 7A BD 94 2A 3D 1B  (...lv-...z..*=.
    0050: 94 2C 6C 6C 8F 52 0C 69   E5 C5 53 C0 01 D4 10 89  .,ll.R.i..S.....
    0060: F7 15 DC 54 22 BB AC 56   91 B5 A1 66 35 35 72 05  ...T"..V...f55r.
    0070: 76 71 07 8F 40 E9 C7 76   B0 61 42 0F 41 30 CA 05  vq..@..v.aB.A0..
    0080: 03 4E 6C 7A 3C B0 98 3D   C2 04 F9 A5 99 33 3E 91  .Nlz<..=.....3>.
    0090: 3B 21 E6 64 76 50 3B 66   E9 4D 66 00 ED 4C 73 E1  ;!.dvP;f.Mf..Ls.
  }  "extensions"           : [
    <no extension>
  ]
}
)
SSLSocket.syswriteImpl java.io.IOException: Broken pipe
	at java.base/sun.nio.ch.FileDispatcherImpl.write0(Native Method)
	at java.base/sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:62)
	at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:137)
	at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:102)
	at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:58)
	at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:532)
	at org.jruby.ext.openssl.SSLSocket$JavaSocketChannel.write(SSLSocket.java:1294)
	at org.jruby.ext.openssl.SSLSocket.writeToChannel(SSLSocket.java:652)
	at org.jruby.ext.openssl.SSLSocket.flushData(SSLSocket.java:640)
	at org.jruby.ext.openssl.SSLSocket.write(SSLSocket.java:695)
	at org.jruby.ext.openssl.SSLSocket.syswriteImpl(SSLSocket.java:955)
	at org.jruby.ext.openssl.SSLSocket.syswrite_nonblock(SSLSocket.java:990)
	at org.jruby.ext.openssl.SSLSocket$INVOKER$i$syswrite_nonblock.call(SSLSocket$INVOKER$i$syswrite_nonblock.gen)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:204)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:204)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
	at org.jruby.dist/org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
	at org.jruby.dist/org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:66)
	at org.jruby.dist/org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:48)
	at org.jruby.dist/org.jruby.runtime.Block.call(Block.java:169)
	at org.jruby.dist/org.jruby.RubyEnumerable$EachWithIndex.call(RubyEnumerable.java:1103)
	at org.jruby.dist/org.jruby.runtime.CallBlock.doYield(CallBlock.java:97)
	at org.jruby.dist/org.jruby.runtime.BlockBody.yield(BlockBody.java:108)
	at org.jruby.dist/org.jruby.runtime.Block.yield(Block.java:188)
	at org.jruby.dist/org.jruby.RubyArray.each(RubyArray.java:1865)
	at org.jruby.dist/org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen)
	at org.jruby.dist/org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:560)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
	at org.jruby.dist/org.jruby.RubyEnumerable.callEach(RubyEnumerable.java:105)
	at org.jruby.dist/org.jruby.RubyEnumerable.each_with_indexCommon(RubyEnumerable.java:1120)
	at org.jruby.dist/org.jruby.RubyEnumerable.each_with_index(RubyEnumerable.java:1143)
	at org.jruby.dist/org.jruby.RubyEnumerable$INVOKER$s$0$0$each_with_index.call(RubyEnumerable$INVOKER$s$0$0$each_with_index.gen)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
	at org.jruby.dist/org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
	at org.jruby.dist/org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:76)
	at org.jruby.dist/org.jruby.runtime.Block.yieldSpecific(Block.java:157)
	at org.jruby.dist/org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:498)
	at org.jruby.dist/org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:76)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:176)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
	at org.jruby.dist/org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
	at org.jruby.dist/org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:170)
	at org.jruby.dist/org.jruby.runtime.BlockBody.yield(BlockBody.java:108)
	at org.jruby.dist/org.jruby.runtime.Block.yield(Block.java:188)
	at org.jruby.dist/org.jruby.exceptions.CatchThrow.enter(CatchThrow.java:32)
	at org.jruby.dist/org.jruby.RubyKernel.rbCatch(RubyKernel.java:1237)
	at org.jruby.dist/org.jruby.RubyKernel$INVOKER$s$rbCatch.call(RubyKernel$INVOKER$s$rbCatch.gen)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:383)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:185)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:192)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:337)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:383)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:185)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:338)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
	at org.jruby.dist/org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:214)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.dist/org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.dist/org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
	at org.jruby.dist/org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.dist/org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.dist/org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.dist/org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.dist/org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.dist/org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.dist/org.jruby.Ruby.runInterpreter(Ruby.java:1270)
	at org.jruby.dist/org.jruby.Ruby.loadFile(Ruby.java:2865)
	at org.jruby.dist/org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:937)
	at org.jruby.dist/org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:895)
	at org.jruby.dist/org.jruby.runtime.load.LoadService.load(LoadService.java:323)
	at org.jruby.dist/org.jruby.RubyKernel.loadCommon(RubyKernel.java:1082)
	at org.jruby.dist/org.jruby.RubyKernel.load(RubyKernel.java:1052)
	at org.jruby.dist/org.jruby.RubyKernel$INVOKER$s$load.call(RubyKernel$INVOKER$s$load.gen)
	at org.jruby.dist/org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:422)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
	at org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
	at Users.andymaleh.$_dot_rvm.rubies.jruby_minus_9_dot_3_dot_4_dot_0.bin.gem.invokeOther2:load(/Users/andymaleh/.rvm/rubies/jruby-9.3.4.0/bin/gem:4)
	at Users.andymaleh.$_dot_rvm.rubies.jruby_minus_9_dot_3_dot_4_dot_0.bin.gem.RUBY$script(/Users/andymaleh/.rvm/rubies/jruby-9.3.4.0/bin/gem:4)
	at Users.andymaleh.$_dot_rvm.rubies.jruby_minus_9_dot_3_dot_4_dot_0.bin.gem.run(/Users/andymaleh/.rvm/rubies/jruby-9.3.4.0/bin/gem)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:731)
	at org.jruby.dist/org.jruby.ir.Compiler$1.load(Compiler.java:114)
	at org.jruby.dist/org.jruby.Ruby.runScript(Ruby.java:1257)
	at org.jruby.dist/org.jruby.Ruby.runNormally(Ruby.java:1176)
	at org.jruby.dist/org.jruby.Ruby.runNormally(Ruby.java:1158)
	at org.jruby.dist/org.jruby.Ruby.runNormally(Ruby.java:1194)
	at org.jruby.dist/org.jruby.Ruby.runFromMain(Ruby.java:977)
	at org.jruby.dist/org.jruby.Main.doRunFromMain(Main.java:406)
	at org.jruby.dist/org.jruby.Main.internalRun(Main.java:290)
	at org.jruby.dist/org.jruby.Main.run(Main.java:235)
	at org.jruby.dist/org.jruby.Main.main(Main.java:207)
javax.net.ssl|ALL|10|main|2022-07-05 17:26:28.075 EDT|SSLEngineImpl.java:825|Closing outbound of SSLEngine
javax.net.ssl|WARNING|10|main|2022-07-05 17:26:28.079 EDT|SSLEngineOutputRecord.java:182|outbound has closed, ignore outbound application data
SSLSocket.close doShutdown failed java.io.IOException: Broken pipe
ERROR:  While executing gem ... (IOError)
    Broken pipe

@kares
Copy link
Member

kares commented Jul 6, 2022

Thanks Andy, this is helpful and confirms it's likely a buffering issue.
We should be able to come up with a reproducing test-case, eventually.
Unfortunately I will be off for a few weeks.

@AndyObtiva
Copy link
Author

I can't believe this! With JRuby 9.3.11.0, the issue was gone the last time I tried to push a gem.

% rake release
Pushing master to origin
Tagging v1.1.5
Pushing v1.1.5 to origin
Generated: glimmer_wordle.gemspec
glimmer_wordle.gemspec is valid.
Executing "gem push ./pkg/glimmer_wordle-1.1.5.gem":
gem push ./pkg/glimmer_wordle-1.1.5.gem
Pushing gem to https://rubygems.org...
Successfully registered gem: glimmer_wordle (1.1.5)

One change I made in my gem that might not be related is I changed the homepage URL to have https instead of http:
https://github.com/AndyObtiva/glimmer_wordle

I haven't tested gem push with newer JRubys. But, I'd like to try using JRuby 9.3.11.0 with pushing a few other gems before I close the issue, just in case.

In the meantime, if you did something to fix this, thank you!

@hiroyuki-sato
Copy link

Hello, @AndyObtiva. Do you disable OTP(MFA) setting for gem push?

I caused the same error with JRuby 9.3.11.0. It seems relates to OTP setting.
jruby/jruby#7938 (comment)

UI and API (Recommend) may cause this issue.

スクリーンショット 2023-10-18 10 06 09

@headius
Copy link
Member

headius commented May 6, 2024

I have finally managed to get this consistently on MacOS on M1 and I'm investigating.

The root exception that gets raised follow:

ERROR:  While executing gem ... (Java::JavaIo::IOException)
    Broken pipe
	java.base/sun.nio.ch.SocketDispatcher.write0(Native Method)
	java.base/sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:62)
	java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:137)
	java.base/sun.nio.ch.IOUtil.write(IOUtil.java:102)
	java.base/sun.nio.ch.IOUtil.write(IOUtil.java:58)
	java.base/sun.nio.ch.SocketChannelImpl.implWrite(SocketChannelImpl.java:566)
	java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:618)
	org.jruby.ext.openssl.SSLSocket$JavaSocketChannel.write(SSLSocket.java:1286)
	org.jruby.ext.openssl.SSLSocket.writeToChannel(SSLSocket.java:658)
	org.jruby.ext.openssl.SSLSocket.flushData(SSLSocket.java:646)
	org.jruby.ext.openssl.SSLSocket.write(SSLSocket.java:693)
	org.jruby.ext.openssl.SSLSocket.syswriteImpl(SSLSocket.java:946)
	org.jruby.ext.openssl.SSLSocket.syswrite_nonblock(SSLSocket.java:982)
	org.jruby.ext.openssl.SSLSocket$INVOKER$i$syswrite_nonblock.call(SSLSocket$INVOKER$i$syswrite_nonblock.gen)
	org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:291)
	org.jruby.dist/org.jruby.runtime.callsite.CachingCallSite.fcall(CachingCallSite.java:297)
	Users.headius.work.jruby.lib.ruby.gems.shared.gems.jruby_minus_openssl_minus_0_dot_15_dot_1_minus_java.lib.openssl.buffering.invokeOther118:syswrite_nonblock(/Users/headius/work/jruby/lib/ruby/gems/shared/gems/jruby-openssl-0.15.1-java/lib/openssl/buffering.rb:406)
	Users.headius.work.jruby.lib.ruby.gems.shared.gems.jruby_minus_openssl_minus_0_dot_15_dot_1_minus_java.lib.openssl.buffering.RUBY$method$write_nonblock$22(/Users/headius/work/jruby/lib/ruby/gems/shared/gems/jruby-openssl-0.15.1-java/lib/openssl/buffering.rb:406)

The exception is raised a an IOError because it does not use JRuby's logic for turning a Java IOException into the appropriate Errno exception (in this case, EPIPE). This may be interfering with exception-handling fallbacks in the openssl/protocol/http code.

@headius
Copy link
Member

headius commented May 6, 2024

It does appear to relate to authentication. It appears to attempt to push to a rubygems.org URL that requires authentication, but without being authenticated. That logic should fall back on the OTP authentication logic, but because we raise the wrong error it propagates wrong.

If I fix it to raise EPIPE, then it still doesn't work but it shows a bit better how it is trying to use that authenticated URL and failing too many times:

$ jruby -X+C -Xbacktrace.style=full -S gem push --verbose ruby-maven-libs-3.9.6.1.gem
Ignoring bindex-0.8.1 because its extensions are not built. Try: gem pristine bindex --version 0.8.1
Pushing gem to https://rubygems.org...
POST https://rubygems.org/api/v1/gems
connection reset after 1 requests, retrying
POST https://rubygems.org/api/v1/gems
connection reset after 1 requests, retrying
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    too many connection resets (https://rubygems.org/api/v1/gems)
	java/lang/Thread.java:2417:in `getStackTrace'
	org/jruby/runtime/backtrace/TraceType.java:269:in `getBacktraceData'
	org/jruby/runtime/backtrace/TraceType.java:54:in `getBacktrace'
	org/jruby/RubyException.java:434:in `captureBacktrace'
	org/jruby/exceptions/RaiseException.java:217:in `preRaise'
	org/jruby/exceptions/RaiseException.java:65:in `<init>'
	org/jruby/exceptions/Exception.java:39:in `<init>'
	org/jruby/exceptions/StandardError.java:38:in `<init>'
	org/jruby/exceptions/RuntimeError.java:38:in `<init>'
	org/jruby/RubyRuntimeError.java:52:in `constructThrowable'
	org/jruby/RubyException.java:396:in `toThrowable'
	org/jruby/RubyKernel.java:1088:in `raise'
	org/jruby/RubyKernel$INVOKER$s$0$3$raise.gen:-1:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:224:in `call'
	org/jruby/internal/runtime/methods/DynamicMethod.java:220:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:466:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:244:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:248:in `fcall'
	Users/headius/work/jruby/lib/ruby/stdlib/rubygems//Users/headius/work/jruby/lib/ruby/stdlib/rubygems/request.rb:249:in `invokeOther203:raise'
	/Users/headius/work/jruby/lib/ruby/stdlib/rubygems/request.rb:249:in `perform_request'
	org/jruby/internal/runtime/methods/CompiledIRMethod.java:228:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:466:in `cacheAndCall'
	org/jruby/runtime/callsite/CachingCallSite.java:244:in `call'
	org/jruby/runtime/callsite/CachingCallSite.java:248:in `fcall'
	Users/headius/work/jruby/lib/ruby/stdlib/rubygems//Users/headius/work/jruby/lib/ruby/stdlib/rubygems/request.rb:154:in `invokeOther135:perform_request'

@headius
Copy link
Member

headius commented May 6, 2024

Oh, and it also sometimes works with some combination of gem login and gem push as though the credentials are getting screwed up.

[] jruby-openssl $ gem login
[] jruby-openssl $ gem push --verbose ruby-maven-libs-3.9.6.1.gem
Pushing gem to https://rubygems.org...
POST https://rubygems.org/api/v1/gems
connection reset after 1 requests, retrying
POST https://rubygems.org/api/v1/gems
401 Unauthorized
You have enabled multi-factor authentication. Please enter OTP code.
Code:   023862
POST https://rubygems.org/api/v1/gems
connection reset after 1 requests, retrying
POST https://rubygems.org/api/v1/gems
200 OK
Gem was already pushed: ruby-maven-libs (3.9.6.1)

headius added a commit to headius/jruby-openssl that referenced this issue May 6, 2024
Many libraries depend on us raising the actual Errno exceptions
for what comes out of Java as IOException. The utilities in JRuby
exist to convert these IOException objects into the appropriate
Errno exception by examining the exception type and message. This
patch switches one key place for jruby#242 to use this utility method.
kares added a commit that referenced this issue May 24, 2024
kares pushed a commit that referenced this issue May 27, 2024
Many libraries depend on us raising the actual Errno exceptions
for what comes out of Java as IOException. The utilities in JRuby
exist to convert these IOException objects into the appropriate
Errno exception by examining the exception type and message. This
patch switches one key place for #242 to use this utility method.
kares added a commit that referenced this issue Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants