[tbb-bugs] #30239 [Applications/Tor Browser]: TBA: Gracefully handle auto-restart after crash

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Apr 25 19:33:33 UTC 2019

#30239: TBA: Gracefully handle auto-restart after crash
 Reporter:  sysrqb                               |          Owner:  tbb-
                                                 |  team
     Type:  defect                               |         Status:  new
 Priority:  Medium                               |      Milestone:
Component:  Applications/Tor Browser             |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tbb-mobile tbb-8.5-must              |  Actual Points:
  TorBrowserTeam201904                           |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:

Comment (by sysrqb):

 Replying to [comment:5 sisbell]:
 > Looking through the code, It looks like a restart is essentially a NOOP.
 A sticky restart will restart with a null intent, which essentially does
 nothing. This is not what we want, since it leaves the event handlers to
 still receive events from the main app, even though a tor process is not
 running. Good catch.

 Yeah, that was my thought, too - thanks.

 > One alternative to removing the STICKY flag would be to startTor on a
 null intent so it also starts up with the Android service. This really
 depends on what the main app is expecting. Without the sticky flag the
 main app will need to detect the crash and restart the service.

 I can see this being useful in other apps, like Orbot, if they correctly
 handle this case, but in the case of Tor Browser we basically scrub all
 previous state on restart in any case (due to #28507), so restarting the
 service is not what we want right now. I wonder if this should be
 configurable by a preference (which can be checked in `onCreate()` or

 I'll mention here, in the future I think we want to handle "the system
 killed us" in a different way than "the user killed us" because losing
 state in the app (and therefore all open tabs) when the system kills the
 app is a terrible user experience. So, it may be the case in the future we
 want to restart the service automatically when it is killed by the system
 (using the same configuration it used previously). But, we're not there

Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30239#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online

More information about the tbb-bugs mailing list