Firefox freezes when trying to open any palette
Categories
(Core :: Graphics, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| relnote-firefox | --- | 139+ |
| firefox-esr115 | --- | unaffected |
| firefox-esr128 | --- | unaffected |
| firefox139 | + | verified |
| firefox140 | + | verified |
| firefox141 | + | verified |
People
(Reporter: quadronom, Assigned: mstange)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 3 external files, 1 obsolete file)
|
5.52 MB,
text/plain
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:139.0) Gecko/20100101 Firefox/139.0
Steps to reproduce:
Not sure what has changed but 139 is probably the most unstable Firefox version.
Even just trying to open the uBlock palette (by clicking on their logo) will freeze Firefox. Unrecoverable. Renderer deadlocks itself (see attached macOS log).
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Performance: General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Oh dear, it's much worse than that. Firefox will freeze anytime something is opened. Even like Firefox MultiContainers will do that. :((
Comment 4•1 year ago
|
||
Moving this to the Graphics Component.
The attached Activity Monitor log shows the parent process main thread in CoreAnimation code callbacks for the full 1.8 seconds of the sampling time. The sampler is labeling the hang as a deadlock involving the "Renderer" thread.
While browsing itself "works" this is a pretty severe defect and impairs proper usage (e.g. whenever I need to disable the ad-blocker for whatever reason).
Any chance somebody can have a look at this?
I'll gladly provide more data – if you point me in the right direction / tell what you need.
| Assignee | ||
Comment 6•1 year ago
|
||
Hi, could you try to capture a profile of this with the Firefox profiler? The profiler can be started and stopped even when the Firefox UI is hung, using signals: https://profiler.firefox.com/docs/#/./async-posix-signal-control
That’s nice! I didn’t know this was possible, perfect! Thanks for pointing that out.
Please see the following:
https://share.firefox.dev/43Mkxy4
This first one is with the general „Firefox“ setting and it „successfully“ hang after trying to open the uBlock palette.
https://share.firefox.dev/45aH2z7
Second one with the „graphics“ setting. Here a big chunk is red = jank.
I hope it helps and you identify the issue! I can always make more of these if you need that.
| Assignee | ||
Comment 8•1 year ago
|
||
[Tracking Requested - why for this release]: Irrecoverable UI hang in certain configurations on macOS
Thanks! This is a deadlock and it must have been introduced recently. Nical, might it have been introduced by bug 1961115?
| Assignee | ||
Comment 9•1 year ago
|
||
quadronom, do you have any gfx.webrender prefs set to non-default values, for example the gfx.webrender.compositor pref?
| Reporter | ||
Comment 10•1 year ago
|
||
Yes it must happened between 138 and 139, I'd say. I never had this issue before.
Let's have a look at my non-default values:
gfx.webrender.all=>truegfx.webrender.compositor=>falsegfx.webrender.precache-shaders=>true
The rest has not been altered.
| Assignee | ||
Comment 11•1 year ago
|
||
Ah, I think I know what the bug is.
It's not really a deadlock, it's more of an "unbalanced" lock. Unfortunately it seems that the calls to PreRender and PostRender need to be perfectly balanced, otherwise you call .Lock() twice and you're done. This is super fragile.
https://phabricator.services.mozilla.com/D245565 added an early return path where PreRender is called but PostRender is not, in the case where both rendered and present are false.
| Assignee | ||
Comment 12•1 year ago
|
||
Actually no, that explanation isn't the full story. Need to look into it more.
If present is false then we also don't call PreRender, so there is no imbalance.
| Assignee | ||
Comment 13•1 year ago
|
||
Ah, this is the new early return that was introduced where we don't call PostRender at all:
if (!beginFrame) {
CheckGraphicsResetStatus(gfx::DeviceResetDetectPlace::WR_BEGIN_FRAME,
/* aForce */ true);
return RenderedFrameId();
}
| Assignee | ||
Comment 14•1 year ago
|
||
And beginFrame is false because we probably hit this early return in RenderCompositorNative::BeginFrame() for popup windows that don't know their size yet:
gfx::IntSize bufferSize = GetBufferSize().ToUnknownSize();
if (!ShouldUseNativeCompositor()) {
if (bufferSize.IsEmpty()) {
return false;
}
Comment 15•1 year ago
|
||
Set release status flags based on info from the regressing bug 1961115
:nical, since you are the author of the regressor, bug 1961115, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 16•1 year ago
|
||
The patch is simple but Phabricator is currently down so I can't upload it.
| Assignee | ||
Comment 17•1 year ago
|
||
Calling PreRender twice without a PostRender call in between causes us to hit a deadlock.
BeginFrame can return false when called for windows that are still in the process of
being opened, during which time they return a size of 0x0.
Updated•1 year ago
|
| Assignee | ||
Comment 18•1 year ago
|
||
Steps to reproduce (macOS only):
- On
about:config, setgfx.webrender.compositortofalse - Restart to apply the pref
- Click the Pocket button in the toolbar, or alternatively click any button that opens a panel whose contents are rendered by an add-on.
Expected results: Normal operation
Actual results: Perma-hang
| Assignee | ||
Comment 19•1 year ago
|
||
Calling PreRender twice without a PostRender call in between causes us to hit a deadlock.
BeginFrame can return false when called for windows that are still in the process of
being opened, during which time they return a size of 0x0.
A new early return without a PostRender call was added in https://phabricator.services.mozilla.com/D245565 .
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 20•1 year ago
|
||
Comment 21•1 year ago
|
||
| bugherder | ||
Comment 22•1 year ago
|
||
The patch landed in nightly and beta is affected.
:mstange, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox140towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 23•1 year ago
|
||
Calling PreRender twice without a PostRender call in between causes us to hit a deadlock.
BeginFrame can return false when called for windows that are still in the process of
being opened, during which time they return a size of 0x0.
A new early return without a PostRender call was added in https://phabricator.services.mozilla.com/D245565 .
Original Revision: https://phabricator.services.mozilla.com/D252243
Updated•1 year ago
|
| Assignee | ||
Comment 24•1 year ago
|
||
Requested Beta uplift on https://phabricator.services.mozilla.com/D252346 .
| Assignee | ||
Comment 25•1 year ago
|
||
quadronom, this fix should be in today's Firefox Nightly. Can you download a Firefox Nightly from https://nightly.mozilla.org/ and check if the problem still occurs in that build? The patch may also have fixed bug 1969010, so please check that one too.
Comment 26•1 year ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: UI hangs on Windows and macOS in some circumstances
- Code covered by automated testing: yes
- Fix verified in Nightly: no
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: We don't have steps to reproduce for the Windows hang (bug 1969346). For the macOS hang:1. On about:config, set gfx.webrender.compositor to false 2. Restart to apply the pref 3. Click the Pocket button in the toolbar, or alternatively click any button that opens a panel whose contents are rendered by an add-on, such as the uBlock Origin toolbar panel.
- Risk associated with taking this patch: low
- Explanation of risk level: Conservative fix which restores previous behavior
- String changes made/needed: none
- Is Android affected?: no
| Assignee | ||
Comment 27•1 year ago
|
||
Calling PreRender twice without a PostRender call in between causes us to hit a deadlock.
BeginFrame can return false when called for windows that are still in the process of
being opened, during which time they return a size of 0x0.
A new early return without a PostRender call was added in https://phabricator.services.mozilla.com/D245565 .
Original Revision: https://phabricator.services.mozilla.com/D252243
Updated•1 year ago
|
Comment 28•1 year ago
|
||
firefox-release Uplift Approval Request
- User impact if declined: UI hangs on Windows and macOS in some circumstances
- Code covered by automated testing: yes
- Fix verified in Nightly: no
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: We don't have steps to reproduce for the Windows hang (bug 1969346). For the macOS hang:1. On about:config, set gfx.webrender.compositor to false 2. Restart to apply the pref 3. Click the Pocket button in the toolbar, or alternatively click any button that opens a panel whose contents are rendered by an add-on, such as the uBlock Origin toolbar panel.
- Risk associated with taking this patch: low
- Explanation of risk level: Conservative fix which restores previous behavior
- String changes made/needed: none
- Is Android affected?: no
Updated•1 year ago
|
Updated•1 year ago
|
Comment 29•1 year ago
|
||
| uplift | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 30•1 year ago
|
||
Reproduced the hang using an old Nightly build from Nightly 2025-05-29, verified that using latest Nightly build 141.0a1 and the latest Beta 140 build from treeherder on macOS 13 that there is no hang when opening a panel from an addon.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 31•1 year ago
|
||
| uplift | ||
Comment 33•1 year ago
|
||
Added to the 139.0.4 relnotes.
Fixed Firefox freezing when switching between apps or opening certain panels within the browser.
Updated•1 year ago
|
Comment 35•1 year ago
|
||
Also verified that this is fixed using Firefox 139.0.4 across platforms (MacOS 13, Ubuntu 22.04 and Windows 11).
Description
•