cURL / Mailing Lists / curl-library / Single Mail

curl-library

Segmentation Fault with pthreads and https

From: Jan Kammerath <jankammerath_at_googlemail.com>
Date: Mon, 13 Feb 2012 21:12:14 +0100

Dearest Friends of cURL,

I am having issues with libcurl in c++ processing https requests
within pthreads. Whenever I call it synchronously it works fine for
me, but calling it within pthreads it throws segmentation faults. My
code is published under MPL and therefore it would be nice if someone
could take a look into it:
http://code.google.com/p/kammerath-network-collector/source/browse/src/kammerath-network-collector.cpp#121

The actual method that calls the cURL library can be found here:
http://code.google.com/p/kammerath-network-collector/source/browse/src/lib/GoogleAnalyticsClient.cpp#280

I already undertook certain actions to try to solve the segmentation
faults which included...

1) using different cURL handles - which I do by creating new instances
of the GoogleAnalyticsClient class
2) cross checking all other sources of potential segmentation faults,
but I found the segmentation fault directly occurs within
"curl_easy_perform"
3) reinstalling libcurl, curl and devel packages with my package manager

Here are some system information as well:
Linux tpad.internal.kammerath.net 3.1.9-1.4-desktop #1 SMP PREEMPT Fri
Jan 27 08:55:10 UTC 2012 (efb5ff4) x86_64 x86_64 x86_64 GNU/Linux
g++ (SUSE Linux) 4.6.2
curl 7.22.0 (x86_64-unknown-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.0e
zlib/1.2.5 c-ares/1.7.5 libidn/1.22 libssh2/1.2.9
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps
pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz

It's quite awhile ago now that I last posted to mailing lists and
hopefully I did nothing wrong although I read the etiquette. Any help
on this is highly appreciated as I love curl and am stuck with this
segmentation fault issue since a few days now.

Thank you all very, very much in advance!

Jan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-13