[tor-bugs] #25577 [Core Tor/Tor]: cmux: CircuitPriorityHalflife value is never taken from the consensus

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Mar 21 22:53:51 UTC 2018


#25577: cmux: CircuitPriorityHalflife value is never taken from the consensus
------------------------------+--------------------------------
     Reporter:  dgoulet       |      Owner:  dgoulet
         Type:  defect        |     Status:  assigned
     Priority:  High          |  Milestone:  Tor: 0.3.3.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  regression
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------------------
 Commit `6b1dba214db` introduced an issue that makes the cmux EWMA
 subsystem to never use the `CircuitPriorityHalflife` option from the
 consensus resulting in a warning at bootup:

 {{{
 Mar 21 22:31:24.001 [warn] CircuitPriorityHalflife is too small
 (-1.000000). Adjusting to the smallest value allowed: 30.000000.
 }}}

 The default config is:

 {{{
   V(CircuitPriorityHalflife,     DOUBLE,  "-1.0"), /*negative:'Use
 default'*/
 }}}

 Which means that in `get_circuit_priority_halflife()` which is called at
 bootup when loading the config file and when a new consensus arrives,
 always skip the consensus param check due to this wrong condition
 (EPSILON=0.0001):

 {{{
 +  if (options && options->CircuitPriorityHalflife < EPSILON) {
 +    halflife = options->CircuitPriorityHalflife;
 +    *source_msg = "CircuitPriorityHalflife in configuration";
 +    goto end;
 +  }
 }}}

 Originally, the condition was this which resulted in false with -1.0 and
 thus trying the consensus param instead:

 {{{
 -  if (options && options->CircuitPriorityHalflife >= -EPSILON) {
 -    halflife = options->CircuitPriorityHalflife;
 -    source = "CircuitPriorityHalflife in configuration";
 }}}

 The good news is that we didn't release that commit yet! and the default
 value is what currently the consensus is using (30000) :). Nevertheless,
 this should be fixed asap.

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


More information about the tor-bugs mailing list