cURL / Mailing Lists / curl-library / Single Mail

curl-library

OpenSSL thread-safety callbacks on AIX

From: Andrei Tarassov <andrei.tarassov_at_altiris.ee>
Date: Sat, 1 Oct 2005 12:20:50 +0200

Hi!

I am setting the callback functions, which should make openssl stuff thread-safe as described by http://www.openssl.org/docs/crypto/threads.html , but these functions just do not seem to be called on AIX. At the same time, the same test program works correctly (i.e. the callbacks are called) on Linux. Because of these problems our application crashes sometimes when downloading files from https servers in a multi-threaded environment.

Any ideas why this could happen?

Some details:

The program uses openssl 0.9.7g through curl 7.14.0. AIX version 4.3.3.

OpenSSL was built with the following configuration:

./config threads no-asm no-shared no-zlib no-idea no-mdc2 no-rc5 no-ec no-krb5 -D_THREAD_SAFE

Curl was build with the following configuration:

./configure --prefix=/opt/3rdparty/curl/7.14.0 \
--with-ssl=/opt/3rdparty/openssl/0.9.7g --without-zlib \
--without-ca-bundle --enable-static --disable-gopher \
--disable-ares --without-libidn --enable-http --enable-ftp \
--enable-file --disable-ldap --disable-telnet \
--disable-dict --enable-thread --disable-debug \
--enable-shared --disable-manual --disable-ipv6

BTW, we've noticed that libcurl is linked to libgcc_s.a, while for thread safety it should be linked with libgcc_s_pthread.a. We tried to relink the library, but it did not help to solve the above mentioned problem.

Thanks,

--
ANDREI TARASSOV
Software Engineer III
Altiris OÜ
T >  +372 6507154
M >  +372 53403298
www.altiris.com
Received on 2005-10-01