If a Tor instance is only doing onion service activity, and circuits time out, then the Tor client thinks that circuits aren't opened and gives them a full minute to complete. It also complains about this in the logs at notice level, like this:
Aug 06 02:55:30.000 [notice] No circuits are opened. Relaxed timeout for circuit 21570 (a Hidden service: Pre-built vanguard circuit 4-hop circuit in state doing handshakes with channel state open) to 60000ms. However, it appears the circuit has timed out anyway.
The fix is simple. circuit_any_opened_circuits() in circuitlist.c is only counting circuits as opened if they use the DEFAULT_ROUTE_LEN. We just need to count >= DEFAULT_ROUTE_LEN to count them.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
Trac: Status: assigned to needs_review Description: If a Tor instance is only doing onion service activity, and circuits time out, then the Tor client thinks that circuits aren't opened and gives them a full minute to complete. It also complains about this in the logs at notice level.
The fix is simple. circuit_any_opened_circuits() in circuitlist.c is only counting circuits as opened if they use the DEFAULT_ROUTE_LEN. We just need to count >= DEFAULT_ROUTE_LEN to count them.
to
If a Tor instance is only doing onion service activity, and circuits time out, then the Tor client thinks that circuits aren't opened and gives them a full minute to complete. It also complains about this in the logs at notice level, like this:
Aug 06 02:55:30.000 [notice] No circuits are opened. Relaxed timeout for circuit 21570 (a Hidden service: Pre-built vanguard circuit 4-hop circuit in state doing handshakes with channel state open) to 60000ms. However, it appears the circuit has timed out anyway.
The fix is simple. circuit_any_opened_circuits() in circuitlist.c is only counting circuits as opened if they use the DEFAULT_ROUTE_LEN. We just need to count >= DEFAULT_ROUTE_LEN to count them.
Yikes sorry I dropped this for so long. Fixups are on the PR comment.
I'm not sure if 0.2.9 backport is worth it -- I and others refactored bits of circuit_expire_building() in 0.3.3 to handle vanguards and improved HS timeout behavior, among other things. At a glance, I could just patch the pre-refactored code similarly, but this seems not serious enough for that.
Unless you think this message is very common in the wild?
I think that code should be fine if my response to teor is accurate.
Also, this notice log ("No circuits are opened.") is something I have in masse on my obfs4 bridge (in Tor Browser):
Dec 04 08:38:43.000 [notice] No circuits are opened. Relaxed timeout for circuit 21741 (a Testing circuit 3-hop circuit in state doing handshakes with channel state open) to 107586ms. However, it appears the circuit has timed out anyway. [9 similar message(s) suppressed in last 3600 seconds]
Always the same... I'm not sure this patch will fix that?