cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: New pipelining patch

From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Thu, 28 Feb 2013 11:28:26 +0100

On 02/27/2013 06:47 PM, Joe Mason wrote:
> Now, test530 returns data broken up between requests in a weird way:

Yes, test 530 is an old test, using the old HTTP test server, which
doesn't support pipelining. That is why the data is broken up this way,
to fake a pipelined response.

> But it seems odd to me that the responses are read on the same
> connection. Shouldn't data2 have been sent to handle #1, data3 to
> handle #2, and data4 to handle #3? (This would seem to be a bug in
> the test server.)

Not really a bug, but a side effect of the faking described above.

> That doesn't explain why #0's state gets set to DONE but #3's does
> not, though. Even if there's a server bug, I'd expect #3 to be set to
> DONE at some point after reading the first "Content-Length: 47" plus
> 47 bytes of body, and then the test to loop at "running now 2".

I have managed to reproduce the bug now, and it is a race in the test
code. The reason I haven't seen it is because my tests were using
valgrind. When I turn off valgrind, I see the same problems as you do.

I'll tweak the test cases to get rid of the races.

Thanks for looking at the patch!

Linus
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-28