Daniel Stenberg <[email protected]> wrote:

> On Thu, 5 Jun 2014, Fabian Keil wrote:
> 
> >> I assume that's because the info() call has the side effect of
> >> slightly delaying Curl_addHandleToPipeline(), but I haven't confirmed
> >> that.
> >
> > The attached patch uses wait_ms(1) instead of info() and works around
> > the problem as well, so I consider this theory confirmed.
> 
> Oh yes indeed. Annoying. I still wonder if this is truly a problem on
> that platform in real-life or only a test problem... that is not
> terribly easy to tell.
> 
> Regarding the patch, we do have a portable Curl_wait_ms() function that
> could be used.

Good to know, I updated the patch.

BTW, I also noted that the test sometimes takes longer than usual,
causing the estimated remaining time to go up:

test 584...[HTTP GET using pipelining (nonzero length after zero length)]
sp----em-- OK (5   out of 50 , remaining: 00:29)
test 584...[HTTP GET using pipelining (nonzero length after zero length)]
sp----em-- OK (6   out of 50 , remaining: 00:25)
test 584...[HTTP GET using pipelining (nonzero length after zero length)]
sp----em-- OK (7   out of 50 , remaining: 00:22)
test 584...[HTTP GET using pipelining (nonzero length after zero length)]
sp----em-- OK (8   out of 50 , remaining: 00:20)
test 584...[HTTP GET using pipelining (nonzero length after zero length)]
sp----em-- OK (9   out of 50 , remaining: 00:18)
test 584...[HTTP GET using pipelining (nonzero length after zero length)]
sp----em-- OK (10  out of 50 , remaining: 00:17)
test 584...[HTTP GET using pipelining (nonzero length after zero length)]
sp----em-- OK (11  out of 50 , remaining: 00:15)
test 584...[HTTP GET using pipelining (nonzero length after zero length)]
sp----em-- OK (12  out of 50 , remaining: 00:18)
test 584...[HTTP GET using pipelining (nonzero length after zero length)]
sp----em-- OK (13  out of 50 , remaining: 00:16)
test 584...[HTTP GET using pipelining (nonzero length after zero length)]
sp----em-- OK (14  out of 50 , remaining: 00:15)
test 584...[HTTP GET using pipelining (nonzero length after zero length)]
sp----em-- OK (15  out of 50 , remaining: 00:14)
test 584...[HTTP GET using pipelining (nonzero length after zero length)]
sp----em-- OK (16  out of 50 , remaining: 00:14)

I do not know what's causing this yet and it may have nothing to
do with the problem.

Unfortunately runtests.pl's "-rf" option doesn't properly work when
running the same test multiple times. The test number is used as hash key,
so only the last measurement is stored until the end.

Fabian
From a3a61cbcce394653f2cb4ba5a8bdd58ac839fca8 Mon Sep 17 00:00:00 2001
From: Fabian Keil <[email protected]>
Date: Wed, 22 Jan 2014 14:33:14 +0100
Subject: [PATCH] Delay Curl_addHandleToPipeline() by a milisecond

Work-around to get test 584 working reliably on FreeBSD 11-CURRENT
again after 5b2342d3772 removed a couple of log messages which made
the function faster.
---
 lib/url.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/url.c b/lib/url.c
index 770b0cc..34773f5 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2728,6 +2728,7 @@ CURLcode Curl_addHandleToPipeline(struct SessionHandle *data,
 {
   if(!Curl_llist_insert_next(pipeline, pipeline->tail, data))
     return CURLE_OUT_OF_MEMORY;
+  Curl_wait_ms(1);
   return CURLE_OK;
 }
 
-- 
1.9.0

Attachment: signature.asc
Description: PGP signature

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

Reply via email to