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

require 'net/https' fails on 1.7.12 and master if jruby.native.enabled=false #1650

Closed
donv opened this issue Apr 21, 2014 · 5 comments
Closed
Labels
Milestone

Comments

@donv
Copy link
Member

donv commented Apr 21, 2014

This works fine on JRuby 1.7.11:

macbeth:~ uwe$ rvm use jruby
Using /Users/uwe/.rvm/gems/jruby-1.7.12
macbeth:~ uwe$ irb
jruby-1.7.12 :001 > require 'net/https'
 => true 
jruby-1.7.12 :002 > exit
macbeth:~ uwe$ rvm use jruby-head
Using /Users/uwe/.rvm/gems/jruby-head
macbeth:~ uwe$ irb
jruby-head :001 > require 'net/https'
 => true 
jruby-head :002 > exit
macbeth:~ uwe$ export JRUBY_OPTS="-J-Djruby.native.enabled=false"
macbeth:~ uwe$ rvm use jruby
Using /Users/uwe/.rvm/gems/jruby-1.7.12
macbeth:~ uwe$ irb
io/console not supported; tty will not be manipulated
jruby-1.7.12 :001 > require 'net/https'
LoadError: Native API access is disabled
    from org/jruby/RubyKernel.java:1065:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/ffi/ffi.rb:69:in `(root)'
    from org/jruby/RubyKernel.java:1065:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/ffi.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1065:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/ffi.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1065:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/krypt/provider/ffi.rb:1:in `(root)'
... 26 levels...
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/jopenssl19/openssl.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1101:in `eval'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/jopenssl19/openssl.rb:23:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/jopenssl/load.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/jopenssl/load.rb:20:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/openssl.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/openssl.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/1.9/net/https.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1501:in `loop'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/1.9/net/https.rb:22:in `(root)'
    from org/jruby/RubyKernel.java:1264:in `catch'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from (irb):1:in `evaluate'
    from org/jruby/RubyKernel.java:1264:in `catch'
    from /Users/uwe/.rvm/rubies/jruby-1.7.12/bin/irb:13:in `(root)'jruby-1.7.12 :002 > exit
macbeth:~ uwe$ rvm use jruby-1.7.11
Using /Users/uwe/.rvm/gems/jruby-1.7.11
macbeth:~ uwe$ irb
io/console not supported; tty will not be manipulated
jruby-1.7.11 :001 > require 'net/https'
 => true 
jruby-1.7.11 :002 > exit
macbeth:~ uwe$ rvm use jruby-head
Using /Users/uwe/.rvm/gems/jruby-head
macbeth:~ uwe$ irb
io/console not supported; tty will not be manipulated
jruby-head :001 > require 'net/https'
LoadError: Native API access is disabled
    from org/jruby/RubyKernel.java:847:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/ffi/ffi.rb:69:in `(root)'
    from org/jruby/RubyKernel.java:847:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/ffi.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:847:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/ffi.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:847:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/krypt/provider/ffi.rb:1:in `(root)'
... 26 levels...
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/jopenssl21/openssl.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:881:in `eval'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/jopenssl21/openssl.rb:23:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/jopenssl/load.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/jopenssl/load.rb:15:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/openssl.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/openssl.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/2.1/net/https.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1200:in `loop'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/2.1/net/https.rb:22:in `(root)'
    from org/jruby/RubyKernel.java:1011:in `catch'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in `(root)'
    from /Users/uwe/.rvm/rubies/jruby-head/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from (irb):1:in `evaluate'
    from org/jruby/RubyKernel.java:1011:in `catch'
    from /Users/uwe/.rvm/rubies/jruby-head/bin/irb:13:in `(root)'jruby-head :002 > exit
macbeth:~ uwe$ 
@mkristian
Copy link
Member

both jruby versions use krypt-0.0.2.rc1

from a brief look at the code there are some memory functions (malloc,
free, memcpy) used from FFI::Library::LIBC in
lib/ruby/shared/krypt/provider/ffi/ffi_helper.rb

this might be an issue for krypt.

@donv
Copy link
Member Author

donv commented Apr 25, 2014

I am working on getting SSL working on Ruboto (JRuby on Android), and this is a blocker. Is there anything I can do to work around or fix it?

@donv
Copy link
Member Author

donv commented May 2, 2014

Hi @mkristian and all!

Anything I can do to speed this along? Broken SSL should be a blocker for release.

@mkristian mkristian added this to the JRuby 1.7.13 milestone May 3, 2014
@enebo
Copy link
Member

enebo commented Jun 14, 2014

I did not see this until now. What needs to be done here? A new release of krypt and then we bundle it? cc @mkristian @donv

@mkristian
Copy link
Member

yes, a release of krypt and then we use the new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants