cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: block process when call curl_easy_perform

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 19 Oct 2011 13:10:30 -0700

On Wed, Oct 19, 2011 at 05:18:45PM -0200, guilherme linhares wrote:
> Well, i change my code to use libcurl's multi interface.
> Now i call a new thread to do:
>
> - curl_easy_init();
> - curl_easy_setopt();
> - curl_multi_add_handle();
> - curl_multi_perform();
> - curl_multi_fdset();
> - curl_easy_getinfo();

Have you read the documentation on using libcurl with threads and are you
following all the recommendations? Specifically, are you calling
curl_global_init in your main thread first and are you setting the
OpenSSL locking functions?

> In this scenario when i add 2 or more handles in the same time and do
> curl_multi_perform();
>
> I get this errors in the log
>
> == Info: Expire cleared
> == Info: Connection #0 to host 192.168.160.158 left intact
> == Info: SSLv?, Unknown (2):
> == Info: SSL read: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version
> number, errno 0
> == Info: SSL read: error:140D2081:SSL routines:TLS1_ENC:block cipher pad is
> wrong, errno 0
> == Info: Expire cleared
> == Info: Empty reply from server
> == Info: Connection #1 to host 192.168.160.158 left intact
> == Info: Internal error removing splay node = 1

This looks like a serious problem--there should never be any internal
errors. What libcurl operations are occurring in other threads while
this one runs? Can you show us the source code to a program that can reliably
reproduce this?

> I use libcurl 7.19.4 openssl-0.9.7m

These are both fairly old versions. Have you tried newer versions to see if you
still have issues?

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-19