Debug build does not start from profile manager (Assertion failure: !IsAcceptingPromises() immediately after selecting profile)
Categories
(Core :: DOM: Service Workers, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox71 | --- | wontfix |
firefox72 | --- | verified |
firefox73 | --- | verified |
People
(Reporter: alice0775, Assigned: perry)
References
(Regression)
Details
(Keywords: nightly-community, regression)
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta+
|
Details | Review |
Browser does not launch after select a profile from Profile Manager.
.\firefox.exe -no-remote -p
However, it works if specify profile name
.\firefox.exe -no-remote -p profile
Reproducible: always
Steps to reproduce:
-
download a windows debug build zip
-
Extract the zip to a folder
-
Open cmd.exe
-
Enter <drive letter of the folder>
-
Enter cd <path to the folder>
-
Enter .\firefox.exe -no-remote -p
-
Select a profile and start browser
--- Browser would not launch.
Actual results:
Borowser would not appear, not launch
Expected results:
Browser should launch
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=720c1e5a8dd3f5bda4ae32137d1c624a1ad55301&tochange=be9a6289486a6f366e431782b84a0c0633f8fec2
Regressed by: Bug 1456995
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
The following assertion appears in cmd.exe window.
Assertion failure: !IsAcceptingPromises(), at z:/build/build/src/dom/serviceworkers/ServiceWorkerShutdownBlocker.cpp:124
Reporter | ||
Comment 2•5 years ago
|
||
:perry,
Your bunch of patch seems to cause the regression. Can you please look into this?
Reporter | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
So I think the situation is that in profile manager mode, the ServiceWorkerManager comes into existence somehow and creates the ServiceWorkerShutdownBlocker. Its mState starts out as VariantType<AcceptingPromises>() which causes the destructor's assertion check at https://searchfox.org/mozilla-central/rev/11d9c7b7fa82fdfb8ac2a8f0864e9d8d5fe2b926/dom/serviceworkers/ServiceWorkerShutdownBlocker.cpp#124 to explode.
I presume the profile-manager in this case does not generate profile-do-change or profile-after-change (https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Observer_Notifications) and we should be waiting for those. The control flow is weird in that SWM::Init will always call GetRegistrations at https://searchfox.org/mozilla-central/rev/11d9c7b7fa82fdfb8ac2a8f0864e9d8d5fe2b926/dom/serviceworkers/ServiceWorkerManager.cpp#356 but it will silently be a no-op at https://searchfox.org/mozilla-central/rev/11d9c7b7fa82fdfb8ac2a8f0864e9d8d5fe2b926/dom/serviceworkers/ServiceWorkerRegistrar.cpp#182 if the profile hasn't been started.
It seems like we either want:
- The SWM to be explicitly aware of the lack of a profile itself directly.
- Or the registrar to signal to the caller in the case there's no profile so that the SWM can reconfigure itself to not trigger that assertion? (I'm not sure how fancy we want to get. Minimally just not triggering the assertion might be the best way to avoid other surprise breakage.)
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Looks like this isn't Windows specific.
Assignee | ||
Comment 6•4 years ago
|
||
Pushed by pjiang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/958f25e0cae2 call ServiceWorkerShutdownBlocker::StopAcceptingPromises when ProfileManager exits r=asuth
Comment 8•4 years ago
|
||
bugherder |
Comment 9•4 years ago
|
||
I think this bug actually bit QA earlier today when trying to test a build on Beta. Please nominate this patch for uplift there as well.
Assignee | ||
Comment 10•4 years ago
|
||
Comment on attachment 9113660 [details]
Bug 1591353 - call ServiceWorkerShutdownBlocker::StopAcceptingPromises when ProfileManager exits r?asuth
Beta/Release Uplift Approval Request
- User impact if declined: Browser will crash when starting up in Profile Manager mode.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): It performs required cleanup when the browser exits Profile Manager mode that is verified by an assertion later.
- String changes made/needed:
Comment 11•4 years ago
|
||
Hello! Reproduced the issue using Firefox 72.0a1 (20191025095546) debug build. The build didn't open with a profile manager using "-no-remote -p" or "-p" commands in cmd on Windows 10x64.
The issue is verified fixed with Firefox 73.0a1 (20191206044357) debug build on Windows 10x64, macOS 10.15 and Ubuntu 18.04. The debug build is successfully started using the profile manager ("-p" and "-no-remote -p") commands.
Comment 12•4 years ago
|
||
Comment on attachment 9113660 [details]
Bug 1591353 - call ServiceWorkerShutdownBlocker::StopAcceptingPromises when ProfileManager exits r?asuth
serviceworker fix, approved for 72.0b4
Comment 13•4 years ago
|
||
bugherder uplift |
Comment 14•4 years ago
|
||
Verified with Firefox 72.0b5 (20191210230245) on Windows 10x64, macOS 10.15 and Ubuntu 18.04. The debug build is started using the profile manager.
Description
•