Start the Remote Agent earlier during the startup of Firefox
Categories
(Remote Protocol :: Agent, enhancement, P2)
Tracking
(firefox101 fixed)
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
Details
(Whiteboard: [bidi-m3-mvp])
Attachments
(4 files, 1 obsolete file)
Similar to what I'm working on for Marionette over on bug 1726465 we should also start the Remote Agent earlier during startup of Firefox. For Marionette we seem to go with final-ui-startup
.
Right now I'm not sure if we can expect regressions for the Remote Agent especially for CDP and when clients try to connect before a browser window is open. Any change should be thoughtful tested.
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Depends on D140368
Assignee | ||
Comment 2•3 years ago
|
||
I pushed a patch to try and as it looks like it's mainly the Puppeteer launcher tests which cause shutdown hangs:
https://treeherder.mozilla.org/jobs?repo=try&revision=90c73c5ae251dd55b60d9ef66f460d890f761f7c
Assignee | ||
Comment 3•3 years ago
|
||
Assignee | ||
Comment 4•3 years ago
|
||
Note that the crashes seem to have started to happen due to one of the commits in this range:
I might further bisect when I find the time. For now I would try to delay the CDP startup until the first window is ready.
Assignee | ||
Comment 5•3 years ago
|
||
Some more updates... when our CDP protocol gets started with the final-ui-startup
observer and a CDP client connects immediately and triggers a shutdown of the browser Firefox ends-up hanging during shutdown with the following output:
FATAL ERROR: AsyncShutdown timeout in IOUtils: waiting for profileBeforeChange IO to complete Conditions: [{"name":"CrashMonitor: Writing notifications to file after receiving profile-before-change and awaiting all checkpoints written","state":{"profile-after-change":true,"final-ui-startup":true,"quit-application-granted":true,"sessionstore-windows-restored":true,"quit-application":true,"profile-change-net-teardown":true,"profile-change-teardown":true,"p
This seems to be related to changes from bug 1749996. I wonder if it is expected that we hang and see a crash here when code tries to shutdown the browser earlier. Barrett could you please shed some light on this? If that should not happen (what I assume) I'm happy to file a bug. Thanks.
Comment 6•3 years ago
|
||
The culprit here is CrashMonitor.jsm is waiting for SessionStore to complete its final write but if we are shutting down before session store is properly initialized, I don't think it will ever write to disk and thus we crash. This is not intended and needs a fix. We've been working around this in tests by making them less artificial (i.e., avoiding very soon-after-startup shutdowns).
Updated•3 years ago
|
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D143380
Assignee | ||
Comment 8•3 years ago
|
||
Assignee | ||
Comment 9•3 years ago
|
||
Depends on D144027
Updated•3 years ago
|
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Comment 11•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/183793870b8c
https://hg.mozilla.org/mozilla-central/rev/2ae34a4a5e03
https://hg.mozilla.org/mozilla-central/rev/a29fcae74671
https://hg.mozilla.org/mozilla-central/rev/0a781928b33b
Description
•