On Friday 21 November 2008 14:41:08 Max Pala wrote: > Hi Sander, > > I debugged the init process and it seems that you were right. The > disable_mutex_callbacks is set to 1 at e_chil.c:578. Definitely it > is due to initialization, at this point... > > ... looked into that, and... et voilas! Found the problem! The PRE > commands were wrong. Indeed the following: > > 5.engine_pre = THREAD_LOCKING:1 > > caused the disable_mutex_callbacks to be set to 1, therefore no > callbacks were used! Ahhhh... what a nightmare! If you want to be > sure, you can set it to 0: > > 5.engine_pre = THREAD_LOCKING:0 > > Przemek, this should solve also your problem - so you can enable > multiple threads and get rid of your 'lock' around the signing > function. > > I think that the config variable should have been called: > > DISABLE_THREAD_LOCKING > > because if THREAD_LOCKING is set to 1 - then the > disable_mutex_callbacks is set to 1.. which should be the contrary > (developer's error ?).
Yeah, that's unfortunate. Glad you found the problem. > > Very confusing... and besides, it should give out some warning!!! > Anyhow, now the callbacks are called, and the server seems to run > pretty ok with a relatively large amount of threads (150). But I still > have to stress-test it... > > Thanks to all of you who helped me - now I have a single file with > the code for OpenSSL and pthreads, both static and dynamic locks.. > > Shall we include it into OpenSSL ? > > void OpenSSL_pthread_init( void ); As I stated in another post, I'm looking to overhaul the way certain "infrastructure" is setup - ie. right now; static locks, dynamic locks, memory allocation, thread IDs, ex_data, [...] are all specified independently - despite the fact they often need to be mutually-compatible. So I'm looking at combining these into "platforms". My motivation is async-crypto, which requires additional infrastructure that adds to the mutual-compatibility requirements. In doing so, it'll be easier to provide pre-packaged platforms that include plug-in implementations for these things (eg. a pthreads platform, win32 platform, whatever). It should also be possible to specify default platforms from the Configure target, without limiting application ability to override. If only there were more hours in the day ... Do you agree with Sander's patch suggestion? If so, I'll put that into 0.9.8-stable and HEAD. Cheers, Geoff -- Un terrien, c'est un singe avec des clefs de char... ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]