Conversation
|
Instead of creating two new functions to access the DNS cache, I made the existing evdns_cache_write() and evdns_cache_lookup() functions non-static. Otherwise these are the same as I suggested earlier. |
|
Nice and simple. Let's split the two bug fixes out as well. I'd like to investigate those and submit them upstream. |
|
separate PRs for the bug fixes? ok. |
|
I created separate branches for each of the bug fixes. Hopefully it's not necessary to remove the bug fixes from the km/newnode_dns_prefetch branch. If memory serves both bugs were found by testing newnode under a debugger, while trying to track down other stubborn bugs. The debugger made it easy to see that a pointer was NULL or a queue was empty. |
I would like to remove them from this pull request, because I think they paper over problems elsewhere. For example:
The larger question there is why the queue was empty -- evcons should be tracked in that queue until they are freed. So it is a problem with our usage, or some bug elsewhere. |
|
I tried to verify that the problems that I saw weren't caused by newnode, but I didn't spend hours doing so. |
|
Those two locations do not show up in our crash reports, so at the very least they're new. |
|
It's possible that the evdns callback bug was triggered by the linux implementation of platform_dns_prefetch() (in https_wget.c) calling evdns_getaddrinfo(). I don't know that newnode has needed to use that function before and I suspect libevent apps in general don't need to use it very often. |
Minimal fixes to accommodate newnode_private with tryfirst and dns_prefetch features.