Openssl is broken in 1.8 mode due to IO::WaitReadable #1747

Closed
enebo opened this Issue Jun 14, 2014 · 6 comments

Projects

None yet

5 participants

@enebo
Member
enebo commented Jun 14, 2014

I see some if (runtime.is1_9()) to guard around IO::WaitReadable but apparently that is not enough since I cannot load openssl in 1.8 mode:

JRUBY_OPTS="--1.8" jruby -S irb
irb(main):001:0> RUBY_VERSION
RUBY_VERSION
=> "1.8.7"
irb(main):002:0> require 'openssl'
require 'openssl'
NameError: uninitialized constant IO::WaitReadable
    from org/jruby/RubyModule.java:2723:in `const_missing'
    from /Users/enebo/work/jruby/lib/ruby/shared/jopenssl/load.rb:12:in `(root)'
    from org/jruby/RubyKernel.java:1057:in `require'
    from /Users/enebo/work/jruby/lib/ruby/shared/openssl.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1057:in `require'
    from /Users/enebo/work/jruby/lib/ruby/shared/openssl.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1096:in `eval'
    from (irb):1:in `(root)'
    from (irb):2:in `evaluate'
    from /Users/enebo/work/jruby/lib/ruby/1.8/irb.rb:158:in `eval_input'
    from /Users/enebo/work/jruby/lib/ruby/1.8/irb.rb:271:in `signal_status'
    from org/jruby/RubyKernel.java:1501:in `loop'
    from /Users/enebo/work/jruby/lib/ruby/1.8/irb.rb:155:in `eval_input'
    from org/jruby/RubyKernel.java:1250:in `catch'
    from org/jruby/RubyKernel.java:1250:in `catch'
    from /Users/enebo/work/jruby/lib/ruby/1.8/irb.rb:154:in `eval_input'

Side-note: someone should change guard from is1_9 to !is1_8 to reflect only 1.8 does not have this constant. This is a blocker for 1.7.13 atm.

@enebo enebo added this to the JRuby 1.7.13 milestone Jun 14, 2014
@atambo
Member
atambo commented Jun 14, 2014

I know @mkristian and @kares have been touching jruby-openssl a bunch and might know what is up.

@headius
Member
headius commented Jun 15, 2014

Can we just go ahead and define it in 1.8 mode too? Those exceptions are just EAGAIN with an appropriate module pre-mixed.

@kares
Member
kares commented Jun 15, 2014

actually, I do not see the guard there ... but it's easy to fix - first I'll check MRI to be sure it's done right

@kares
Member
kares commented Jun 15, 2014

there's no SSLErrorWaitReadable and SSLErrorWaitWritable under OpenSSL::SSL in MRI 1.8.7 nor 1.9.3 - as the corresponding IO nested mixins are only added in 2.x ... thus the proposed fix is to match "core" if IO::WaitReadable and IO::WaitWritable are available we expose the custom SSLError sub-classes. also, the previous code (before eb7e062) would have failed bad at runtime when raising those custom ssl errors due constants not being available (in 1.8).

@mkristian
Member

before releasing jruby-1,7,13 with the new jruby-openssl gem we really need to fix: #1566 which is also related to #1706, i.e. people can not upgrade or downgrade jruby-openssl in the moment !

@enebo enebo closed this in #1748 Jun 16, 2014
@enebo
Member
enebo commented Jun 16, 2014

Whoops until #1566 or #1706 is fixed I am re-opening.

@enebo enebo reopened this Jun 16, 2014
@mkristian mkristian closed this Jun 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment