mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Rate-limit "No circuits are opened" message to once-per-hour
mr-4 reports on #7799 that he was seeing it several times per second, which suggests that things had gone very wrong. This isn't a real fix, but it should make Tor usable till we can figure out the real issue.
This commit is contained in:
parent
2e9be92cd7
commit
127cb39ffc
6
changes/bug7799.ratelim
Normal file
6
changes/bug7799.ratelim
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- Rate-limit the "No circuits are opened. Relaxed timeout for a
|
||||||
|
circuit with channel state open..." message to once per hour to
|
||||||
|
keep it from filling the notice logs. Mitigates bug 7799 but does
|
||||||
|
not fix the underlying cause. Bugfix on 0.2.4.7-alpha.
|
||||||
|
|
@ -478,13 +478,18 @@ circuit_expire_building(void)
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
static ratelim_t relax_timeout_limit = RATELIM_INIT(3600);
|
||||||
|
char *m;
|
||||||
|
if ((m = rate_limit_log(&relax_timeout_limit, approx_time()))) {
|
||||||
log_notice(LD_CIRC,
|
log_notice(LD_CIRC,
|
||||||
"No circuits are opened. Relaxed timeout for "
|
"No circuits are opened. Relaxed timeout for "
|
||||||
"a circuit with channel state %s to %ldms. "
|
"a circuit with channel state %s to %ldms. "
|
||||||
"However, it appears the circuit has timed out anyway. "
|
"However, it appears the circuit has timed out anyway. "
|
||||||
"%d guards are live. ",
|
"%d guards are live. %s",
|
||||||
channel_state_to_string(victim->n_chan->state),
|
channel_state_to_string(victim->n_chan->state),
|
||||||
(long)circ_times.close_ms, num_live_entry_guards(0));
|
(long)circ_times.close_ms, num_live_entry_guards(0), m);
|
||||||
|
tor_free(m);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user