Closed Bug 862173 Opened 7 years ago Closed 5 years ago

main thread I/O in update service

Categories

(Toolkit :: Application Update, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: Gavin, Assigned: robert.strong.bugs)

References

Details

(Keywords: main-thread-io, meta)

Attachments

(1 file, 2 obsolete files)

Several guilty call sites:
- readStringFromInputStream/readStringFromFile/writeStringToFile
- cleanUpUpdatesDir
- _loadXMLFileIntoArray
- _verifyDownload
- others

I imagine some of this stuff might be difficult to convert to async/off-main-thread I/O using OS.File due to API requirements. But maybe there are some easy targets?
Depends on: 1058137
I just got a 5 minute hang in Nightly while it downloaded and verified a full update on the main thread. Can we prioritize this work?
Flags: needinfo?(spohl.mozilla.bugs)
Flags: needinfo?(robert.strong.bugs)
The profile shows that the vast majority of time was spent in Downloader__VerifyDownload() -> nsCryptoHash::UpdateFromStream. I'm on Windows 10, using a magnetic HDD
Definitely and with other security measures in place this can most likely be removed.
Flags: needinfo?(spohl.mozilla.bugs)
Flags: needinfo?(robert.strong.bugs)
Assignee: nobody → robert.strong.bugs
Status: NEW → ASSIGNED
The attached a patch in progress (still need to fix a couple of more tests) disables this check for platforms when mar signing is enabled which is simple and covers all the cases we care about. I don't think it is worth moving it off the main thread since it is only needed when mar signing is disabled and all apps should move to mar signing just as Firefox has if they haven't already done so.
This should fix up the remaining test failure

pushed to try
https://treeherder.mozilla.org/#/jobs?repo=try&revision=414794e29bf4
Attachment #8650157 - Attachment is obsolete: true
Attachment #8650232 - Flags: review?(spohl.mozilla.bugs)
Attachment #8650232 - Flags: review?(spohl.mozilla.bugs) → review+
\o/
https://hg.mozilla.org/mozilla-central/rev/662ef65e5017
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Duplicate of this bug: 1058137
You need to log in before you can comment on or make changes to this bug.