[tor-bugs] #1944 [Torperf]: Set up a Torperf to a hidden service

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Sep 23 12:22:06 UTC 2014


#1944: Set up a Torperf to a hidden service
-------------------------+----------------------
     Reporter:  arma     |      Owner:
         Type:  task     |     Status:  assigned
     Priority:  normal   |  Milestone:
    Component:  Torperf  |    Version:
   Resolution:           |   Keywords:  SponsorR
Actual Points:           |  Parent ID:  #2552
       Points:  3        |
-------------------------+----------------------

Comment (by karsten):

 Hang on, arma's patch contains a bug:

 {{{
     rend_cache_clean(1000000);
     rend_cache_clean_v2_descs_as_dir(1000000);
 }}}

 That timestamp is 1970-01-12T14:46:40, and these two calls will only
 remove descriptors published three days *before* that timestamp.  arma's
 bug1944 branch contains one more zero, but 10000000 is still
 1970-04-26T18:46:40 and much too old.  A better number would be 2000000000
 which is 2033-05-18T05:33:20.  Or we can avoid timestamp maths and just
 use:

 {{{
     rend_cache_purge();
 }}}

 Similarly, I put in a call for
 `rend_client_purge_last_hid_serv_requests()` rather than the suggested
 `directory_clean_last_hid_serv_requests()`.

 Here's the full patch that I'm using now:

 {{{
 diff --git a/src/or/main.c b/src/or/main.c
 index 094120f..ad7fa0b 100644
 --- a/src/or/main.c
 +++ b/src/or/main.c
 @@ -2102,9 +2102,13 @@ process_signal(uintptr_t sig)
        control_event_signal(sig);
        break;
      case SIGUSR2:
 -      switch_logs_debug();
 -      log_debug(LD_GENERAL,"Caught USR2, going to loglevel debug. "
 -                "Send HUP to change back.");
 +      /* Replace the USR2 functionality with bug1944-specific plans.
 +       * Ugly hack, but it'll do. */
 +      log_info(LD_GENERAL, "Clearing all rendezvous caches and "
 +                           "forgetting about rendezvous connections...");
 +      rend_cache_purge();
 +      rend_client_purge_last_hid_serv_requests();
 +      circuit_mark_all_dirty_circs_as_unusable();
        control_event_signal(sig);
        break;
      case SIGHUP:
 }}}

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


More information about the tor-bugs mailing list