[Wayland] Firefox becomes unresponsive after opening downloads menu
Categories
(Core :: Widget: Gtk, defect, P2)
Tracking
()
People
(Reporter: evanmohr22, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0
Steps to reproduce:
- Observe general responsiveness of browser by opening tabs, closing them, typing in URL bar, etc.
- Begin downloading a file
- Open the downloads menu (the little circle that fills up as the download goes)
- Observe the unresponsiveness of the browser by trying to open tabs, close them, etc.
System details: Occurs on Fedora 37 with Flathub Firefox packaging and on Ubuntu 22.10 with Snap packaging. MOZ_ENABLE_WAYLAND=1 set as environmental variable. I believe this issue first started on Firefox 108.
Actual results:
The browser becomes unresponsive, not responding when trying to open tabs, close tabs, type in text fields.
Video demonstration: https://youtu.be/FnSQ5C7A058. In the beginning of the video, I demonstrate that Firefox is responsive, I am able to open and close tabs, type, etc. But once I open the downloads menu, I can no longer create new tabs or close them. As I try to switch tabs, it is unresponsive. Eventually, it responds to my actions, but then becomes unresponsive again. I can't type in the URL bar, but I can type in the Google bar. Shortly after, I can't even type in the Google search bar, I can only highlight and click the "x" to clear my input. Once I hit the downloads menu button again, everything registers at once. The tabs I tried to open before all open at once, some of the text I entered in the URL bar show up,
Expected results:
Firefox remains responsive
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Can you try plain Mozilla binary?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_binaries
Thanks.
| Reporter | ||
Comment 3•2 years ago
|
||
I wasn't able to reproduce the bug on the plain Mozilla binary nor the Arch Linux firefox package. Maybe the issue is somehow related to the sandboxing technologies used by snap and flatpak?
| Reporter | ||
Comment 4•2 years ago
|
||
Update: The issue is not related to sandboxing, I just the issue occur on the Arch package too.
Comment 5•2 years ago
|
||
Please try to reproduce on plain Mozilla binary. Do you use Arch or Fedora?
Also please attach about:support from affected browser. I wonder if that's X11 or Wayland session, snadboxed or not (flatpak/snap).
Thanks.
| Reporter | ||
Comment 6•2 years ago
|
||
The issue still occurs in Firefox 116. I was able to reliably reproduce it on the plain Mozilla binary on Fedora Silverblue 38, but it also occurs on snap package in Ubuntu 23.04 and flatpak package on every distro I've tested it on. More importantly, I've only run into reproduce the issue while using the native Wayland window (MOZ_ENABLE_WAYLAND=1).
The most reliable setup I've found is:
- Open Firefox, sign into GitHub (needed to download the following file), and bookmark this link (for convenience): https://github.com/canonical/ubuntu-core-desktop/actions/runs/5868602310
- Close out of Firefox
- Open Firefox
- Open a new tab (so that you have 2 tabs open; I couldn't reproduce the issue with just one tab open)
- Click on the bookmark link
- Download the file by clicking on "image" under the "Artifacts" section.
- Click on other tab or other parts of Firefox UI; notice how everything is unresponsive
One oddity I've mentioned is that activating the Gnome Activities view will cause Firefox to update the UI. So it could possibly be a Gnome Bug? I will test later.
Another video recreation: https://www.youtube.com/watch?v=_e5kno7uI_g
Some things to note: between 0:08 and 0:11 I'm trying to switch tabs, but nothing happens. Between 0:11 and 0:13, I'm trying to open the hamburger menu but nothing happens. At 0:14 there is a delayed opening of the extensions screen and hamburger menu, but text is missing from the hamburger menu. Pocket menu is empty at 0:15, but I don't use it so I don't know if that's a common bug or not. And after 0:15, Firefox is behaving correctly.
| Reporter | ||
Comment 7•2 years ago
|
||
Update: not a Gnome specific bug. I was able to replicate the issue on Sway.
Updated•2 years ago
|
Comment 8•2 years ago
|
||
Can you try XWayland? (i.e. run firefox with MOZ_ENABLE_WAYLAND=0)
Comment 10•2 years ago
|
||
Yes, it's because we don't pause compositor on X11.
Updated•2 years ago
|
| Reporter | ||
Comment 11•1 year ago
|
||
Still affects Firefox 121.
Comment 12•1 year ago
|
||
Will try to reproduce. The reproducer at https://github.com/canonical/ubuntu-core-desktop/actions/runs/5868602310 looks outdated/deleted, is it still relevant? I guess you can reproduce it because the download is still running and the popup is updating, right?
Comment 13•1 year ago
|
||
Does the reproduction works with any large file, for instance iso from https://fedoraproject.org/workstation/download ?
Comment 14•1 year ago
|
||
Okay, found another image at github but I still can't reproduce it :(
| Reporter | ||
Comment 15•1 year ago
|
||
The Fedora download doesn't cause it, but downloading the Ubuntu Core Desktop image does trigger the issue.
As far as I can tell, the main difference between downloading the Fedora image and Ubuntu Core image is that the Ubuntu Core image starts off by saying something like "unknown time remaining" for the downloading while the Fedora image immediately shows the time remaining. If that is what is causing the issue, then maybe internet speed is a factor since I have relatively slow internet (2MB/s download).
Comment 16•1 year ago
|
||
(In reply to evanmohr22 from comment #15)
The Fedora download doesn't cause it, but downloading the Ubuntu Core Desktop image does trigger the issue.
As far as I can tell, the main difference between downloading the Fedora image and Ubuntu Core image is that the Ubuntu Core image starts off by saying something like "unknown time remaining" for the downloading while the Fedora image immediately shows the time remaining. If that is what is causing the issue, then maybe internet speed is a factor since I have relatively slow internet (2MB/s download).
Coll, thanks. Will try with ubuntu image.
Comment 17•1 year ago
|
||
Could you post a link which you use for Ubuntu image download? The one I used calculates download time so I can't reproduce the issue.
Thanks.
Updated•1 year ago
|
Comment 18•1 year ago
|
||
Please try to use Firefox profiler (https://profiler.firefox.com/), run profiling and reproduce the freeze and upload the profile here. It may reveal where Firefox is frozen.
Thanks.
Comment 19•1 year ago
|
||
I can confirm this happens for me with downloads of unknown size such as compressed source files on github, not files of known size. I ran the profiler and it being all new to me, it was a bit confusing and it took a while to complete a run without Firefox freezing while doing the offending task. I could only do it after just downloading one compressed source file from github and not touch anything on Firefox's interface.
Here's the url to my profiler run: https://share.firefox.dev/3O7VAGb. That's with a new profile and on nightly. At first I thought you/it meant to upload my firefox profile that has the crash logs in it, which I did, and it was asking for something else. Sorry, this is all new to me.
Comment 20•1 year ago
|
||
Just to add, an example download file that I've been using is: https://codeload.github.com/mozilla/DeepSpeech/tar.gz/refs/tags/v0.9.3. But my experience, any compressed source files of unknown size make Firefox freeze. This also doesn't happen with MOZ_ENABLE_WAYLAND=0 environment variable set.
Comment 21•1 year ago
|
||
Thanks for the profile. Looks like we're waiting for system events there. If you open the download and Firefox is frozen, what happens when download is finished? Is everything back to normal? Or do you need to do any unusual steps to wake up the browser?
Also please try to crash browser when it's frozen (use latest nightly please):
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Getting_Mozilla_crash_report_from_running_or_frozen_Firefox
And attach crash ID here. That gives general overview of all processes/threads there.
Thanks.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 23•1 year ago
|
||
I couldn't make it crash but I force killed it via terminal and submitted the data when Firefox asked. The content part of Firefox becomes completely blank when it happens and the interface doesn't want to respond. When it does I can't switch tabs. I'm working on adding more troubleshooting information here if I can figure things out. I'm new to Linux, new to bug teting. Here's a link to what I copied in the report I submitted: https://pastebin.com/ak6s4et1
Comment 24•1 year ago
|
||
I'm not sure this is what you need but here's my journalctl output from time of starting firefox to crashing: https://pastebin.com/DjWaisRQ
Comment 25•1 year ago
|
||
Cool!
- Please attach crash ID from about:crashes page (also please submit them).
- Do Firefox resume to normal operation when download is finished or not?
Thanks.
Comment 26•1 year ago
|
||
-
Crash ID: 0b4d948a-08ca-5a8d-6ed2-fd2fef79235d
-
If it was a fast single download, yes, it'd often resume. If not, it would stall for up to a minute and I wouldn't have the patience to wait so I'd kill it
Comment 27•1 year ago
|
||
Please run on terminal with MOZ_LOG="WidgetVsync:5 nsRefreshDriver:5 WidgetPopup:5" env variables, reproduce the freeze, terminate firefox and attach the log here.
For instance run as:
MOZ_LOG="WidgetVsync:5 nsRefreshDriver:5 WidgetPopup:5" firefox > log.txt 2>&1
and attach the log.txt here.
Thanks.
Comment 28•1 year ago
|
||
Also please attach your about:support page.
Thanks.
Comment 29•1 year ago
|
||
Comment 30•1 year ago
|
||
Output of following from time of process start to force kill: MOZ_LOG="WidgetVsync:5 nsRefreshDriver:5 WidgetPopup:5" firefox > log.txt 2>&1
Comment 31•1 year ago
|
||
I managed to wait it out for five minutes and Firefox fully recovered. Of course while downloading the offending file I still had unresponsive tabs and content but the main menu was still responsive.
Comment 32•1 year ago
|
||
So from the logs it seemed like this was a vsync issue so in about:config I set widget.wayland.vsync.enabled=false and downloaded multiple offending files and thankfully the Firefox interface remained responsive. Thank you guys for your work.
| Reporter | ||
Comment 33•1 year ago
|
||
I can also confirm that setting widget.wayland.vsync.enabled=false fixed the issue.
| Reporter | ||
Comment 34•1 year ago
|
||
Although setting that to false also seems to bring down the frame rate to 60fps, but manually setting layout.frame_rate to my monitor's refresh rate (170) fixes that issue.
Comment 35•1 year ago
|
||
I set layout.frame_rate to my monitor's 144hz, restarted and it showed 60hz according to www.vsynctester.com. But I digress, no relation to the issue in question.
Comment 36•1 year ago
|
||
I'm not sure it's relevant or if it showed in the logs but I use KDE and have "Reduce latency by allowing screen tearing artifacts in fullscreen windows" aka vsync disabled on my system.
Comment 37•1 year ago
|
||
Ok, after testing, changing KDE's vsync option doesn't make a difference.
Comment 38•1 year ago
|
||
Please try this custom Firefox build with potential fix with VSync enabled:
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Yqc0uRwdQbCzUbICAe9c6A/runs/0/artifacts/public/build/target.tar.bz2
(Comes from https://treeherder.mozilla.org/jobs?repo=try&revision=79d2ab35b2bc14d76f0dcfcf56171e0673af958f)
Just download the tarball and run it the same way as Nightly:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_binaries
Thanks!
Updated•1 year ago
|
Comment 39•1 year ago
|
||
I'm sorry, I posted wrong link (to 32bit executable).
Correct one is:
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/auyVBGd1Q8OPGhqK6gpNZw/runs/0/artifacts/public/build/target.tar.bz2
Thanks.
| Reporter | ||
Comment 40•1 year ago
|
||
I did not run into the issue on the new build, so it seems to be fixed.
Comment 41•1 year ago
|
||
I can confirm also. With the default vsync config I had no trouble with the offending downloads.
Comment 42•1 year ago
|
||
Great, Thanks. Can you please try this new build?
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/f9JnpTGVTlCS5M0t7Sg55Q/runs/0/artifacts/public/build/target.tar.bz2
Updated•1 year ago
|
Comment 44•1 year ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #42)
Great, Thanks. Can you please try this new build?
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/f9JnpTGVTlCS5M0t7Sg55Q/runs/0/artifacts/public/build/target.tar.bz2
Can confirm. That build works as well with either vsync settings.
Comment 45•1 year ago
|
||
Can you please check this new build?
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/VtUbsC6KSdq3DdVOHVCenQ/runs/0/artifacts/public/build/target.tar.bz2
Thanks!
| Reporter | ||
Comment 46•1 year ago
|
||
New build is also good, no issues.
Comment 47•1 year ago
|
||
In my short testing it's worked fine. I normally run stable but I'm gonna run this version full time to better test. If no reply here then all's good.
Comment 48•1 year ago
|
||
Should be fixed by Bug 1875369.
Comment 49•1 year ago
|
||
Can you please check latest nightly if you still see it?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_binaries
Thanks.
| Reporter | ||
Comment 50•1 year ago
|
||
Latest nightly is good, I couldn't reproduce the issue.
Updated•1 year ago
|
Description
•