>Gleb Esman wrote:
> >
> > Sorry I was typing with my head upside-down.
> > I am using OpenSSL 0.9.4.
> >
> > Where the one could get 0.9.5 from?
> >
> > Anyone here actually uses OpenSSL for multithreaded apps?
> >
> > When i saw so many global variables in use in SSL sources,
> > my hope for real multithreading of SSL is quickly depleting.
> >
>
>They shouldn't be. OpenSSL is used in several multithreaded applications
>including some commercial SSL servers.
>
>Steve.
I can't see how OpenSSL is thread safe, when lots of functions
are modifying and depends on the value of the global variables.
By looking into few source files, i didn't find any thread
synchronization mechanisms to protect these variables against
being corrupted by multiple threads.
MSVC++ 6 debugger consistently displays the problem with invalid
pointer and memory access violation after calling
CRYPTO_realloc() (crypto\mem.c) and some other SSL's
memory management functions.
After I tracked down the source of bug - it leaded me to the
variable, declared as 'static'.
I do not have 2 or 3 threads in my case. Here are about
100 to 200 threads running together and often on a multi-CPU
machine. Each thread opens it's own socket (nothing is shared between
threads),
connects to the server and issues a couple of SSL_read/write calls.
That's it. There is no rocket science in my app.
Just more threads than in average app.
If there is a potential for the good will from the OpenSSL
development team, I could probably cut-down my sources to
demonstrate a problem.
Thanks!
--
Gleb Esman
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]