[tor-bugs] #5506 [Tor]: Do we just keep downloading a consensus if our clock is wrong?

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Mar 22 00:29:07 UTC 2013


#5506: Do we just keep downloading a consensus if our clock is wrong?
------------------------+---------------------------------------------------
 Reporter:  arma        |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  major       |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor         |        Version:                    
 Keywords:  tor-client  |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by nickm):

 > In #4011 I pointed out that deciding we need a new consensus if
 "c->valid_after > now" freaks me out.

 So, that's only part of the check.  time_to_download_next_consensus gets
 updated when we have no live consensus, but we don't actually launch the
 request if it's failed recently:
 {{{
     if (!download_status_is_ready(&consensus_dl_status[i], now,
                                   CONSENSUS_NETWORKSTATUS_MAX_DL_TRIES))
       continue; /* We failed downloading a consensus too recently. */
 }}}

 I've looked around at the rest of the code to see whether we reset
 consensus_dl_status[i] too aggressively, and I can't see anything offhand,
 though some of the callers of routerlist_retry_directory_downloads() and
 router_reset_descriptor_download_failures() {which reset it indirectly}
 seem a little sketchy to me.

 Of particular note is the once-an-hour
 router_reset_descriptor_download_failures() call in main.c.  This isn't
 the right answer here, I think: the download_dl_status logic is already
 supposed to make failing things get retried periodically.  Resetting it
 once an hour will make it use the early, aggressive retry logic once an
 hour. (!)  But that could be another ticket.

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


More information about the tor-bugs mailing list