Opened 3 years ago

Last modified 2 years ago

#19989 new defect

Tor fails to bootstrap with an Exit as EntryNode

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: fallback path-selection tor-client weird-options dont-do-that-then entrynodes regression?
Cc: Actual Points:
Parent ID: Points: 1
Reviewer: Sponsor:

Description (last modified by teor)

When I try to run tor with EntryNodes x (where x is a single Exit relay), it hangs at:

Aug 26 00:51:57.000 [notice] Bootstrapped 45%: Asking for relay descriptors
Aug 26 00:51:57.000 [notice] I learned some more directory information, but not enough to build a circuit: We need more microdescriptors: we have 0/6973, and can only build 0% of likely paths. (We have 0% of guards bw, 0% of midpoint bw, and 0% of exit bw = 0% of path bw.)
Aug 26 00:51:58.000 [notice] Bootstrapped 50%: Loading relay descriptors

This issue might prevent us from switching to one guard in future releases.
This issue likely makes Exits useless as fallback directories for IPv6-only microdescriptor clients (#19608).

I can reproduce this issue on 0.2.9.2-alpha-dev, 0.2.8.{6,7}, maint-0.2.7, maint-0.2.6 using the following command:

src/or/tor DataDirectory /tmp/tor.$$ SOCKSPort 0 EntryNodes x

Child Tickets

TicketStatusOwnerSummaryComponent
#20071newTor clients need 4 routers when connecting via IPv6, but only 3 using IPv4Core Tor/Tor

Change History (11)

comment:1 Changed 3 years ago by arma

Works for me? What 'x' did you choose? I just chose moria1 and it bootstrapped fine.

Also, didn't we move to one guard like a year ago?

comment:2 Changed 3 years ago by teor

Description: modified (diff)
Keywords: fallback added; guard removed
Summary: Tor fails to bootstrap with a single EntryNodeTor fails to bootstrap with an Exit as EntryNode

I chose an exit. It fails for me with any exit.
I've updated the description and the title.

comment:3 Changed 3 years ago by teor

Interestingly, it works if you supply two Exits for the EntryNodes, so that's strange behaviour.

comment:4 Changed 3 years ago by arma

How strange!

I wonder if this is an accidental side effect from our weighting algorithms, where we avoid using exits as directory mirrors when the ratio of bandwidth is a certain way in the network.

comment:5 Changed 3 years ago by teor

Here is the debug output from a similar issue, where Tor refuses to choose a single middle node, even though it fits all the criteria:

Sep 05 17:30:04.000 [debug] router_choose_random_node(): We found 0 running nodes.
Sep 05 17:30:04.000 [debug] router_choose_random_node(): We removed 0 excludednodes, leaving 0 nodes.
Sep 05 17:30:04.000 [debug] router_choose_random_node(): We removed 3 excludedsmartlist, leaving 0 nodes.
Sep 05 17:30:04.000 [info] compute_weighted_bandwidths(): Empty routerlist passed in to consensus weight node selection for rule weight as middle node
Sep 05 17:30:04.000 [info] router_choose_random_node(): We couldn't find any live, stable routers; falling back to list of all routers.
Sep 05 17:30:04.000 [debug] router_choose_random_node(): We found 1 running nodes.
Sep 05 17:30:04.000 [debug] router_choose_random_node(): We removed 0 excludednodes, leaving 1 nodes.
Sep 05 17:30:04.000 [debug] router_choose_random_node(): We removed 3 excludedsmartlist, leaving 1 nodes.
Sep 05 17:30:04.000 [debug] compute_weighted_bandwidths(): Got negative bandwidth weights. Defaulting to naive selection algorithm.
Sep 05 17:30:04.000 [debug] compute_weighted_bandwidths(): Generated weighted bandwidths for rule weight as middle node based on weights Wg=1.000000 Wm=1.000000 We=1.000000 Wd=1.000000 with total bw 0
Sep 05 17:30:04.000 [info] rend_consider_services_intro_points(): Unable to find an intro point that we can connect to directly for 4x463d2itvwimvzw, falling back to a 3-hop path.

But when there are two nodes, Tor happily chooses exactly the same node as the single node above (I know it's the single node, because it's the only one set as reachable directly in this network):

Sep 05 17:30:04.000 [debug] router_choose_random_node(): We found 3 running nodes.
Sep 05 17:30:04.000 [debug] router_choose_random_node(): We removed 0 excludednodes, leaving 3 nodes.
Sep 05 17:30:04.000 [debug] router_choose_random_node(): We removed 3 excludedsmartlist, leaving 0 nodes.
Sep 05 17:30:04.000 [info] compute_weighted_bandwidths(): Empty routerlist passed in to consensus weight node selection for rule weight as middle node
Sep 05 17:30:04.000 [info] router_choose_random_node(): We couldn't find any live, stable routers; falling back to list of all routers.
Sep 05 17:30:04.000 [debug] router_choose_random_node(): We found 5 running nodes.
Sep 05 17:30:04.000 [debug] router_choose_random_node(): We removed 0 excludednodes, leaving 5 nodes.
Sep 05 17:30:04.000 [debug] router_choose_random_node(): We removed 3 excludedsmartlist, leaving 2 nodes.
Sep 05 17:30:04.000 [debug] compute_weighted_bandwidths(): Got negative bandwidth weights. Defaulting to naive selection algorithm.
Sep 05 17:30:04.000 [debug] compute_weighted_bandwidths(): Generated weighted bandwidths for rule weight as middle node based on weights Wg=1.000000 Wm=1.000000 We=1.000000 Wd=1.000000 with total bw 0
Sep 05 17:30:04.000 [debug] extend_info_from_node(): using 127.0.0.1:5000 for test000a

This debug log should allow us to identify where single nodes are failing to be selected, at least in the intro case.

comment:6 Changed 3 years ago by teor

#20071 might be another case of this, with IPv6 clients.

comment:7 Changed 3 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:8 Changed 3 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:9 Changed 3 years ago by teor

#21529 has a user reporting this issue.

comment:10 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:11 Changed 2 years ago by nickm

Keywords: path-selection tor-client weird-options dont-do-that-then entrynodes regression? added
Note: See TracTickets for help on using tickets.