-
-
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
OpenSSL::Cipher#random_iv Regression in 9.1.14.0 #4857
Comments
This seems to only occur when installing with RVM. When downloading and running from the included binary file it's working as expected. I'm puzzled as to why this would be the case.
|
Run the slow case with the following flag, so we can get some lower-level profiling: If it's running that long it should be pretty obvious what it's spending its time on. The main differences I can think of when installing via RVM would be the default gem set and the jruby-launcher gem. The latter is our native executable; to be portable, the tarball does not normally include it. RVM installs it when installing JRuby, since there's some use cases that don't work with the bash script. But this doesn't give me any idea why there's such a big difference. |
this seems like (yet another) depleting entropy issue. although you have java.security setup properly |
@kares @HarlemSquirrel I discovered that the https://bugs.openjdk.java.net/browse/JDK-6202721 The workaround there is what I'm using for JRuby 9.1.15 in the launchers: specify the path in such a way that the JDK can't detect it, such as |
@headius EPIC find :) ... this must be it than, or not? |
I'm getting the following from visualvm I set Here's the sample output when running
https://gist.github.com/HarlemSquirrel/112821bdf3fe2b9d6446867329daf4b4 |
Ah-ha! All those tldr: if This seems like it could be related, but I don't understand why it would work with our tarball and not with an RVM install. |
Here's another interesting article that shows how to test whether entropy is being exhausted, along with other tips: https://liuzy163.wordpress.com/2015/03/20/tomcat-server-slow-due-to-blocked-seedgenerator-thread-on-insufficient-random-number-on-linux/ |
I think I know the connection! You are not running 9.1.15.0, which includes the urandom change in the jruby bash script. However when you install from RVM, it installs jruby-launcher...which does have the urandom change. So something about the way I'm setting security to use urandom is wrong. I confirmed I'm seeing these threads locally, and my local startup is also slower (I thought I just messed up my env). I would recommend doing installing the 1.1.2 version of jruby-launcher gem, which should overwrite the one with the urandom tweak. I'll figure out what's wrong with it and spin a new release. |
Apparently the JDK will fail to use the egd path without a file URL. Stop the madness! See https://bz.apache.org/bugzilla/show_bug.cgi?id=56139
I've fixed this in jruby-launcher 1.1.4. Please confirm it both works and doesn't run out of entropy (i.e. the urandom setting is still working). |
@headius you, sir, are the man! That seems to have done it.
|
OpenSSL::Cipher#random_iv
is about 12x slower for me on Ubuntu 16.04 with OpenJDK 1.8.0_151.I have java set to use
/dev/urandom
instead of/dev/random
.JRuby 9.1.13.0
JRuby 9.1.14.0
The text was updated successfully, but these errors were encountered: