[tbb-commits] [tor-browser-bundle/maint-3.6] Apply rebased Bug11200-hang fix.

mikeperry at torproject.org mikeperry at torproject.org
Wed Aug 6 23:05:41 UTC 2014


commit 91751b52e06a3fe5dd94eb4fa045ac75859d5842
Author: Mike Perry <mikeperry-git at torproject.org>
Date:   Wed Aug 6 16:04:17 2014 -0700

    Apply rebased Bug11200-hang fix.
---
 Bundle-Data/Docs/ChangeLog.txt            |    2 +
 gitian/descriptors/linux/gitian-tor.yml   |    2 +
 gitian/descriptors/mac/gitian-tor.yml     |    2 +
 gitian/descriptors/windows/gitian-tor.yml |    2 +
 gitian/patches/bug11200-hang-0.2.4.patch  |   66 +++++++++++++++++++++++++++++
 5 files changed, 74 insertions(+)

diff --git a/Bundle-Data/Docs/ChangeLog.txt b/Bundle-Data/Docs/ChangeLog.txt
index e986467..d0336d7 100644
--- a/Bundle-Data/Docs/ChangeLog.txt
+++ b/Bundle-Data/Docs/ChangeLog.txt
@@ -5,6 +5,8 @@ Tor Browser Bundle 3.6.4 -- Aug 8 2014
    * Update OpenSSL to 1.0.1i
    * Backported Tor Patches:
      * Bug 11654: Properly apply the fix for malformed bug11156 log message
+     * Bug 11200: Fix a hang during bootstrap introduced in the initial
+                  bug11200 patch.
    * Update NoScript to 2.6.8.36
      * Bug 9516: Send Tor Launcher log messages to Browser Console
    * Update Torbutton to 1.6.11.1
diff --git a/gitian/descriptors/linux/gitian-tor.yml b/gitian/descriptors/linux/gitian-tor.yml
index 27e242b..fa1badb 100644
--- a/gitian/descriptors/linux/gitian-tor.yml
+++ b/gitian/descriptors/linux/gitian-tor.yml
@@ -30,6 +30,7 @@ files:
 - "bug9665.patch"
 - "bug8402.patch"
 - "bug8402-master.patch"
+- "bug11200-hang-0.2.4.patch"
 - "dzip.sh"
 - "openssl-linux32-utils.zip"
 - "openssl-linux64-utils.zip"
@@ -80,6 +81,7 @@ script: |
       git am ~/build/bug9665.patch
       git am ~/build/bug11200.patch
       git am ~/build/bug8402.patch
+      git am ~/build/bug11200-hang-0.2.4.patch
     else
       git am ~/build/bug8402-master.patch
     fi
diff --git a/gitian/descriptors/mac/gitian-tor.yml b/gitian/descriptors/mac/gitian-tor.yml
index 054e1a8..5e1ea0f 100644
--- a/gitian/descriptors/mac/gitian-tor.yml
+++ b/gitian/descriptors/mac/gitian-tor.yml
@@ -26,6 +26,7 @@ files:
 - "bug11069.patch"
 - "bug9665.patch"
 - "bug8402.patch"
+- "bug11200-hang-0.2.4.patch"
 - "bug8402-master.patch"
 - "apple-uni-sdk-10.6_20110407-0.flosoft1_i386.deb"
 - "multiarch-darwin11-cctools127.2-gcc42-5666.3-llvmgcc42-2336.1-Linux-120724.tar.xz"
@@ -76,6 +77,7 @@ script: |
       git am ~/build/bug9665.patch
       git am ~/build/bug11200.patch
       git am ~/build/bug8402.patch
+      git am ~/build/bug11200-hang-0.2.4.patch
     else
       git am ~/build/bug8402-master.patch
     fi
