Proposed 0.9.1 release objectives, and state of TESTFRAME
Eric S. Raymond
esr at thyrsus.com
Mon Nov 30 23:48:54 UTC 2015
Hal Murray <hmurray at megapathdsl.net>:
> > The getaddrinfo stuff is tricky, too, because it's threaded-asynchronous.
> You need to intercept the place where the main thread processes the answer coming back from the helper thread rather than intercepting the call to getaddrinfo. (I'll say more if you want.)
Yeah, I'd figured that much out.
> I don't know where that code is. Chris might know. If not, I'll find it. There may be two places, one for servers and another for pools.
Agreed, I think there are two distinct places. The second one, in the middle of
ntp_proto, complicates life a lot.
> Since Chris is working on rewriting that area, I suggest punting for a while. Just limit your testing to using numeric IP Addresses rather than names. (pool won't work) If you are really desperate for server names, hack the lookup code to avoid threading. There is a call early on that uses getaddrinfo to decode numeric addresses. It passes in the no-DNS flag. The only disadvantage of doing the lookup then/there is that startup may take a long time.
Your advice is good, I think. I had already considered limiting early testing
to numeric IPs to avoid this problem.
I think I'll try timing a version buit to do all its DNS lookups at
start. Network latencies have been dropping. It is at least possible
that the asynchronous lookup is a performance hack that we no longer need.
> It might be worth putting a wrong-thread trap on the msyslog intercept.
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
More information about the devel