[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #7691 [Tor]: Path bias code should probe unusable circuits
#7691: Path bias code should probe unusable circuits
-----------------------------+----------------------------------------------
Reporter: mikeperry | Owner: mikeperry
Type: enhancement | Status: needs_review
Priority: major | Milestone: Tor: 0.2.4.x-final
Component: Tor | Version:
Keywords: MikePerry201212 | Parent:
Points: | Actualpoints: 4
-----------------------------+----------------------------------------------
Comment(by mikeperry):
Hrmm, Technically this is all #7341 material below. I guess that's my
fault for not making my email clear to you that two bugs were in this
branch (one per commit).
Replying to [comment:3 nickm]:
> For the first commit on the branch: What's with the denominator on all
of the 14/6, 9/6, 10/6 fractions? Where does that 6 come from? (And for
that matter, where do the numerators come from?)
See the diagram and the cases in the comment immediately above those
calculations. 6 is the number of hop-RTTs in a normal 3 hop circuit
construction, due to telescoping. The other timeouts are scaled by the
number of hop-RTTs they have relative to a normal circuit.
To get the numerators, use the diagram at the top of the comment and
imagine counting how many times cells cross each of those links between
hops A, B, and C during construction for each case. Then add up the hop-
RTT sums for each link a, b, c. Then assume all links are equal.
> What's the %hhd format? It sounds like it should be a short short int,
but that doesn't make sense. You can just format shorts as ints, since
integer types smaller than int are promoted to int as part of calling a
varargs function. the %hd format is only for scanf.
This is probably just cruft. I was getting what seemed to be nonsense
value for purpose in the logs at one point, so as a wild guess I tried to
be precise in case there was va_list weirdness... My printf manpage says
hhd is for int8_t, is what the args are.
To be honest, I forget what the real problem was here. I *think* I was
getting nonsense values because I was misbraining the cases in the crazy
state machine in circuit_expire_building() and had some bug in how I was
changing the states around. Whatever it was, I fixed it somehow :).
> As you tested this, what kind of /what amount testing did you do with
hidden services?
I tested the code on both client and server side for hidden service
connections (wget loop). I did several thousand connections on both sides
over the course of revising these commits. For the most part, I tested
with 'MaxCircuitDirtiness 10' so as to perform as many intro+rend
constructions as possible.
> Also: if an introduction never actually happens, do the circuits
eventually time out? If so, what kills them?
They should get killed at the "hs_extremely_old_cutoff" value, which is a
bit long (something like 2 minutes under normal circumstances), but it
does kill them. IIRC, this code was exercised in my live tests.
I also did watch for leaked circuits during testing. I did have to fix a
couple cases that caused them in early revisions (this is what led me to
discover and subsequently rip out Roger's old implementation of the idea),
but there no cases I observed in the 12k+ run I mentioned above, nor for
several previous runs as I worked on the code for #7691.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7691#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs