[tor-bugs] #19969 [Core Tor/Tor]: tor client does not immediately open new circuits after standby
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Nov 1 01:48:50 UTC 2016
#19969: tor client does not immediately open new circuits after standby
-------------------------------------------------+-------------------------
Reporter: weasel | Owner:
Type: defect | Status:
| needs_review
Priority: High | Milestone: Tor:
| 0.2.9.x-final
Component: Core Tor/Tor | Version: Tor:
| 0.2.8.6
Severity: Normal | Resolution:
Keywords: regression 029-backport | Actual Points:
028-backport |
Parent ID: | Points: 2
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by arma):
Replying to [comment:24 nickm]:
> > My {{{bug19969_028_alt}}} branch implements this option. I found it
useful to write to make sure I understood what was going on, so I will be
totally fine if you pick your branch as being the less messy / more safe
one. :)
>
> That's actually a little bad: calling event_base_loopexit() over and
over like that is not idempotent. Instead, it creates "exit the loop"
events proportional to the number of times you call it. That's not
''super'' harmful, but it does mean allocate more RAM and waste more CPU
than one might want.
Ok, I have added a new commit to {{{bug19969_028_alt}}} that tries to
avoid calling event_base_loopexit() when we shouldn't.
Also, I made a {{{bug19969_029_alt}}} branch that cherry-picks these three
commits onto maint-0.2.9, since we are considering not putting this
version of the patch into 0.2.8.
This is getting messier as I look at it more though. Now when I do a socks
request while my Tor doesn't have enough dir info, I actually get k
"optimistically trying directory fetches again" lines, where k is the
number of streams that are pending each time a new pending one gets added.
That's surprising, but I haven't sorted out whether I think it's harmful
-- maybe not, because each of them just resets directory fetching stuff,
or maybe so, because if they reset the directory fetching stuff, they will
clobber any new efforts we made to mark down fallback dirs as actually
down? Hm. There is a little part of me that is tempted to try to back out
commits b1d56fc589, 84b3350c83, and 58edf926 and call that the 028
solution. But they don't revert cleanly, and I haven't explored further.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19969#comment:27>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list