cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-2891595 ] DNS cache - outstanding references can prevent timeout

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 04 Nov 2009 01:07:44 +0000

Bugs item #2891595, was opened at 2009-11-03 17:07
Message generated for change (Tracker Item Submitted) made by csapuntz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2891595&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: name resolving/DNS
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Constantine Sapuntzakis (csapuntz)
Assigned to: Daniel Stenberg (bagder)
Summary: DNS cache - outstanding references can prevent timeout

Initial Comment:
Heavy use of a DNS entry by multiple threads can prevent it from being ejected from the cache, even after its timeout has been exceeded. This patch attached fixes this issue.

The patch allows a DNS entry to persist outside of the hash cache and be released when the last connection referencing it calls Curl_resolv_unlock.
It also changes the hash abstraction to replace an entry with a new one by default rather than favoring older entries. I checked the other use of the hash abstraction in multi.c and it already assumes that the insert will either succeed or return NULL -- not that it will return the old element.

I've also added some debugging code that helps catch reference leaks. After curl_easy_cleanup() is called on all extant handles, curl_get_ndns() should return 0.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2891595&group_id=976
Received on 2009-11-04

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET