Update AsyncShutdown blockers to allow IO until the end of the before profile change phase
Categories
(Toolkit :: Async Tooling, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: emmamalysz, Assigned: barret)
References
Details
Attachments
(2 files, 1 obsolete file)
See: https://bugzilla.mozilla.org/show_bug.cgi?id=1649595#c8
This will allow us to replace instances of OS.File.profileBeforeChange.addBlocker
with AsyncShutdown.profileBeforeChange.addBlocker
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
IOUtils now provides a shutdown client for clients to register IO jobs with
that need to run before shutdown finishes. This allows IO jobs to run during
the profileBeforeChange phase.
IOUtils' event queuing has been refactored into a singleton EventQueue class,
which is responsible for running tasks and setting up shutdown blockers. It is
now guarded behind a StaticDataMutex so that is more explicitly clear what is
and is not re-entrant. (The atomic sShutdownFinished cannot be placed behind
the mutex because we need to keep track of that state even when we do not have
an EventQueue.)
Depends on D103972
Comment 5•4 years ago
|
||
Backed out for causing mochitest withouth e10s failures at IOUtils
Backout link: https://hg.mozilla.org/integration/autoland/rev/e3a6a6a2318e8f18f11208cdd54c69ad4c116bb8
Failure log: https://treeherder.mozilla.org/logviewer?job_id=330364821&repo=autoland&lineNumber=2678
Assignee | ||
Comment 6•4 years ago
|
||
Previously we were intializing IOUtils lazily when we received our first IO
request, but that could run into problems when
- shutdown starts before submitting any IO requests, which would then fail to
add shutdown blockers for phases we have already passed; or - the first IO request comes from off-main-thread, which can not tell if the
shutdown blockers are added succesfully.
Now we register an observer to initialize the event queue and add all startup
blockers in the profile-after-change
phase. We can then be sure that IOUtils
will have its blockers added before profile-after-change
.
Depends on D103973
Assignee | ||
Updated•4 years ago
|
Comment 8•4 years ago
|
||
Backed out for causing xpc failures in mozilla::dom::IOUtils::GetEventQueue
Backout link: https://hg.mozilla.org/integration/autoland/rev/2d2d11b73a7534c1c46dafb4ff367739792ecf77
Failure log android xpc: https://treeherder.mozilla.org/logviewer?job_id=330781771&repo=autoland&lineNumber=1799
Failure log linux xpc: https://treeherder.mozilla.org/logviewer?job_id=330781430&repo=autoland
LE: it seems there are marionette failures too:
https://treeherder.mozilla.org/logviewer?job_id=330781541&repo=autoland&lineNumber=30286
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 10•4 years ago
|
||
Backed out 2 changesets (Bug 1672431) for causing bustages in IOUtils.cpp
Backout link: https://hg.mozilla.org/integration/autoland/rev/0e114291722e7ef7b01d5ce72ed8638859228f85
Push with failures, failure log.
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Comment 12•4 years ago
|
||
Backed out 2 changesets (bug 1672431) for Browser-chrome failures with assertion on checkouts/gecko/dom/system/IOUtils.cpp. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer?job_id=332752493&repo=autoland&lineNumber=22488
Push with failures:
https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=b9b380d9a847283c6643ebbb82b3838c90a0453c
Backout:
https://hg.mozilla.org/integration/autoland/rev/f025057a87ceeafc84ca4044c527e6cb6d943d06
Updated•4 years ago
|
Comment 13•4 years ago
|
||
Comment 14•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/33a2d9a28a54
https://hg.mozilla.org/mozilla-central/rev/f0b2f3fad47a
Assignee | ||
Updated•4 years ago
|
Description
•