Hi,

I wrote a server app to use multiple threads. Each thread has it's own
SSL context and perform all the socket (socket,accept) and SSL
(SSL_accept) tasks. I implemented the dynamic lock mechanism for multi
thread support.

I can start the server with the 1000 threads (one for each required
port) that we need, but found that it fails if I try 1500. Now I am
afraid that the 1000 threads may also become unstable with continuous
use. This failure occurs when all the threads are listening and I open a
single connection to one of them. That is: there is no load.

I tracked the bug with gdb and found that it fails in RAND_poll(),
called from SSL_accept(), when a new session key is generated. The
strange thing is that after the file descriptor set is zeroed
[(FD_ZERO(&fset)] the call [FDSET(fd,&fset)] to add the random device's
file descriptor does not work. The set remains zeroed and once the
select() has executed using this set, most of the parameters including
the random devices file descriptor, becomes zeroed (NULL).

It looks as if something is overrunning my stack - any ideas as to how
to get the sucker? I had the same results on a dual xeon as well as a
Athlon box. Using 0.9.7e.

Please ignore the design - it is suppose to be experimental. 

Thanks
Leon


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to