Closed monban closed 10 years ago
Interesting. I'm seeing this with Ruby 2.1.1 on OS X 10.9.2 as well. I thought maybe it was caused by the small test key size, so I just tested with 512, 1024, and 2048 bit keys. All of those sizes failed too.
I'm closing this issue since it's informational and fixed in upstream Ruby. Thanks for the detailed report!
Ruby 2.1.3 Rails 4.1.6 OS X 10.9.5
Not using vines myself, but this is the only place I've seen this error also reported. Originally saw on ruby 2.1.2, I was not able to resolve by upgrading to 2.1.3.
In a separate project I'm seeing same problem when executing
OpenSSL::PKey::RSA.generate(1024) => OpenSSL::PKey::RSAError: BN lib
via an after_create:
rails callback within a loop. Occurs 100% on the second or third iteration.
Curiously, I cannot reproduce in console via loop
10000.times { OpenSSL::PKey::RSA.generate(256) }
I am able to work around by adding:
sleep(0.1)
within the loop.
I suspect it's something related to random key generation using the system clock within ruby-openssl.
@bmishkin I'm having the same issue. were you able to resolve it? what compiler did you use to compile ruby? one way to find out is printing the configuration options:
ruby -e 'puts RbConfig::CONFIG["configure_args"]'
@dcu compiled via gcc
yes, the sleep()
resolved it for me
Ubuntu 14.04 Ruby 2.1.2 Vines HEAD
80% of the time, all 900 assertions run without issue, 20% of the time I get this:
Seems to be some kind of race condition? It does not always occur with the same seed. I am also NOT able to reproduce it by doing this:
That runs flawlessly every time.
Funny note, the bug does NOT appear on Ruby HEAD. The shipping version of eventmachine does not compile against Ruby HEAD, but the latest version from the repo DOES, so it might be related to eventmachine#457?
In any event the problem will likely resolve itself with new versions of Ruby, and I'm not sure if this happens in actual production (haven't seen it yet) or just because of the way this test is run. This is mostly for documentation purposes if (when) people see it running Vines on Ruby 2.1.2.