CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread Ion Scerbatiuc
Hello! I wrote a multithreaded server using OpenSSL v 0.9.7a (running on a RH Enterprise Linux 2.6.9-55.0.2.ELsmp). The problem is my server is crashing at random times (it could stay alive for 24 hours or can crash within 4 hours). Inspecting the cores file I found that it crashes in the same

RE: CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread Ion Scerbatiuc
Oh :) I forgot to mention that I instantiated those variables (it was like obvious for me). Here is the initialization code: int Server::TLS_init() {     int i;     mutex_buf = (pthread_mutex_t*) malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t));     if (mutex_buf == NULL) {     return

Re: RE: CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread Ion Scerbatiuc
There seems to be an error in my email client. There is an i(plus)(plus). - Original Message From: [EMAIL PROTECTED] To: openssl-users@openssl.org Date: Tue, 8 Apr 2008 12:50:07 0200 Subject: RE: CRYPTO_add_lock() segmentation fault (core dump included) Hello, Oh :) I forgot

RE: CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread Marek . Marcola
Hello, Oh :) I forgot to mention that I instantiated those variables (it was like obvious for me). Here is the initialization code: int Server::TLS_init() { int i; mutex_buf = (pthread_mutex_t*) malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); if (mutex_buf ==

Re: RE: CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread Ion Scerbatiuc
: CRYPTO_add_lock() segmentation fault (core dump included) Hello, Oh :) I forgot to mention that I instantiated those variables (it was like obvious for me). Here is the initialization code: int Server::TLS_init() {     int i;     mutex_buf = (pthread_mutex_t*) malloc

RE: CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread Mark
I wrote a multithreaded server using OpenSSL v 0.9.7a (running on a RH Enterprise Linux 2.6.9-55.0.2.ELsmp). The problem is my server is crashing at random times (it could stay alive for 24 hours or can crash within 4 hours). Inspecting the cores file I found that it crashes in the same

Re: CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread Geoff Thorpe
On Tue, 2008-04-08 at 03:35 -0500, Ion Scerbatiuc wrote: Hello! I wrote a multithreaded server using OpenSSL v 0.9.7a (running on a RH Enterprise Linux 2.6.9-55.0.2.ELsmp). The problem is my server is crashing at random times (it could stay alive for 24 hours or can crash within 4 hours).

Re: Re: CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread Ion Scerbatiuc
in advance Best regards, Ion - Original Message From: Geoff Thorpe To: openssl-users@openssl.org Date: Tue, 08 Apr 2008 10:44:35 -0400 Subject: Re: CRYPTO_add_lock() segmentation fault (core dump included) On Tue, 2008-04-08 at 03:35 -0500, Ion Scerbatiuc wrote: Hello! I wrote

Re: Re: CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread Geoff Thorpe
On Tue, 2008-04-08 at 10:04 -0500, Ion Scerbatiuc wrote: Thank you for your reply! You're welcome :-) I didn't find any refferences to CRYPTO_set_add_lock_callback() in openssl man pages nor the meaning of this functions/callbacks. Ahh, well once you start to understand this stuff better,

Re: CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread jimmy bahuleyan
Ion Scerbatiuc wrote: Thank you for your reply! I didn't find any refferences to CRYPTO_set_add_lock_callback() in openssl man pages nor the meaning of this functions/callbacks. I didn't understand what does CRYPTO_add_lock () do. CRYPTO_add_lock() does atomic additions (or subtractions). It

Re: CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread jimmy bahuleyan
jimmy bahuleyan wrote: Ion Scerbatiuc wrote: Thank you for your reply! I didn't find any refferences to CRYPTO_set_add_lock_callback() in openssl man pages nor the meaning of this functions/callbacks. I didn't understand what does CRYPTO_add_lock () do. CRYPTO_add_lock() does atomic

Re: CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread Ger Hobbelt
On Tue, Apr 8, 2008 at 12:10 PM, Ion Scerbatiuc [EMAIL PROTECTED] wrote: Oh :) [...] for (i = 0; i CRYPTO_num_locks(); i ) { Erm, shouldn't those two loops have an increment (i++ instead of just 'i') there, or is this a copypaste-in-email failure? ;-) -- for (i = 0; i

Re: Re: CRYPTO_add_lock() segmentation fault (core dump included)

2008-04-08 Thread Ion Scerbatiuc
Yes, there is copypaste-in-email failure :) - Original Message From: Ger Hobbelt To: openssl-users@openssl.org Date: Tue, 8 Apr 2008 12:36:27 0200 Subject: Re: CRYPTO_add_lock() segmentation fault (core dump included) On Tue, Apr 8, 2008 at 12:10 PM, Ion Scerbatiuc wrote: Oh