Bignum is not thread-safe

2006-12-09 Thread Michal Trojnara
Dear OpenSSL users, When performing stress-testing of stunnel with session cache disabled I receive core dumps on concurrent SSL_connect() calls. Here is an example stack backtrace: #0 0xa7e60d41 in BN_ucmp (a=0x80a28fc, b=0x80a1f08) at bn_lib.c:662 662 bn_check_top(b); (gdb) bt #0

Re: Bignum is not thread-safe

2006-12-09 Thread Ben Sandee
On 12/9/06, Michal Trojnara <[EMAIL PROTECTED]> wrote: The library is OpenSSL 0.9.8d configured with: ./Configure threads shared zlib debug-linux-elf Can you help me find a solution or a better workaround? Did you set the threading/locking callbacks to valid implementations? (for reference,

Re: Bignum is not thread-safe

2006-12-11 Thread Michal Trojnara
Michal Trojnara wrote: > On Sunday 10 December 2006 00:42, Ben Sandee wrote: >> On 12/9/06, Michal Trojnara wrote: >> > The library is OpenSSL 0.9.8d configured with: >> > ./Configure threads shared zlib debug-linux-elf >> > >> > Can you help me find a solution or a better workaround? >> >> Did you

Re: Bignum is not thread-safe

2006-12-11 Thread Marek Marcola
Hello, > Aren't these statements mutually exclusive? How can the dynamic locks be > "needed" and "not used" at the same time? Do I have to support them or > not? I'm confused... No. Dynamic callbacks are used by some ENGINE modules (NCipher for example). Best regards, -- Marek Marcola <[EMAIL

Re: Bignum is not thread-safe

2006-12-11 Thread Michal Trojnara
Marek Marcola <[EMAIL PROTECTED]> wrote: > > Aren't these statements mutually exclusive? How can the dynamic locks be > > "needed" and "not used" at the same time? Do I have to support them or > > not? I'm confused... > No. Dynamic callbacks are used by some ENGINE modules (NCipher for > example

Re: Bignum is not thread-safe

2006-12-11 Thread Nils Larsch
Michal Trojnara wrote: Dear OpenSSL users, When performing stress-testing of stunnel with session cache disabled I receive core dumps on concurrent SSL_connect() calls. Here is an example stack backtrace: #0 0xa7e60d41 in BN_ucmp (a=0x80a28fc, b=0x80a1f08) at bn_lib.c:662 662 bn_c

Re: Bignum is not thread-safe

2006-12-11 Thread Michal Trojnara
On Monday 11 December 2006 18:03, Nils Larsch wrote: > does it help is you build openssl without BN_DEBUG ? When BN_DEBUG > is defined bn_check_top() is a macro that should check if the BIGNUM::top > value is correclty set (note: this isn't really a solution as > bn_check_top() (without BN_DEBUG_RA

Re: Bignum is not thread-safe

2006-12-13 Thread Michal Trojnara
On Sunday 10 December 2006 00:19, Michal Trojnara wrote: > Calling SSL_connect() and SSL_accept() from a critical section helps a > little. Instead of core dumps I get the following errors: > > SSL_connect: 1408C095: > error:1408C095:SSL routines:SSL3_GET_FINISHED:digest check failed I've found an