ssh-keygen freezes if you force use of engine
Jordan Brown
openssl at jordan.maileater.net
Wed Nov 6 16:34:04 UTC 2019
On 11/6/2019 3:03 AM, Frederick Gotham wrote:
>> I used GDB on the core file and saw the following backtrace:
>
> I think I'm actually getting a stack overflow from "openssl_config_int"
> calling "OPENSSL_init_crypto" because of the recursion.
No, a stack overflow would be much deeper.
> #0 0x00007f656e35e3c7 in __pthread_once_slow () from /lib/libpthread.so.0
> (gdb) bt
> #0 0x00007f656e35e3c7 in __pthread_once_slow () from /lib/libpthread.so.0
> #1 0x00007f656f730fbe in CRYPTO_THREAD_run_once () from ./libcrypto.so.1.1
> #2 0x00007f656f6d5c80 in OPENSSL_init_crypto () from ./libcrypto.so.1.1
> #3 0x00007f656f66163b in openssl_config_int () from ./libcrypto.so.1.1
> #4 0x00007f656f6d56cf in ossl_init_config_ossl_ () from ./libcrypto.so.1.1
> #5 0x00007f656e35e407 in __pthread_once_slow () from /lib/libpthread.so.0
> #6 0x00007f656f730fbe in CRYPTO_THREAD_run_once () from ./libcrypto.so.1.1
> #7 0x00007f656f6d5c80 in OPENSSL_init_crypto () from ./libcrypto.so.1.1
> #8 0x000055a8d125708b in main ()
Note that __pthread_once_slow is in the stack twice, called from
OPENSSL_init_crypto and CRYPTO_THREAD_run_once.
"once" functions ensure that they call their function argument exactly
once, even if they are called multiple times in parallel while their
function is running. They do that by locking a mutex around the
execution of the function. The second call attempted to lock the mutex
to wait for the first call to complete, and deadlocked.
--
Jordan Brown, Oracle ZFS Storage Appliance, Oracle Solaris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20191106/e7b49105/attachment.html>
More information about the openssl-users
mailing list