Opened 11 months ago

Closed 8 months ago

Last modified 5 months ago

#29045 closed defect (fixed)

ask tor to leave dormant mode

Reported by: mcs Owned by: brade
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-rbm, TorBrowserTeam201905R, tbb-backported
Cc: tbb-team Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

In #28624, tor was changed to remember dormant state across restarts. Since Tor Browser in nearly every case is started by a real person who expects to access one or more websites after starting the browser, it makes sense to ask tor to come out of dormant mode every time we start tor.

This can be done by issuing a SIGNAL ACTIVE control port command, although we could also ask the network team to add a torrc option to get this behavior.

For more background, see the following tor-dev message thread:
https://lists.torproject.org/pipermail/tor-dev/2018-December/013588.html

Child Tickets

Change History (11)

comment:1 Changed 10 months ago by mcs

Parent ID: #29357

I filed #29357 to ask the Network Team for an ActiveOnStartup config option. If that is added to tor, we can simple add a line like this to our torrc-defaults file:

ActiveOnStartup 1

comment:2 Changed 8 months ago by asn

hello. #29357 has been merged.

comment:3 in reply to:  2 Changed 8 months ago by mcs

Parent ID: #29357

Replying to asn:

hello. #29357 has been merged.

Thanks! I removed the parent relationship so you can close #29357.

We will need to add the following to Tor Browser's torrc-defaults file:

DormantCanceledByStartup 1

comment:4 Changed 8 months ago by gk

Keywords: TorBrowserTeam201904 added

Assuming this is something for April.

comment:5 Changed 8 months ago by mcs

Keywords: TorBrowserTeam201904R added; TorBrowserTeam201904 removed
Status: newneeds_review

Here is a patch:
https://gitweb.torproject.org/user/brade/tor-browser-build.git/commit/?h=bug29045-01&id=3685e0fd7900082bfd8fd8b5b771d01a9174c4ee

We need to be careful not to ship this patch if we are not using tor 0.4.x.

Also, should I open another ticket to solve this for TBA? Does it use a torrc-defaults file or do we need to use a different technique on Android to address this issue?

comment:6 Changed 8 months ago by mcs

I forgot to mention that to test this you can add a line like the following to your torrc:

DormantClientTimeout 600

This will cause tor to enter dormant mode after 10 minutes with no client-initiated network activity (this is the minimum allowed setting). If you are watching, you will see a message like the following when the transition to dormant mode occurs:

Apr xx xx:00:00.000 [notice] No user activity in a long time: becoming dormant.

Then you can exit and restart Tor Browser and make sure tor leaves dormant mode (it will be obvious if it does not, because bootstrapping progress will stay at 0%).

comment:7 Changed 8 months ago by gk

Keywords: TorBrowserTeam201905R added; TorBrowserTeam201904R removed

No April anymore, moving review tickets to May.

comment:8 Changed 8 months ago by gk

Keywords: tbb-backport added
Resolution: fixed
Status: needs_reviewclosed

Looks good to me. Cherry-picked to master (commit e7c10d72d80c3226802c521b2c591d21dcb2e37f) and marking for backport once we switch 8.5 to the 0.4.x series.

comment:9 in reply to:  5 Changed 8 months ago by gk

Replying to mcs:

Here is a patch:
https://gitweb.torproject.org/user/brade/tor-browser-build.git/commit/?h=bug29045-01&id=3685e0fd7900082bfd8fd8b5b771d01a9174c4ee

We need to be careful not to ship this patch if we are not using tor 0.4.x.

Also, should I open another ticket to solve this for TBA? Does it use a torrc-defaults file or do we need to use a different technique on Android to address this issue?

We don't ship a torrc-defaults file on our own in the mobile build, thus I opened #30380 for the mobile part.

comment:10 Changed 8 months ago by gk

Component: Applications/Tor LauncherApplications/Tor Browser
Keywords: tbb-rbm added

comment:11 Changed 5 months ago by gk

Keywords: tbb-backported added; tbb-backport removed

Cherry-picked to maint-8.5 (commit 7818024b9c0af7b53623cf1dd4b493f8146ff9bb) for 8.5.4.

Note: See TracTickets for help on using tickets.