[metrics-bugs] #26963 [Metrics/Onionoo]: regression in host_name field introduced in v6.1
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Jul 31 14:02:02 UTC 2018
#26963: regression in host_name field introduced in v6.1
-----------------------------+--------------------------
Reporter: nusenu | Owner: irl
Type: defect | Status: accepted
Priority: High | Milestone:
Component: Metrics/Onionoo | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-----------------------------+--------------------------
Comment (by irl):
Please review commit
[[https://gitweb.torproject.org/user/irl/onionoo.git/commit/?h=task/26963&id=6e6a279e8337dd05119477295e8f5d74a05ff3f8|6e6a279
on my branch task/26963]].
In the implementation of more accurate DNS resolution, the DirContext used
by JNDI lookups was shared in a utility class. It turns out that
InitialDirContext, the implementation we used, is very not thread-safe and
so as a result lookups would often fail to complete.
This commit creates a new DirContext for every lookup. The overhead in
doing so is minimal and ensures that we do not have thread safety issues.
This commit also increases RDNS_LOOKUP_WORKERS_NUM to 30 (from 5). The
majority of time in these threads is spent waiting for replies and so
there are gains to be had in increasing the number of requests in flight.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26963#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the metrics-bugs
mailing list