-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
IO::EWOULDBLOCKWaitReadable Exception class not defined #4473
Comments
It looks like we bind EAGAINWaitReadable but not EWOULDBLOCKWaitReadable. Not sure where the latter is being used. Will investigate. |
We need to get the complete backtrace for this. I could find no reference to If you can provide a reproduction, that would be best. Otherwise,
I have the following trivial patch that ensures this class is defined, but I'd like to know who's trying to access it. diff --git a/core/src/main/ruby/jruby/kernel/io.rb b/core/src/main/ruby/jruby/kernel/io.rb
index 69fb8b5..753d6d8 100644
--- a/core/src/main/ruby/jruby/kernel/io.rb
+++ b/core/src/main/ruby/jruby/kernel/io.rb
@@ -7,6 +7,19 @@ class IO
include IO::WaitWritable
end
+ if Errno::EAGAIN == Errno::WOULDBLOCK
+ IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable
+ IO::EWOULDBLOCKWaitWritable = IO::EAGAINWaitWritable
+ else
+ class EWOULDBLOCKWaitReadable < Errno::EWOULDBLOCK
+ include IO::WaitReadable
+ end
+
+ class EWOULDBLOCKWaitWritable < Errno::EWOULDBLOCK
+ include IO::WaitWritable
+ end
+ end
+
class EINPROGRESSWaitWritable < Errno::EINPROGRESS
include IO::WaitWritable
end |
I have pushed #4486 that should fix this, but without knowing what caused it I can't be sure. This will have to wait on feedback from @Abdulrazak-Alkl. |
You can find backtrace in below link: |
Ok, it looks like this is an oversight in JRuby. We defined the EAGAIN version but not the EWOULDBLOCK version, and this is the first case where someone actually wanted that class to be defined. I'll merge the patch...should be good. |
Set up EWOULDBLOCKWaitReadable/Writable if not present. Fix #4473
Environment
JRuby version
jruby 9.1.7.0 (2.3.1) 2017-01-11 68056ae Java HotSpot(TM) 64-Bit Server VM 24.80-b11 on 1.7.0_80-b15 +jit [linux-x86_64]
Operating system
Linux abd-laptop 3.16.0-031600-generic #201408031935 SMP Sun Aug 3 23:36:11 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
I have trouble in using bunny gem (https://github.com/ruby-amqp/bunny) with above environment
The Error:
NameError: uninitialized constant IO::EWOULDBLOCKWaitReadable
org/jruby/RubyModule.java:3344:in `const_missing'
The text was updated successfully, but these errors were encountered: