cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_multi_wait seems to be ignoring timeout

From: Alan Wolfe <alan.wolfe_at_gmail.com>
Date: Tue, 7 May 2013 15:36:43 -0700

It's a common scapegoat for mysterious problems, but have you
considered that this might be a memory stomping problem?

Something else corrupting memory causing select to malfunction.

If you have a minimal program that is making this problem appear, you
might check your data callback to make sure you aren't doing anything
silly in there (or maybe even commenting it out if your program still
functions w/o it doing anything).

On Tue, May 7, 2013 at 3:10 PM, Alex Loukissas <alex_at_maginatics.com> wrote:
> On Tue, May 7, 2013 at 3:00 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>>
>> On Tue, 7 May 2013, Alex Loukissas wrote:
>>
>>> I'm using the curl_multi interface to make parallel GET requests on a set
>>> of URLs. I've noticed that at times the call to curl_multi_wait may block
>>> indefinitely, despite the fact that I'm passing in a value of 1000 (msec)
>>> to the timeout_ms parameter. Some snippets from my debugger:
>>>
>>> 00000000`0933e5d0 00000001`3f5233d4 ws2_32!select+0x75a
>>> 00000000`0933e6d0 00000001`3f4fcb28 mag_client!Curl_poll+0x234
>>> [c:\curl-7.28.1\lib\select.c @ 474]
>>> 00000000`0933eda0 00000001`3f31f653 mag_client!curl_multi_wait+0x1d8
>>> [c:\curl-7.28.1\lib\multi.c @ 1029]
>>
>>
>> Ouch. That seems really strange!
>
>
> Yes rather strange behavior, although it's not very frequent. Do you perhaps
> have a hunch on anything I might have missed in the way I'm using curl_multi
> interface?
>
>>
>>
>>> I've stumbled across a perhaps relevant blog
>>> post<http://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/>,
>>> which could be related.
>>
>>
>>> By the way, this was seen on Win7 and my app is using a libcurl 7.28.1,
>>> statically linked.
>>
>>
>> We stopped using WSAPoll() already in 7.28.0 so _that_ is not the reason
>> here, and as you see in your stack trace libcurl called select() ...
>
>
> Indeed..
>
>>
>>
>>
>> --
>>
>> / daniel.haxx.se
>> -------------------------------------------------------------------
>> List admin: http://cool.haxx.se/list/listinfo/curl-library
>> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
>
>
>
> --
> Alex Loukissas
> Member of Technical Staff - Maginatics, Inc.
> www.maginatics.com
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-05-08