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

[tor-bugs] #7038 [Tor]: command_process_create_cell() rate_limit_log is pointless



#7038: command_process_create_cell() rate_limit_log is pointless
-----------------------+----------------------------------------------------
 Reporter:  arma       |          Owner:                    
     Type:  defect     |         Status:  new               
 Priority:  minor      |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor        |        Version:                    
 Keywords:  tor-relay  |         Parent:                    
   Points:             |   Actualpoints:                    
-----------------------+----------------------------------------------------
 In command_process_create_cell() we have
 {{{
     if (assign_onionskin_to_cpuworker(NULL, circ, onionskin) < 0) {
 #define WARN_HANDOFF_FAILURE_INTERVAL (6*60*60)
       static ratelim_t handoff_warning =
         RATELIM_INIT(WARN_HANDOFF_FAILURE_INTERVAL);
       char *m;
       if ((m = rate_limit_log(&handoff_warning, approx_time()))) {
         log_warn(LD_GENERAL,"Failed to hand off onionskin. Closing.%s",m);
         tor_free(m);
       }
 }}}

 We rate-limited it to every six hours. But the typical case for triggering
 it happens in onion_pending_add() which has its own log:
 {{{
   if (ol_length >= get_options()->MaxOnionsPending) {
 #define WARN_TOO_MANY_CIRC_CREATIONS_INTERVAL (60)
     static ratelim_t last_warned =
       RATELIM_INIT(WARN_TOO_MANY_CIRC_CREATIONS_INTERVAL);
     char *m;
     if ((m = rate_limit_log(&last_warned, approx_time()))) {
       log_warn(LD_GENERAL,
                "Your computer is too slow to handle this many circuit "
                "creation requests! Please consider using the "
                "MaxAdvertisedBandwidth config option or choosing a more "
                "restricted exit policy.%s",m);
       tor_free(m);
     }
 }}}
 rate-limited to just once per minute.

 I think we should downgrade the outer log message and remove the rate
 limiting cruft.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7038>
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