[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #29180 [Applications/Tor Browser]: MAR download stalls when about dialog is opened
#29180: MAR download stalls when about dialog is opened
------------------------------------------+----------------------
Reporter: mcs | Owner: tbb-team
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
------------------------------------------+----------------------
In #28885, Georg encountered a bug that causes the browser update to
stall. Here are the steps that Kathy and I used to reproduce it:
1. Start a clean copy of Tor Browser 8.5a5 on a 64-bit Linux system.
2. Set `app.update.auto` to `false` and `app.update.log` to `true`.
3. Open the about dialog and click "Update to 8.5a6" to begin downloading
the MAR file.
4. Quickly close and reopen the about dialog. The download will stall and
not make any further progress.
The following was logged to the browser console:
AUS:SVC UpdateService:downloadUpdate - no support for downloading more
than one update at a time
This problem is fallout from the fact that when the about dialog is
opened, the browser cancels the download and starts a new one. Here is the
code from the `startDownload()` function inside `browser/base/content
/aboutDialog-appUpdater.js`:
...
this.aus.pauseDownload();
let state = this.aus.downloadUpdate(this.update, false);
...
Looking at the code in `toolkit/mozapps/update/nsUpdateService.js`, we see
that `pauseDownload()` cancels the first download via
`nsIRequest.cancel()`, which does not take effect immediately. Cleanup of
the `Downloader` occurs inside an `onStopRequest()` listener and that
entire process is asynchronous.
One possible fix is to not pause and restart the download when the about
dialog is opened. Kathy and I do not yet know if that would introduce
other problems.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29180>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs