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

nio4r 2.7.1 no longer supports jruby 9.2.20.1 (2.5.8) #314

Closed
nmain opened this issue Apr 12, 2024 · 3 comments
Closed

nio4r 2.7.1 no longer supports jruby 9.2.20.1 (2.5.8) #314

nmain opened this issue Apr 12, 2024 · 3 comments

Comments

@nmain
Copy link

nmain commented Apr 12, 2024

This commit:

v2.7.0...v2.7.1#diff-02577d2ddc20ce483f2e85438616e620e94d72e0c067f01253f73911755fb148R237

switched to an overload of RubyThread.beforeBlockingCall that does not exist on older versions of jruby. See these jruby commits for reference:

https://github.com/jruby/jruby/pull/6569/files#diff-720b83048da17006a68eb965d903dc4c62b0aeb88c723ec2c0e8d34d2bc858b2L2160

https://github.com/jruby/jruby/pull/6791/files#diff-720b83048da17006a68eb965d903dc4c62b0aeb88c723ec2c0e8d34d2bc858b2R2231

Example failing stacktrace:

java.lang.NoSuchMethodError: 'void org.jruby.RubyThread.beforeBlockingCall(org.jruby.runtime.ThreadContext)'
	at org.nio4r.Selector.doSelect(Selector.java:237) ~[nio4r_ext.jar:?]
	at org.nio4r.Selector.select(Selector.java:197) ~[nio4r_ext.jar:?]
	at org.nio4r.Selector$INVOKER$i$select.call(Selector$INVOKER$i$select.gen) ~[jruby-complete-9.2.20.1.jar:?]
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneBlock.call(JavaMethod.java:577) ~[jruby-complete-9.2.20.1.jar:?]
	at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:197) ~[jruby-complete-9.2.20.1.jar:?]
	at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.puma_minus_5_dot_6_dot_8_minus_java.lib.puma.reactor.RUBY$method$select_loop$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/puma-5.6.8-java/lib/puma/reactor.rb:75) ~[?:?]
	at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.puma_minus_5_dot_6_dot_8_minus_java.lib.puma.reactor.RUBY$method$select_loop$0$__VARARGS__(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/puma-5.6.8-java/lib/puma/reactor.rb:69) ~[?:?]
	at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80) ~[jruby-complete-9.2.20.1.jar:?]
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70) ~[jruby-complete-9.2.20.1.jar:?]
	at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207) ~[jruby-complete-9.2.20.1.jar:?]
	at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.puma_minus_5_dot_6_dot_8_minus_java.lib.puma.reactor.RUBY$block$run$1(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/puma-5.6.8-java/lib/puma/reactor.rb:39) ~[?:?]
	at org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:138) ~[jruby-complete-9.2.20.1.jar:?]
	at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58) ~[jruby-complete-9.2.20.1.jar:?]
	at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:52) ~[jruby-complete-9.2.20.1.jar:?]
	at org.jruby.runtime.Block.call(Block.java:139) ~[jruby-complete-9.2.20.1.jar:?]
	at org.jruby.RubyProc.call(RubyProc.java:318) ~[jruby-complete-9.2.20.1.jar:?]
	at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:105) ~[jruby-complete-9.2.20.1.jar:?]
	at java.lang.Thread.run(Thread.java:829) ~[?:?]

The docs don't mention which versions of jruby are officially supported but I wouldn't expect a break like this on a minor update.

@ioquatix
Copy link
Member

Sorry about that. Not sure there is anything we can do at this point except add documentation that states "We support the latest stable release of JRuby".

@nmain
Copy link
Author

nmain commented Apr 13, 2024

Fair enough. I'm not well-versed in this ecosystem or the expectations with it. I doubt anyone other than my team was affected by this; you have to be running both a very old jruby and a very new nio4r. I've pinned the dependency to 2.7.0 so we're unblocked for now, and we'll be replacing the entire infra that runs this soon anyway.

Hopefully if someone else runs into the same issue, this will come up on their google search first, and they'll be able to pin the dependency to unblock as well.

@ioquatix
Copy link
Member

Thanks for your report.

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

2 participants