cURL / Mailing Lists / curl-library / Single Mail

curl-library

Intermittent write errors while doing a PUT operation in 7.27.0

From: Gautam Gopinadhan <gautamvsg_at_yahoo.com>
Date: Thu, 18 Oct 2012 01:36:17 -0700 (PDT)

Hello, We have been using the curl library since some time now. The version that we are currently using is 7.21.6 and we are attempting to update our curl library to 7.27.0. Platform is linux (centos/redhat) We build the library using: ./configure --with-ssl --enable-ares --without-libidn --disable-ldap And then our application links with libcurl.a (and libcares.a) statically. The version of c-ares being used is the latest. Our software uses the curl_easy API. Our test code which wraps around curl, essentially does a PUT operation to an HTTPS server in the cloud by doing the following approximately: curl_easy_init(); while(i < 100) {     curl_easy_reset();     curl_easy_setopt(url);     curl_easy_setopt(PUT operation);     // also set a few more setopt options..     curl_easy_perform();     i ++; } curl_easy_destroy(); When linked with any version of libcurl until and including 7.23.1, our test code functions exactly as expected - it sends data to the server successfully on every attempt. However from version 7.24.0 onwards, we notice that intermittently one odd connection errors out (after a 60 second timeout due to a setopt) waiting for a 200OK response from the server. When viewing the backtrace for a specific failed connection, it seems to wait forever with this backtrace signature. (The line number correspond to 7.27.0) (gdb) bt #0  0x0000003dca8dc053 in poll () from /lib64/libc.so.6 #1  0x0000000000585fc0 in Curl_socket_check (readfd0=315, readfd1=-1, writefd=-1, timeout_ms=1000) at select.c:216 #2  0x00000000005b9316 in Transfer (conn=0x7fadb40012c8) at transfer.c:1384 #3  0x00000000005ba2f6 in Curl_do_perform (data=0x7fadb00008e8) at transfer.c:2109 #4  0x00000000005ba5ac in Curl_perform (data=0x7fadb00008e8) at transfer.c:2233 #5  0x000000000057c355 in curl_easy_perform (curl=0x7fadb00008e8) at easy.c:536 This seems to indicate that the thread is waiting for a 200OK from the server after having performed a write.  An interesting observation is that I'm able to recreate this error very consistently and the error happens at the exact same index in the pseudo code while loop above. As mentioned, this is never seen on libcurl 7.23.1 and lower, but it is always seen on all version 7.24.0 and above. A code inspection of hte transfer.c code or the polling code in select.c did not raise any alarm flags..  Any pointers on what might be going on here is appreciated.. Thanks, Gautam

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