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

Possible test deadlock #214

Closed
voxik opened this issue Aug 13, 2018 · 0 comments
Closed

Possible test deadlock #214

voxik opened this issue Aug 13, 2018 · 0 comments

Comments

@voxik
Copy link

voxik commented Aug 13, 2018

Testing on Fedora Rawhide with stronger crypto settings

# update-crypto-policies --set NEXT

I observe the following deadlock in OpenSSL test suite:

[ 1337/17319] OpenSSL::TestPair#test_connect_accept_nonblock#<Thread:0x000055555c3ad548@/builddir/build/BUILD/ruby-2.5.1/test/openssl/test_pair.rb:452 run> terminated with exception (report_on_exception is true):
/builddir/build/BUILD/ruby-2.5.1/test/openssl/test_pair.rb:453:in `initialize': SSL_CTX_use_certificate: ee key too small (OpenSSL::SSL::SSLError)
	from /builddir/build/BUILD/ruby-2.5.1/test/openssl/test_pair.rb:453:in `new'
	from /builddir/build/BUILD/ruby-2.5.1/test/openssl/test_pair.rb:453:in `block in test_connect_accept_nonblock'

Apparently, the thread crashes, because the DH key is too small, therefore the s2.accept_nonblock [1] is waiting for connection indefinitely. There should be either timeout, the crash of the th thread should be fatal or the state of the th thread should be checked.

rhenium added a commit to rhenium/ruby-openssl that referenced this issue Aug 16, 2018
Call IO.select with a timeout value and limit the number of retries to
prevent stacking forever.

Reference: ruby#214
mame pushed a commit to mame/openssl that referenced this issue May 28, 2019
Call IO.select with a timeout value and limit the number of retries to
prevent stacking forever.

Reference: ruby#214
@rhenium rhenium closed this as completed Apr 21, 2020
junaruga pushed a commit to junaruga/ruby that referenced this issue Sep 14, 2020
Call IO.select with a timeout value and limit the number of retries to
prevent stacking forever.

Reference: ruby/openssl#214
rhenium added a commit to rhenium/ruby-openssl that referenced this issue Sep 26, 2021
[ This is a backport to the 2.1 branch. ]

Call IO.select with a timeout value and limit the number of retries to
prevent stacking forever.

Reference: ruby#214
(cherry picked from commit b0bcb19)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants