Richard Haselgrove spotted something interesting a while back, and since I've been reading code and documentation trying to come up to speed, it's pretty interesting.
What he saw is here: <http://boinc.berkeley.edu/dev/forum_thread.php?id=3225> At the time, boinc2.ssl.berkeley.edu resolved to 208.68.240.13 (and .18, but that's not important right now). BOINC tried to connect to 13.240.68.208 -- the octets are reversed. As part of my reading I see lots of places that say that CURL has trouble with their DNS caching -- none of them very detailed, just grousing back and forth between users who say "your tool is broken" and developers who say "it's a bug in LIBCURL." BOINC appears to just take the default, which should only be one minute, and if the cache works, it should only keep the IP for a minute, which probably isn't quite enough to save the DNS lookup for the next connect. If you set CURLOPT_DNS_CACHE_TIMEOUT to 0, that disables the cache, and could bypass the problem completely. I don't think this would make any difference at all in performance. Worst case, the system asks it's friendly nearby resolver, which answers from the cache (this would happen if the LIBCURL cache works as advertised, and times out after one minute). On Windows, BOINC asks Windows, and Windows answers from its' own cache. I expect Linux has some local caching as well. The LIBCURL notes say something about how things sometimes look like caching problems, but are really because DHCP has changed the resolver IP addresses (or, perhaps DHCP was just late). It says you should call init_res() to reinitialize the resolver. I suspect that is in *nix and not Windows, but I'm not sure. Either way, I wonder how much of this is behind some of the odd DNS-ish problems we see in the project forums from time to time that I don't see in other contexts (and I spend a lot of time on DNS). Sorry for not doing this in a more formal way (i.e. a patch) but I'm a ways from coming up to speed on the BOINC code. -- Lynn _______________________________________________ boinc_dev mailing list [email protected] http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.
