cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl + OpenSSL + threads...

From: Bob Jones <bob_jones06810_at_yahoo.com>
Date: Tue, 26 Dec 2006 18:58:51 -0800 (PST)

Hello,

I am experiencing a crash when attempting a standard
HTTPS operation with libcurl. The page fetches fine
but the program crashes when I call
curl_easy_cleanup(). This is all running inside a
multi-threaded application, but in this case only one
thread is dealing with libcurl and there are no race
conditions or conflicts. CURL objects are isolated to
a particular function call and never passed around.
CURL is initialized in main() before threads exist.

Vitals:

curl: 7.16.0
configured with: ../configure --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--enable-sh
ared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit --disable-
libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada
--e
nable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
--with-cpu=gen
eric --host=i386-redhat-linux
os: fedora 5
openssl: 0.9.8a
trace:

#0 0x007dd6de in ASN1_STRING_free () from
/lib/libcrypto.so.6
#1 0x007d4495 in ASN1_primitive_free () from
/lib/libcrypto.so.6
#2 0x007d4771 in ASN1_primitive_free () from
/lib/libcrypto.so.6
#3 0x007d484b in ASN1_template_free () from
/lib/libcrypto.so.6
#4 0x007d4751 in ASN1_primitive_free () from
/lib/libcrypto.so.6
#5 0x007d4893 in ASN1_item_free () from
/lib/libcrypto.so.6
#6 0x007cf2d7 in X509_free () from
/lib/libcrypto.so.6
#7 0x007b7c13 in sk_pop_free () from
/lib/libcrypto.so.6
#8 0x0012d758 in ssl_sess_cert_free () from
/lib/libssl.so.6
#9 0x0012e365 in SSL_SESSION_free () from
/lib/libssl.so.6
#10 0x0012be1d in SSL_free () from /lib/libssl.so.6
#11 0x005f190d in Curl_ossl_close (conn=0x8d5f550) at
ssluse.c:720
#12 0x00602746 in Curl_ssl_close (conn=0x8d5f550) at
sslgen.c:389
#13 0x005eb8b4 in Curl_disconnect (conn=0x8d5f550) at
url.c:1799
#14 0x005ebbfc in ConnectionKillOne (data=0x8d57010)
at url.c:2140
#15 0x005efc27 in Curl_close (data=0x8d57010) at
url.c:212
#16 0x005faba1 in curl_easy_cleanup (curl=0x8d57010)
at easy.c:494

This is repeatable every time. The crash does not
occur if I isolate the code within a separate,
single-threaded application that does nothing else.

I am new to curl - did I compile something wrong?
I've also tried giving OpenSSL the thread-safety
callbacks it needs but the crash continues. I have
verified OpenSSL is calling the callbacks and locking
pthread_mutex_t's as necessary.

Thanks for any assistance!

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Received on 2006-12-27