Fix a JRuby flake in the local test server and use JRuby 10.1.2.0 in CI - #9924
Merged
Merged
Conversation
On JRuby before 10.1.2, IO#close raises Errno::EBADF after Thread#kill interrupts a socket read or write, because NIO has already closed the channel. A slow runner can still be inside client.print when teardown kills the server thread, and join then re-raises that error from the ensure. jruby/jruby@909c0da24a21 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JRuby 10.1.2.0 is only known to setup-ruby from 1.325.0, and the releases in between only add Ruby versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It no longer raises Errno::EBADF from IO#close after Thread#kill interrupts a socket read or write, which made TestGemRemoteFetcherLocalServer flaky on the Ubuntu JRuby job. jruby/jruby@909c0da24a21 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestGemRemoteFetcherLocalServerhas failed intermittently on the Ubuntu JRuby job withErrno::EBADFfromclient.closeinhandle_request. When teardown'sThread#killlands while the server thread is still writing a response, NIO closes the channel and JRuby 10.1.0.0 raisesEBADFfrom the nextIO#close. JRuby fixed this in 10.1.2 (jruby/jruby@909c0da24a21).I rescue
EBADFon thatclose, since the tests also run on older JRuby, and move CI to JRuby 10.1.2.0. That needsruby/setup-ruby1.325.0 or later, so I bump it to 1.327.0. The releases in between only add Ruby versions.I reproduced the failure in a 2-CPU Linux container with JRuby 10.1.0.0, where it failed in 7 of 140 runs, and saw none in 230 runs with the rescue. On JRuby 10.1.2.0, the RubyGems suite and the JRuby-tagged Bundler specs pass locally.
Generated with Claude Code