diff --git a/gitian/descriptors/windows/gitian-tor.yml b/gitian/descriptors/windows/gitian-tor.yml
index aea69b9..7d244ae 100644
--- a/gitian/descriptors/windows/gitian-tor.yml
+++ b/gitian/descriptors/windows/gitian-tor.yml
@@ -28,6 +28,7 @@ files:
 - "bug9665.patch"
 - "bug8402.patch"
 - "bug8402-master.patch"
+- "bug11200-hang-0.2.4.patch"
 - "binutils.tar.bz2"
 - "dzip.sh"
 - "binutils-win32-utils.zip"
@@ -77,6 +78,7 @@ script: |
       git am ~/build/bug9665.patch
       git am ~/build/bug11200.patch
       git am ~/build/bug8402.patch
+      git am ~/build/bug11200-hang-0.2.4.patch
     else
       git am ~/build/bug8402-master.patch
     fi
diff --git a/gitian/patches/bug11200-hang-0.2.4.patch b/gitian/patches/bug11200-hang-0.2.4.patch
new file mode 100644
index 0000000..6bac5e4
--- /dev/null
+++ b/gitian/patches/bug11200-hang-0.2.4.patch
@@ -0,0 +1,66 @@
+From 813dc75f717cab1f7896c77e838c496daa3e4deb Mon Sep 17 00:00:00 2001
+From: Roger Dingledine <arma at torproject.org>
+Date: Wed, 6 Aug 2014 15:57:24 -0700
+Subject: [PATCH] Build circuits more readily when DisableNetwork goes to 0
+
+When Tor starts with DisabledNetwork set, it would correctly
+conclude that it shouldn't try making circuits, but it would
+mistakenly cache this conclusion and continue believing it even
+when DisableNetwork is set to 0. Fixes the bug introduced by the
+fix for bug 11200; bugfix on 0.2.5.4-alpha.
+---
+ src/or/nodelist.c | 21 ++++++++++++---------
+ 1 file changed, 12 insertions(+), 9 deletions(-)
+
+diff --git a/src/or/nodelist.c b/src/or/nodelist.c
+index e814e16..18b6677 100644
+--- a/src/or/nodelist.c
++++ b/src/or/nodelist.c
+@@ -1240,10 +1240,21 @@ static char dir_info_status[256] = "";
+ int
+ router_have_minimum_dir_info(void)
+ {
++  static int logged_delay=0;
++  const char *delay_fetches_msg = NULL;
++  if (should_delay_dir_fetches(get_options(), &delay_fetches_msg)) {
++    if (!logged_delay)
++      log_notice(LD_DIR, "Delaying directory fetches: %s", delay_fetches_msg);
++    logged_delay=1;
++    strlcpy(dir_info_status, delay_fetches_msg,  sizeof(dir_info_status));
++    return 0;
++  }
++  logged_delay = 0; /* reset it if we get this far */
++
+   if (PREDICT_UNLIKELY(need_to_update_have_min_dir_info)) {
+     update_router_have_minimum_dir_info();
+-    need_to_update_have_min_dir_info = 0;
+   }
++
+   return have_min_dir_info;
+ }
+ 
+@@ -1439,7 +1450,6 @@ update_router_have_minimum_dir_info(void)
+   const networkstatus_t *consensus =
+     networkstatus_get_reasonably_live_consensus(now,usable_consensus_flavor());
+   int using_md;
+-  const char *delay_fetches_msg = NULL;
+ 
+   if (!consensus) {
+     if (!networkstatus_get_latest_consensus())
+@@ -1452,13 +1462,6 @@ update_router_have_minimum_dir_info(void)
+     goto done;
+   }
+ 
+-  if (should_delay_dir_fetches(get_options(), &delay_fetches_msg)) {
+-    log_notice(LD_DIR, "Delaying directory fetches: %s", delay_fetches_msg);
+-    strlcpy(dir_info_status, delay_fetches_msg,  sizeof(dir_info_status));
+-    res = 0;
+-    goto done;
+-  }
+-
+   using_md = consensus->flavor == FLAV_MICRODESC;
+ 
+   {
+-- 
+1.9.1
+



More information about the tbb-commits mailing list