Lukas Gebauer wrote: > First idea - are you sure if is write/writeln call thread safe? I > remember funny error in some old FPC when writeln was called inside > thread. It reset socket LastError and Synapse was mangled. So, try to > call wrie/writeln by some thread-safe way.
I can reproduce the crash with no calls to write/writeln. > Otherwise it's looks like some multithreaded problem inside Openssl. > OpenSSL provides some hooks for external locks. But synapse using it! > See InitLocks procedure inside ssl_openssl_lib.pas. > > Please, check: > > - if this procedure is called. (If not, then shared library does not > export needed functions.) InitLocks is called and there are lots of calls to locking_callback during https traffic. > - if is called, check TCriticalSection class implementation for your > platform. TCriticalSection works well on Linux in other software, I've written with both FPC and Kylix. If I add an extra TCriticalSection around any socket calls in the httpsserv demo (create, init, read, write and getpeer), it doesn't crash any more. However, that's not a good fix as at that point the server is basically just a single thread implementation. /jarto ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ synalist-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synalist-public
