Re: ssh-keygen freezes if you force use of engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux