[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [sbws/master] Merge branch 'bug28932'



commit 8dbe89057d7eebd7f470fa28aed5d419a76df8cb
Merge: 12ad99d 5dae9b9
Author: juga0 <juga@xxxxxxxxxx>
Date:   Wed Jan 23 15:17:08 2019 +0000

    Merge branch 'bug28932'

 sbws/core/scanner.py | 35 +++++++++++++++++++++++++++++++++--
 sbws/globals.py      |  1 +
 2 files changed, 34 insertions(+), 2 deletions(-)

diff --cc sbws/core/scanner.py
index 1ba0e8e,67fa30b..edf5227
--- a/sbws/core/scanner.py
+++ b/sbws/core/scanner.py
@@@ -377,12 -383,19 +401,19 @@@ def run_speedtest(args, conf)
              while len(pending_results) >= max_pending_results:
                  time.sleep(5)
                  pending_results = [r for r in pending_results if not r.ready()]
-         while len(pending_results) > 0:
+         time_waiting = 0
+         while (len(pending_results) > 0
+                and time_waiting <= TIMEOUT_MEASUREMENTS):
+             log.debug("Number of pending measurement threads %s after "
+                       "a prioritization loop.", len(pending_results))
              time.sleep(5)
+             time_waiting += 5
              pending_results = [r for r in pending_results if not r.ready()]
+         if time_waiting > TIMEOUT_MEASUREMENTS:
+             dumpstacks()
          loop_tstop = time.time()
          loop_tdelta = (loop_tstop - loop_tstart) / 60
 -        log.debug("Measured %s relays in %s minutes", num_relays, loop_tdelta)
 +        log.info("Measured %s relays in %s minutes", num_relays, loop_tdelta)
  
  
  def gen_parser(sub):

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits