cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_easy_perform() occasionally not failing immediately from progress callback (test 1513)

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Thu, 10 Jul 2014 16:02:11 +0200

Recently I noticed that test 1513 is unreliably on FreeBSD 11-CURRENT,
occasionally failing like this:

####
test 1513...[return failure immediately from progress callback]

lib1513 returned 7, when expecting 42
 exit FAILED
== Contents of files in the log/ dir after test 1513
=== Start of file stderr1513
 URL: http://localhost/1513
=== End of file stderr1513
####

I found a similar report for Solaris from March, and given that no
fix was reported, I assume it's the same issue:
http://curl.haxx.se/mail/archive-2014-03/0060.html

The problem seems to be that the CURLOPT_PROGRESSFUNCTION isn't always
called, with the attached patch #1 a test failure looks like this:

####
test 1513...[return failure immediately from progress callback]
core dumped

lib1513 returned 2006, when expecting 42
 exit FAILED
== Contents of files in the log/ dir after test 1513
=== Start of file stderr1513
 URL: http://localhost/1513
 Assertion failed: (processKiller_calls != 0), function test, file lib1513.c, line 76.
=== End of file stderr1513
####

Using CURLOPT_XFERINFOFUNCTION instead of CURLOPT_PROGRESSFUNCTION
(patch #2) doesn't make a difference and looking at the libcurl code
that's not too surprising.

Using curl_easy_perform_ev() instead of curl_easy_perform()
(patch #3) does not completely work around the problem, either,
but the test appears to fail less often.

A couple of results using curl_easy_perform():
TESTDONE: 79 tests out of 100 reported OK: 79%
TESTDONE: 118 tests out of 150 reported OK: 78%
TESTDONE: 948 tests out of 1000 reported OK: 94%

A couple of results using curl_easy_perform_ev():
TESTDONE: 100 tests out of 100 reported OK: 100%
TESTDONE: 148 tests out of 150 reported OK: 98%
TESTDONE: 994 tests out of 1000 reported OK: 99%

For my contract the bug isn't relevant so it may take me a
while to investigate this any further.

Fabian

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2014-07-10