cURL / Mailing Lists / curl-library / Single Mail

curl-library

29bf0598aad5 breaks test harness (at least test 107)

From: Tor Arntsen <kspt.tor_at_gmail.com>
Date: Tue, 4 Jun 2013 12:58:05 +0200

Commit 29bf0598aad5 makes test 107 (and possibly others) hang forever.
Notice that today's autobuild page doesn't have any reports from tests
actually running the test harness.. all of mine were hanging all
night, irix/aix/x86-64.

The cause appears to be this:

index ef40383..e4b3369 100644
--- a/lib/multi.c
+++ b/lib/multi.c
..
+ /* If the internally desired timeout is actually shorter than requested from
+ the outside, then use the shorter time! */
+ (void)multi_timeout(multi, &timeout_internal);
+ if(timeout_internal < (long)timeout_ms)
+ timeout_ms = (int)timeout_internal;
+

When it hangs I get this backtrace:
#1 0x00002adb706d243c in Curl_poll (ufds=0x1002968, nfds=1,
timeout_ms=-1) at select.c:397
#2 0x00002adb706ca0aa in curl_multi_wait (multi_handle=0xff7b98,
extra_fds=0x0, extra_nfds=0, timeout_ms=-1, ret=0x7fff9f50fe7c) at
multi.c:908
#3 0x00002adb706c0c99 in curl_easy_perform (easy=0xfee588) at easy.c:463
#4 0x000000000041098a in operate (config=0x7fff9f510360, argc=10,
argv=0x7fff9f5107e8) at tool_operate.c:1361
#5 0x000000000040ba55 in main (argc=10, argv=0x7fff9f5107e8) at tool_main.c:103

Note the timeout of -1, it's passed on (indirectly) to poll(2)
whichmakes it wait forever and that at least doesn't work for test
107.

-Tor
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-06-04