Opened 3 months ago

Last modified 2 weeks ago

#29875 merge_ready defect

Going from obfs4 to snowflake using the Tor Network Settings from the Torbutton doesn't work

Reported by: cypherpunks Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.0.x-final
Component: Core Tor/Tor Version: Tor: 0.3.2.7-rc
Severity: Normal Keywords: tbb-needs, 035-backport, 040-backport, network-team-roadmap-2019-Q1Q2, dgoulet-merge
Cc: dcf, arlolra, cohosh, teor Actual Points: .5
Parent ID: Points:
Reviewer: ahf Sponsor: Sponsor19-must

Description

Going from obfs4 to snowflake using the Tor Network Settings from the Torbutton doesn't work, i.e. nothing happens and no website can load, if I restart the browser then snowflake works perfectly

Child Tickets

TicketStatusOwnerSummaryComponent
#24367closednickmChanging pluggable transports (during start-up) in Tor Browser is brokenCore Tor/Tor
#28027closedneelTor keeps opening circuits while waiting for bridge descriptorsCore Tor/Tor
#28140closedOur circuit died due to an invalid selected path if switching to plugabble transportsCore Tor/Tor

Change History (21)

comment:1 Changed 3 months ago by gk

Yeah, here is what I get in my logs

Mar 25 12:59:36.000 [warn] Failed to find node for hop #1 of our path. Discarding this circuit.
Mar 25 12:59:36.000 [notice] Our circuit 0 (id: 40) died due to an invalid selected path, purpose General-purpose client. This may be a torrc configuration issue, or a bug.
[03-25 12:59:36] TorLauncher DBUG: Event response: 650 WARN Failed to find node for hop #1 of our path. Discarding this circuit. 
[03-25 12:59:36] TorLauncher DBUG: Event response: 650 NOTICE Our circuit 0 (id: 40) died due to an invalid selected path, purpose General-purpose client. This may be a torrc configuration issue, or a bug. 
Mar 25 12:59:37.000 [warn] Failed to find node for hop #1 of our path. Discarding this circuit.
[03-25 12:59:37] TorLauncher DBUG: Event response: 650 WARN Failed to find node for hop #1 of our path. Discarding this circuit. 
Mar 25 12:59:38.000 [warn] Failed to find node for hop #1 of our path. Discarding this circuit.
[03-25 12:59:38] TorLauncher DBUG: Event response: 650 WARN Failed to find node for hop #1 of our path. Discarding this circuit. 
Mar 25 12:59:39.000 [warn] Failed to find node for hop #1 of our path. Discarding this circuit.

and so on.

comment:2 Changed 3 months ago by cypherpunks

Many thanks Georg for the confirmation.

comment:3 Changed 3 months ago by dcf

This is reminiscent of #12774 for meek; but in that case it's caused by a race between multiple copies of Firefox. There's no Firefox here, but maybe it's related to a deeper cause, which is that tor quickly starts multiple copies of the transport program when you change transports, then kills all but one of them. It could be interfering with rendezvous or something.

comment:4 Changed 3 months ago by ahf

Component: Obfuscation/SnowflakeCore Tor/Tor
Milestone: Tor: 0.4.0.x-final
Version: Tor: 0.4.0.1-alpha

This looks like a core tor PT regression.

comment:5 Changed 3 months ago by arma

GeKo, can you confirm this behavior on Tor 0.3.5 as well?

That is, we need to figure out if this is a regression in Tor 0.4.0, or a bug that's been here for longer.

comment:6 in reply to:  5 Changed 3 months ago by gk

Cc: teor added
Keywords: tbb-wants added
Version: Tor: 0.4.0.1-alphaTor: 0.3.2.7-rc

Replying to arma:

GeKo, can you confirm this behavior on Tor 0.3.5 as well?

Yes.

That is, we need to figure out if this is a regression in Tor 0.4.0, or a bug that's been here for longer.

In fact, the last good release is 0.3.2.6-alpha. More precisely 690f646bf8a5de9b is the first bad revision, which tries to work around my #24367. I guess all that trouble speaks for fixing the latter once and for all (too). :)

comment:7 Changed 3 months ago by teor

Keywords: tbb-needs 040-must 034-backport 035-backport 040-backport added; tbb-wants removed
Owner: set to teor
Sponsor: Sponsor19
Status: newassigned

I will try and fix #24367 and #29875. I also opened #29956 so we make tests for these kinds of bugs.

comment:8 Changed 3 months ago by teor

Keywords: 040-must removed
Milestone: Tor: 0.4.0.x-finalTor: 0.4.1.x-final
Owner: teor deleted
Sponsor: Sponsor19Sponsor19-must

comment:9 Changed 5 weeks ago by nickm

Keywords: 041-should added

comment:10 Changed 4 weeks ago by gaba

Keywords: network-team-roadmap-2019-Q1Q2 added

comment:11 Changed 4 weeks ago by gk

Okay, here come the steps tor reproduce this bug on a Linux system:

1) Take a clean, new Tor Browser alpha.
2) Start it with ./start-tor-browser.desktop --debug on the command line, but don't connect directly. Rather, configure obfs4 to use one of the built-in bridges.
3) Continue bootstrap afterwards.
4) When the browser window shows up click on the onion button on the toolbar and select "Tor Network Settings...".
5) Change the the PT selected to use snowflake, click OK.
6) You should see the Failed to find node for hop #1 of our path messages right away.

comment:12 Changed 3 weeks ago by nickm

Owner: set to nickm
Status: assignedaccepted

Okay, this is indeed reproducible. The problem appears to be that we don't realize we are missing a descriptor for our bridge and need to fetch it -- possibly because router_dir_info_changed() isn't getting called.

I think the right solution may be to call router_dir_info_changed() when the list of bridges changes.

comment:13 Changed 3 weeks ago by nickm

Keywords: 034-backport 034-backport removed

034 is EOL in 10 days; no backport for this.

comment:14 Changed 3 weeks ago by nickm

That seems to be _part_ of the right solution, but not sufficient. The failure mode has changed here.

comment:15 Changed 3 weeks ago by nickm

Ah, there was a second problem: num_usable_bridges() was counting bridges that were not actually configured any more.

comment:16 Changed 3 weeks ago by nickm

Actual Points: .5
Status: acceptedneeds_review

This branch WFM when merged into master: bug29875_035. 0.3.5 PR at https://github.com/torproject/tor/pull/1066
Here it is merged into master, with a practracker update: bug29875_master. master PR at https://github.com/torproject/tor/pull/1067

In my testing, I had to wait a couple of minutes after changing the configuration for snowflake to work; I don't know whether that's typical.

It is possible that this will fix some cases of #24367 as well.

comment:17 Changed 2 weeks ago by asn

Reviewer: ahf

comment:18 Changed 2 weeks ago by ahf

Status: needs_reviewmerge_ready

Looks good. #24367 should be closed when this gets merged.

comment:19 Changed 2 weeks ago by nickm

Keywords: dgoulet-merge added

comment:20 Changed 2 weeks ago by dgoulet

Milestone: Tor: 0.4.1.x-finalTor: 0.4.0.x-final

Merged into master! Milestone move to 040 for backport.

comment:21 Changed 2 weeks ago by nickm

Keywords: 041-should removed
Note: See TracTickets for help on using tickets.