[tor-bugs] #32108 [Core Tor/Tor]: tor can overrun its accountingmax if it enters soft hibernation first

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Oct 22 17:38:32 UTC 2019


#32108: tor can overrun its accountingmax if it enters soft hibernation first
-------------------------------------------------+-------------------------
 Reporter:  arma                                 |          Owner:  arma
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.3.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.4.0.1-alpha
 Severity:  Normal                               |     Resolution:
 Keywords:  extra-review consider-backport-      |  Actual Points:
  after-0424 network-health 042-backport         |
  041-backport 040-backport BugSmashFund         |
Parent ID:                                       |         Points:
 Reviewer:  dgoulet, teor                        |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by dgoulet):

 Replying to [comment:15 nickm]:
 > Actually, this might not have the performance regression we're talking
 about.
 >
 > The core of the patch here is:
 > {{{
 >   CALLBACK(second_elapsed, NET_PARTICIPANT,
 > -           FL(NEED_NET)|FL(RUN_ON_DISABLE)),
 > +           FL(RUN_ON_DISABLE)),
 > }}}
 >
 > So note that this periodic event is still labeled as NET_PARTICIPANT.
 IIRC, when a client enters dormant mode, it lstill loses NET_PARTICIPANT:
 NEED_NET is the only thing affected by hibernation.
 >
 > So I think this might be okay?

 I believe you are right. We have a specific callbacks that check for
 network participation (`check_network_participation_callback()`) and it
 will set network participation to false if the client is dormant.

 Relays will always be participating and thus should always call
 `second_elapsed`.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32108#comment:16>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list