[tor-bugs] #20963 [Core Tor/Tor]: [notice] The Tor Directory Consensus has changed how many circuits we must track to detect network failures from 0 to 20.

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Dec 14 00:09:40 UTC 2016


#20963: [notice] The Tor Directory Consensus has changed how many circuits we must
track to detect network failures from 0 to 20.
---------------------------------------+-----------------------------------
 Reporter:  arma                       |          Owner:
     Type:  defect                     |         Status:  needs_information
 Priority:  Medium                     |      Milestone:  Tor:
                                       |  0.3.0.x-final
Component:  Core Tor/Tor               |        Version:  Tor: 0.2.8.9
 Severity:  Normal                     |     Resolution:
 Keywords:  028-backport 029-backport  |  Actual Points:
Parent ID:                             |         Points:
 Reviewer:                             |        Sponsor:
---------------------------------------+-----------------------------------
Changes (by teor):

 * status:  new => needs_information


Comment:

 I think this is as designed:

 I bet you encountered condition 4 when you ran out of disk space:
 {{{
 /**
  * This function decides if CBT learning should be disabled. It returns
  * true if one or more of the following conditions are met:
  *
  *  1. If the cbtdisabled consensus parameter is set.
  *  2. If the torrc option LearnCircuitBuildTimeout is false.
  *  3. If we are a directory authority
  *  4. If we fail to write circuit build time history to our state file.
  *  5. If we are compiled or configured in Tor2web mode
  *  6. If we are configured in Single Onion mode
  */
 int
 circuit_build_times_disabled(void)
 }}}

 Which then led to:
 {{{
   if (!circuit_build_times_disabled()) {
 ...
   } else {
     /*
      * Adaptive timeouts are disabled; this might be because of the
      * LearnCircuitBuildTimes config parameter, and hence permanent, or
      * the cbtdisabled consensus parameter, so it may be a new condition.
      * Treat it like getting num == 0 above and free the circuit history
      * if we have any.
      */

     circuit_build_times_free_timeouts(cbt);
   }
 }}}

 Which then led to:
 {{{
 /**
  * Free the saved timeouts, if the cbtdisabled consensus parameter got
 turned
  * on or something.
  */

 void
 circuit_build_times_free_timeouts(circuit_build_times_t *cbt)
 {
   if (!cbt) return;

   if (cbt->liveness.timeouts_after_firsthop) {
     tor_free(cbt->liveness.timeouts_after_firsthop);
   }

   cbt->liveness.num_recent_circs = 0;
 }
 }}}

 And then the next time you loaded a consensus, that 0 was used as the
 value.

 So I can't see how we'd fix that, but we could make the error message
 better.

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


More information about the tor-bugs mailing list