Daniel Stenberg wrote:
Hi friends,

multi interface users of libcurl, this issue may concern you so please bare with my longish mail and I'll get to the point eventually...

I visited a company yesterday (who's name is left here since it isn't important to this dicussion) that is using libcurl quite heavily and I got to debug libcurl when used by an application simulating hundreds of clients, each doing tens of requests.

These guys of course use the multi_socket API but it turns out at times it seemed to "forget" connections (which caused a hang). It turned out to be an existing (7.19.7) bug in libcurl and it happened like this:

I've had similar problems with the multi_socket API, but I think this behaviour goes back beyond 7.19.7.

To verify I get you right:
------
curl_multi_add_handle()
 -> CURLMOPT_TIMERFUNCTION 1ms

Timeout ->
do {
   res = curl_multi_socket_action(... TIMEOUT ...);
} while(CURLM_CALL_MULTI_PERFORM == res);

connection state INIT -> CONNECT

CONNECT does not register a timeout, or sockets, the handle is stale.
------

If there are multiple handles on the multi, some new timeout from other handles would resurrect the stale handle?

If you've read this far and have an idea of what I've tried to say, I'd say you're qualified to have an opinion on the matter so please tell me what you think or if I've missed some detail or whatever.

I'm not sure if I got the point correctly, I understand the A fix intention, but I doubt it will change things.

I've had the same 'problem' with the multi_socket interface, but the problem was a stale handle after successful connect, afaik the handle would be 'revived' once other handles got active, and removed for some timeout conditions.

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

Reply via email to