Disable process priority manager for xpcshell tests
Categories
(Core :: DOM: Content Processes, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: alexical, Assigned: mconley)
References
Details
Attachments
(1 file)
See the xpcshell failures here: https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=203724585&revision=7584dc7444f0526cb0844d16b193c3431f876f27
Assignee | ||
Comment 2•5 years ago
|
||
So the remaining failures, at least as far as I can tell, are xpcshell test failures in the toolkit/components/extensions/test/xpcshell/ directory, with: application crashed [@ mozilla::ipc::MessageChannel::Close()]
which, I think, might be related to both bug 1451192 and bug 1465092.
Having debugged this a tiny bit and discussed things with asuth, I suspect what's happening is this:
I'm hitting this assertion: https://searchfox.org/mozilla-central/rev/9528360768d81b1fc84258b5fb3601b5d4f40076/ipc/glue/MessageChannel.cpp#2692
I think what's happening is that the parent sends a "goodbye" message to the content process for the PBackground protocol. The child receives it, and the channel is marked as closing. Here: https://searchfox.org/mozilla-central/rev/9528360768d81b1fc84258b5fb3601b5d4f40076/ipc/glue/MessageChannel.cpp#1125
Then... something happens in the child, maybe a queued task to try to communicate over PBackground, and it fails and hits MessageChannel::NotifyMaybeChannelError, and because the channel was closing, we transition to the ChannelClosed state: https://searchfox.org/mozilla-central/rev/9528360768d81b1fc84258b5fb3601b5d4f40076/ipc/glue/MessageChannel.cpp#2540-2546
Then we shut down the content process, and fire the xpcom-shutdown-threads observer notification, and we enter here: https://searchfox.org/mozilla-central/rev/9528360768d81b1fc84258b5fb3601b5d4f40076/ipc/glue/BackgroundImpl.cpp#1267
we call this ThreadLocalDestructor thing here: https://searchfox.org/mozilla-central/rev/9528360768d81b1fc84258b5fb3601b5d4f40076/ipc/glue/BackgroundImpl.cpp#1294, which causes us to try to close the channel again here: https://searchfox.org/mozilla-central/rev/9528360768d81b1fc84258b5fb3601b5d4f40076/ipc/glue/BackgroundImpl.cpp#1505
and attempting to close an already closed channel causes us to explode.
Assignee | ||
Comment 3•5 years ago
|
||
I actually have a much simpler solution.
I don't actually think it makes any sense to have the process priority manager enabled during xpcshell tests. The process priority manager only fiddles process priority when a tab becomes active in a content process, and xpcshell tests never have tabs. So they'd all be in the low priority state, which is definitely not desirable.
I think the best way forward here is probably to just disable the process priority manager when running xpcshell tests.
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c6ec6b0911d2 Disable the process priority manager when running xpcshell tests. r=gsvelto
Comment 6•5 years ago
|
||
bugherder |
Description
•