Opened 13 months ago

Last modified 10 days ago

#27049 needs_revision defect

"No circuits are opened" messages with onion services

Reported by: mikeperry Owned by: mikeperry
Priority: High Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs-reachability, 033-unreached-backport
Cc: Actual Points:
Parent ID: Points:
Reviewer: dgoulet Sponsor:

Description (last modified by mikeperry)

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.

Child Tickets

Change History (19)

comment:1 Changed 13 months ago by mikeperry

Description: modified (diff)
Status: assignedneeds_review

comment:2 in reply to:  1 Changed 13 months ago by teor

Status: needs_reviewneeds_revision

Replying to mikeperry:

https://github.com/torproject/tor/pull/263

Please make check-changes:

./changes/bug27409:
	bug number 27409 does not appear

comment:3 Changed 13 months ago by nickm

Milestone: Tor: 0.3.5.x-final

comment:4 Changed 12 months ago by mikeperry

Status: needs_revisionneeds_review

Ok fixed the changes file name + bug typo.

comment:5 Changed 12 months ago by dgoulet

Reviewer: dgoulet

comment:6 Changed 12 months ago by dgoulet

Status: needs_reviewneeds_revision

See for a question I have about this on the PR.

The changes file says that this is dating back to 0.2.2 so don't we want to backport to more versions (well at least 034) ?

comment:7 Changed 9 months ago by dgoulet

Bump mike?

comment:8 Changed 9 months ago by mikeperry

Status: needs_revisionneeds_review

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?

comment:9 Changed 9 months ago by teor

I left a question on the pull request about intro and rend circuits.

I think we should backport to 0.2.9, because this bug can cause clients to stall (see #28639, same bug, different trigger).

comment:10 Changed 9 months ago by teor

I opened #28714 for the controller 1- and 2-hop circuit case.

comment:11 Changed 9 months ago by dgoulet

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?

comment:12 Changed 9 months ago by teor

I don't think #28714 will fix it either.

Maybe we should log something different when the circuit is not a user circuit?

comment:13 Changed 8 months ago by dgoulet

Status: needs_reviewneeds_revision

Going in needs_revision so Mike can notice it. I think we could also solve that annoying log notice on bridges with this.

comment:14 Changed 7 months ago by mikeperry

Keywords: tor-hs-reachability added

comment:15 Changed 6 months ago by nickm

Priority: MediumHigh

comment:16 Changed 6 months ago by teor

Milestone: Tor: 0.3.5.x-finalTor: unspecified

If this branch is revised, it can go in the current milestone.

comment:17 Changed 6 months ago by teor

Keywords: 033-backport removed

These open, non-merge_ready tickets can not get backported to 0.3.3, because 0.3.3 is now unsupported.

comment:18 Changed 6 months ago by teor

Keywords: 033-backport-unreached added

Hmm, I guess they should still get 033-backport-unreached

comment:19 Changed 10 days ago by teor

Keywords: 033-unreached-backport added; 033-backport-unreached removed

Fix 033-unreached-backport spelling.

Note: See TracTickets for help on using tickets.