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

Re: [tor-bugs] #24857 [Core Tor/Tor]: tor 0.3.1.9 100% cpu load



#24857: tor 0.3.1.9 100% cpu load
-------------------------------------------------+-------------------------
 Reporter:  Eugene646                            |          Owner:  (none)
     Type:  defect                               |         Status:  new
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.4.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.3.1.9
 Severity:  Normal                               |     Resolution:
 Keywords:  cpu, windows, linux, performance,    |  Actual Points:
  regression, 033-triage-20180326,               |
  033-removed-20180326                           |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by cypherpunks):

 > cypherpunks' comments are wrong about this bug
 Something like this:
 {{{
 -    consensus_diff_queue_diff_work(c, most_recent);
 +    if (consensus_diff_queue_diff_work(c, most_recent)) {
 +      // We encountered an error (temporary?)
 +      unsigned u;
 +      for (u = 0; u < n_diff_compression_methods(); ++u) {
 +        compress_method_t method = compress_diffs_with[u];
 +        cdm_diff_ht_set_status(flavor, this_sha3, most_recent_sha3,
 +                               method, CDM_DIFF_ERROR, NULL);
 +      }
 +    }
 }}}

 Plus something like this:
 {{{
 /**
  * Periodic (30m or something). Remove from the hash table entry
  * with (temporary?) error status.
  */
 void
 cdm_diff_ht_cleanup(void)
 {
   cdm_diff_t **diff, **next;
   for (diff = HT_START(cdm_diff_ht, &cdm_diff_ht); diff; diff = next) {
     cdm_diff_t *this = *diff;

     if ((*diff)->cdm_diff_status == CDM_DIFF_ERROR) {
       next = HT_NEXT_RMV(cdm_diff_ht, &cdm_diff_ht, diff);
       cdm_diff_free(this);
       continue;
     }
     next = HT_NEXT(cdm_diff_ht, &cdm_diff_ht, diff);
   }
 }
 }}}
 Replace CDM_DIFF_ERROR by (new) CDM_DIFF_TEMP_ERROR maybe?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24857#comment:23>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs