Opened 8 years ago

Closed 8 years ago

#7038 closed defect (fixed)

command_process_create_cell() rate_limit_log is pointless

Reported by: arma Owned by:
Priority: Low Milestone: Tor: 0.2.4.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


In command_process_create_cell() we have

    if (assign_onionskin_to_cpuworker(NULL, circ, onionskin) < 0) {
      static ratelim_t handoff_warning =
      char *m;
      if ((m = rate_limit_log(&handoff_warning, approx_time()))) {
        log_warn(LD_GENERAL,"Failed to hand off onionskin. Closing.%s",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) {
    static ratelim_t last_warned =
    char *m;
    if ((m = rate_limit_log(&last_warned, approx_time()))) {
               "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);

rate-limited to just once per minute.

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

Child Tickets

Change History (3)

comment:1 Changed 8 years ago by arma

See for when we first noticed this issue (and could have fixed it then, but I guess we didn't).

comment:2 Changed 8 years ago by arma

Status: newneeds_review

my branch bug7038

comment:3 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Looks okay by me. Merging.

Note: See TracTickets for help on using tickets.