[Wayland] Firefox UI freezes when the WebAuthn security key prompt appears (AMD radeonsi, hardware WebRender)
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr153 | --- | unaffected |
| firefox157 | --- | unaffected |
| firefox158 | --- | wontfix |
| firefox159 | --- | wontfix |
| firefox160 | --- | wontfix |
| firefox161 | --- | fixed |
| firefox162 | --- | fixed |
People
(Reporter: allstars.chh, Assigned: stransky)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(6 files, 3 external files, 2 obsolete files)
Yubikey is NOT required to reproduce this bug.
Step to reproduce:
- visit https://demo.yubico.com/webauthn-technical/registration
- click "Next"
- Then Firefox hangs
Normally it will pop up a dialog saying "Touch your security key to continue with ... ", but the dialog doesn't show up.
If I switch to X11, then this problem is gone.
| Reporter | ||
Updated•1 month ago
|
Comment 1•1 month ago
|
||
Set release status flags based on info from the regressing bug 2070729
:stransky, since you are the author of the regressor, bug 2070729, could you take a look?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 2•1 month ago
|
||
I'm unable to reproduce on latest nightly & Fedora 44 & Gnome.
Please attach your about:support page.
When Firefox hangs, please try to get backtrace of the hang:
https://fedoraproject.org/wiki/Debugging_guidelines_for_Mozilla_products#Application_freeze
(Please use official binaries for it:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_binaries)
Thanks.
| Assignee | ||
Updated•1 month ago
|
| Reporter | ||
Comment 3•1 month ago
|
||
| Reporter | ||
Comment 4•1 month ago
|
||
| Reporter | ||
Comment 5•1 month ago
|
||
This bug is only reproducible on Plasma Wayland, GNOME Wayland doesn't have this problem.
| Reporter | ||
Comment 6•1 month ago
|
||
My other machine (Dell XPS 14) has the same Ubuntu 24.04, the same KDE plasma version 5.27.12, but doesn't have this problem.
The problem is reproducible on my machine (Lenovo P620) with AMD GPU AMD radeonsi
| Assignee | ||
Comment 7•1 month ago
|
||
I see, Thanks. Looks like we hit a bug/deadlock in AMD drivers when we delete a popup and destroy compositor (at least it looks like from the BT) and we're blocked in display roundtrip.
A workaround may be to remove the explicit commit from popup and keep it for toplevel only but it may be worth to investigate the AMD deadlock and report upstream. Do you mind to install mesa debug info packages and try to catch the bt again with debug symbols?
Thanks.
Comment 8•1 month ago
|
||
Could you also capture a Wayland protocol log of the hang?
Close Firefox Nightly completely, then start it from a terminal with:
WAYLAND_DEBUG=client firefox-nightly 2> ~/wayland-debug.log
Reproduce the hang on the Yubico demo page, wait about 10 seconds, then press Ctrl+C in the terminal.
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 9•1 month ago
|
||
It confuses me why we're hitting HW compositing bug while we don't use HW rendering for popups:
https://searchfox.org/firefox-main/rev/23fd2ecbdb459f63606a188fdea2d4dbee05507c/widget/gtk/nsWindow.cpp#657
Which also leads to question if we create EGLWindow even if it's not used:
https://searchfox.org/firefox-main/rev/23fd2ecbdb459f63606a188fdea2d4dbee05507c/widget/gtk/nsWindow.cpp#4279
| Assignee | ||
Comment 10•1 month ago
|
||
Yoshi Cheng-Hao Huang,
please also run on terminal with MOZ_LOG="Widget:5,WidgetPopup:5", reproduce the issue and attach the log here (terminate Firefox by CTRL+C when it's frozen).
Thanks.
| Reporter | ||
Comment 11•1 month ago
|
||
| Reporter | ||
Comment 12•1 month ago
|
||
| Reporter | ||
Comment 13•1 month ago
|
||
(In reply to Thinker Li [:sinker] from comment #8)
Could you also capture a Wayland protocol log of the hang?
Close Firefox Nightly completely, then start it from a terminal with:
WAYLAND_DEBUG=client firefox-nightly 2> ~/wayland-debug.logReproduce the hang on the Yubico demo page, wait about 10 seconds, then press Ctrl+C in the terminal.
Please check wayland-debug-[trimmed|full].log.gz
| Reporter | ||
Comment 14•1 month ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #9)
It confuses me why we're hitting HW compositing bug while we don't use HW rendering for popups:
https://searchfox.org/firefox-main/rev/23fd2ecbdb459f63606a188fdea2d4dbee05507c/widget/gtk/nsWindow.cpp#657Which also leads to question if we create EGLWindow even if it's not used:
https://searchfox.org/firefox-main/rev/23fd2ecbdb459f63606a188fdea2d4dbee05507c/widget/gtk/nsWindow.cpp#4279
The popup is #notification-popup, which has "remote=true"
https://searchfox.org/firefox-main/rev/3f373ae59cb09e60f4044f9bb37fe27247986234/browser/base/content/popup-notifications.inc.xhtml#14
So the WebAuth prompt gets an EGL surface and goes through Mesa
| Reporter | ||
Comment 15•1 month ago
|
||
| Reporter | ||
Comment 16•1 month ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #10)
Yoshi Cheng-Hao Huang,
please also run on terminal with MOZ_LOG="Widget:5,WidgetPopup:5", reproduce the issue and attach the log here (terminate Firefox by CTRL+C when it's frozen).
Thanks.
comment 15, nightly_moz_log_Widget_WidgetPop.txt
I also noticed that my debug build won't have this hang problem, so it looks this is a timing problem?
Have you checked whether this is a regression or happens in a new profile?
| Assignee | ||
Comment 18•1 month ago
|
||
Yes, looks like a race in drivers and our GL code. We may fix that by just delayed webrender delete to clear it after unmap - we call it from main thread from the unmap event right now and it's blocking call. But it may be worth to investigate the underlying issue in AMD/MESA drivers.
| Reporter | ||
Comment 19•1 month ago
|
||
(In reply to Kagami Rosylight 🏳️🌈🏳️⚧️ [:saschanaz] (they/them) from comment #17)
Have you checked whether this is a regression or happens in a new profile?
Originally I ran into from my Nightly released from Ubuntu package firefox-trunk
Then I tried the official nightly build from Mozilla.
I also tried building from latest m-c with optimized enabled
All of them reproduce this problem. So this doesn't relate to an existing profile or a new one.
I thought this was a regression from bug 2070729, but maybe it's just that bug increased the chance of the race condition somewhere.
Updated•1 month ago
|
| Assignee | ||
Comment 20•1 month ago
|
||
Updated•1 month ago
|
| Assignee | ||
Comment 21•1 month ago
|
||
I wonder if that's caused by old MESA. The KDE 5.X/MESA 25.x is a bit outdated, the recent line is 26.x.
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 22•1 month ago
|
||
Comment 23•1 month ago
|
||
Comment 24•1 month ago
|
||
Comment 25•1 month ago
|
||
Reverted this because it was causing Linux Wayland mochitests-plain failures.
| Assignee | ||
Comment 26•1 month ago
|
||
Looks like what we hit at Bug 2002206 when we tried to remove it. For some reason mochitest loves the hack.
Updated•1 month ago
|
| Reporter | ||
Comment 27•1 month ago
|
||
Hi Martin:
I tried your patches, but unfortunally the problem (comment 0) still exists.
| Assignee | ||
Comment 28•1 month ago
|
||
Thanks for testing. Please try the updated ones - I removed the layer manager destroy completely.
If you see the hang with it please attach gdb backtrace from the freeze again - would be great to have bt from the mesa lib, can you install debug info packages for it?
Thanks.
| Reporter | ||
Comment 29•1 month ago
|
||
| Assignee | ||
Comment 30•1 month ago
|
||
Try for the updated patches:
https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=106203
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 31•1 month ago
|
||
Thanks. The log is good, it shows mesa is just waiting to compositor to return used wl_buffer, it's not related to any particular Firefox code although some pattern may make it more visible. Plasma 5.x is not Wayland stable, please update to 6.x line.
Updated•1 month ago
|
| Assignee | ||
Comment 32•26 days ago
|
||
I have a patch for it but need to wait after phabricator outage.
| Assignee | ||
Comment 33•22 days ago
|
||
| Assignee | ||
Comment 34•22 days ago
|
||
| Assignee | ||
Comment 35•20 days ago
|
||
Hm, the try doesn't look much better although seems to crash/fail on different place. May be fixed by modified composition destroy on ::Destroy().
| Assignee | ||
Comment 37•13 days ago
|
||
I can reproduce that on KDE 6.8 / Fedora 45. I expected to be 5.x bug but looks like a recent one. Also HDR mode makes it more likely but I can see it without it too. Looks like it affects the popups opened without user interaction only, i.e. when the popup is opened by Firefox itself.
Maybe we juts missing event processing somewhere which causes the lock? User action (mouse click) may trigger the event loop which may 'fix' it.
| Assignee | ||
Comment 38•13 days ago
|
||
Hm, the patches above don't address that at all, I can reproduce it with them too.
| Assignee | ||
Comment 39•13 days ago
|
||
Confirmed the Bug 2070729 revert fixes it but I still have no idea why it affects the popups only.
| Assignee | ||
Updated•13 days ago
|
| Assignee | ||
Updated•13 days ago
|
Comment 40•13 days ago
|
||
| Assignee | ||
Comment 41•13 days ago
|
||
So it's generally a dupe of Bug 2081642 but just for the toplevel commit.
So the correct fix for Bug 2080307 / https://phabricator.services.mozilla.com/D332610 is to cache the opaque region, ignore force commit and commit everything together when we're mapped.
We can't apply the force commit to unmapped windows.
Updated•13 days ago
|
Updated•13 days ago
|
| Assignee | ||
Comment 42•13 days ago
|
||
| Assignee | ||
Comment 43•13 days ago
|
||
Let's keep the patch here minimal for uplift and fix the opaque region commit at Bug 2089544.
Comment 44•13 days ago
|
||
| bugherder | ||
| Assignee | ||
Updated•12 days ago
|
Comment 45•12 days ago
|
||
Comment 46•12 days ago
|
||
| bugherder | ||
Comment 47•12 days ago
|
||
Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.
Comment 48•12 days ago
|
||
The patch landed in nightly and beta is affected.
:stransky, please make an uplift decision for beta:
- For beta, nominate the patch for beta uplift approval if the fix should be included in this release, or set
status-firefox161towontfixif the fix can wait for the next release.
Uplift requests can be submitted from Lando: D333159, D339973.
See Requesting an Uplift for documentation on how to request an uplift.
For more information, please visit BugBot documentation.
Updated•12 days ago
|
| Assignee | ||
Comment 49•9 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D339973
Updated•9 days ago
|
Comment 50•9 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Missing popup windows on Wayland
- Code covered by automated testing?: no
- Fix verified in Nightly?: no
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Ignore force redraw of hidden windows
- String changes made/needed?: none
- Is Android affected?: no
Updated•9 days ago
|
Updated•9 days ago
|
Comment 51•9 days ago
|
||
| uplift | ||
Comment 52•8 days ago
|
||
Clearing the uplift needinfo request since an uplift has been requested for all the affected channels.
For more information, please visit BugBot documentation.
Description
•