[tor-bugs] #11965 [Tor]: 60-second pause bootstrapping with a bridge if you already have its descriptor

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat May 17 04:22:42 UTC 2014


#11965: 60-second pause bootstrapping with a bridge if you already have its
descriptor
------------------------+--------------------------------
     Reporter:  arma    |      Owner:
         Type:  defect  |     Status:  needs_review
     Priority:  normal  |  Milestone:  Tor: 0.2.5.x-final
    Component:  Tor     |    Version:
   Resolution:          |   Keywords:  tor-bridge
Actual Points:          |  Parent ID:
       Points:          |
------------------------+--------------------------------

Comment (by arma):

 Replying to [comment:2 arma]:
 > Which leads me to ask: is there anything that gets triggered when
 pt_proxies_configuration_pending() transitions from true to false, or is
 it likely we have a race condition here if it takes a while to configure
 our PTs?

 asn, what would you think about the following patch?
 {{{
 diff --git a/src/or/main.c b/src/or/main.c
 index a2c5743..88a0793 100644
 --- a/src/or/main.c
 +++ b/src/or/main.c
 @@ -1231,7 +1231,8 @@ run_scheduled_events(time_t now)
        router_upload_dir_desc_to_dirservers(0);
    }

 -  if (!options->DisableNetwork && time_to_try_getting_descriptors < now)
 {
 +  if (!should_delay_dir_fetches(options, NULL) &&
 +      time_to_try_getting_descriptors < now) {
      update_all_descriptor_downloads(now);
      update_extrainfo_downloads(now);
      if (router_have_minimum_dir_info())
 @@ -1461,7 +1462,8 @@ run_scheduled_events(time_t now)
   * documents? */
  #define networkstatus_dl_check_interval(o) ((o)->TestingTorNetwork ? 1 :
 60)

 -  if (time_to_download_networkstatus < now && !options->DisableNetwork) {
 +  if (!should_delay_dir_fetches(options, NULL) &&
 +      time_to_download_networkstatus < now) {
      time_to_download_networkstatus =
        now + networkstatus_dl_check_interval(options);
      update_networkstatus_downloads(now);
 }}}

 Basically, we skip the "should we launch those two classes of dir fetches"
 steps not just when DisableNetwork is set, but also when you're using
 bridges and you don't have any useful descriptors yet, and when you're
 using bridges and you have pt_proxies_configuration_pending(). And then
 when should_delay_dir_fetches goes false, time_to_foo is before now, so
 they fire on the next run_scheduled_events().

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


More information about the tor-bugs mailing list