Skip to content

Fix a JRuby flake in the local test server and use JRuby 10.1.2.0 in CI - #9924

Merged
hsbt merged 3 commits into
masterfrom
claude/wonderful-colden-82f169
Oct 1, 2026
Merged

hsbt merged 3 commits into
masterfrom
claude/wonderful-colden-82f169

Conversation

@hsbt

@hsbt hsbt commented Oct 1, 2026

Copy link
Copy Markdown
Member

TestGemRemoteFetcherLocalServer has failed intermittently on the Ubuntu JRuby job with Errno::EBADF from client.close in handle_request. When teardown's Thread#kill lands while the server thread is still writing a response, NIO closes the channel and JRuby 10.1.0.0 raises EBADF from the next IO#close. JRuby fixed this in 10.1.2 (jruby/jruby@909c0da24a21).

I rescue EBADF on that close, since the tests also run on older JRuby, and move CI to JRuby 10.1.2.0. That needs ruby/setup-ruby 1.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

hsbt and others added 3 commits October 1, 2026 13:55
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>
@hsbt
hsbt merged commit 16e8bef into master Oct 1, 2026
114 checks passed
@hsbt
hsbt deleted the claude/wonderful-colden-82f169 branch October 1, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant