Hi, The SSL enabled client application seg faults when too many threads are created. Each thread is a SSL client attempting a connection with Server. The application sets the static call back functions.:
static void locking_function(int mode, int n, const char * file, int line) static unsigned long id_function(void) The application creates about 800 threads in a Linux 2.6 Kernel. #0 SHA1_Init (c=0x0) at sha_locl.h:150 #1 0x405b2bb0 in init (ctx=0x0) at m_sha1.c:72 #2 0x405afc91 in EVP_DigestInit_ex (ctx=0x4d606230, type=0x4061f620, impl=0x0) at digest.c:207 #3 0x405ac08e in ssleay_rand_add (buf=0x0, num=0, add= 2.5863007356866632e-306) at md_rand.c:263 #4 0x405ace6e in RAND_add (buf=0x8a269f8, num=144861688, entropy=0) at rand_lib.c:151 #5 0x08a269f8 in ?? () #6 0x08a269f8 in ?? () #7 0x00000000 in ?? () When less number of threads are created I don't see the issue. How do we use CRYPTO_set_idptr_callback()? OpenSSL document reads - " There is still the issue of platforms where pthread_self() returns something other than an integer. It is for cases like this that CRYPTO_set_idptr_callback() comes in handy" Regards, Prabhu. S