cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Questions on using the curl multi interface(som clarification)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 5 Sep 2010 23:31:23 +0200 (CEST)

On Sun, 5 Sep 2010, lali .cpp wrote:

>> CURLOPT_CONNECTTIMEOUT does not really work for the multi interface in any
>> released libcurl version. We're working on making sure it works correctly
>> for the next release.
>
> Thanks a lot for this information. Does CURLOPT_TIMEOUT_MS work for multi
> interface?

No, it's similarly flawed. Well, I would of course be happy if you tried out
a recent daily snapshot and checked, as I believe they are now working pretty
good.

> The reason for asking these questions is my application is randomly crashing

The "not working" part I've mentioned does not include crashing. libcurl
should never crash if used as documented.

> Can you give any hints, pointers etc? These crashes occur randomly,
> sometimes in 2 days and sometimes after a week etc. Please note that I am
> also using c-ares.

No, I don't know of any such serious bugs in libcurl. Did you try running your
app with valgrind to see if it can catch something bad?

> As you have mentioned CURLOPT_CONNECTTIMEOUT_MS doesn't work with multi
> interface, so I will remove this option from easy handle. I was also setting
> CURLOPT_TIMEOUT_MS(75ms) on the easy handles before adding these handles in
> the multihandle(Sorry I didn't mention this in my last post). Can these
> options be one of the possible causes of crashes?

Not likely I would say. But if there's a bug, it is of course something
unintented and rather than guessing for what to blame you need to do some real
debugging to narrow it down.

> As of now I am just shooting in the dark, looking for your help.

Well, I'm responding in the dark too as you're the one who can repeat these
problems, not me. If you can provide sample source code that reproduces the
problem things would be a lot easier...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-05