[tor-bugs] #11553 [Tor]: Be more verbose when warning about not finding a circuit ID
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sat Apr 19 11:17:39 UTC 2014
#11553: Be more verbose when warning about not finding a circuit ID
-------------------------+-------------------------------------------------
Reporter: ra | Owner:
Type: | Status: needs_review
enhancement | Milestone: Tor: 0.2.5.x-final
Priority: major | Version: Tor: 0.2.5.3-alpha
Component: Tor | Keywords: tor-relay 024-backport 023-backport
Resolution: | Parent ID:
Actual Points: |
Points: |
-------------------------+-------------------------------------------------
Comment (by andrea):
Begin code review:
* New logging in bb9b4c37f8e7f5cf78918f382e90d8b11ff42551 looks okay, but
perhaps we should consider resetting warn_circ_ids_exhausted if the number
of circuits drops or if sufficient time elapses since it was set, so we
don't block warnings on that channel forever even if the exhaustion
condition is relieved later?
* 0d75344b0e0eafc89db89a974e87b16564cd8f0a:
- This code looks okay, but the possibility of occasional false
positives on circuit ID exhaustion amplifies my above-stated concern about
never letting the blockage on the log message age out.
- We could be smarter about this with better data structures; suppose,
for example, the circuit IDs in use per channel lived in a balanced tree
with each node knowing how many nodes its subtree had. Then we could know
how many circuit IDs are available to assign (N = max_circ_id -
num_circ_ids from the root), pick a random i with 0 <= i < n, and then
walk down the tree adjusting i as appropriate for which circuit IDs are
already in use. This would assign a uniformly distributed random unused
circuit ID in deterministic log time in the number of circuit IDs already
assigned, and never fail.
* 985deaaaf7b7397857e02206e89392e0ee101077 looks okay to me
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11553#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list