Closed Bug 1872970 Opened 10 months ago Closed 9 months ago

[X11] Firefox UI freezes

Categories

(Core :: Widget: Gtk, defect, P2)

Desktop
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1875369

People

(Reporter: tomjordell, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files)

I've switched from using Firefox Dev on Windows 10 to Firefox Dev on Fedora for the last couple of months, and everything was working fine on Windows for the last few years. On Fedora however, every now and then the Firefox UI hangs as I'm browsing around, cannot switch tabs, and titles from some tabs disappear if I try. It happens quite often, about every 20-30 minutes of actively using the browser.
The page I'm on still works fine, I can click around, play media and so on without issue. But I cannot open a new tab or switch tabs.

I can manually trigger a "freeze" by just switching tabs quickly using the mouse (freeze doesn't trigger with ALT+[1/2/3/etc]), but I'm not sure if it's exactly the same bug because it can sometimes recover, while the "freeze" I'm not deliberately trying to trigger never recovers; I have to restart the browser to get rid of it. The browser doesn't crash, it just "hangs" and I can still click the close-button to restart the browser. I created a crash with kill -s 11 $(pidof firefox) when the organic freeze occured, which is here:

Crash report: https://crash-stats.mozilla.org/report/index/2ecc8972-2ede-4d9b-af7b-f54b70240104

Reason: SIGSEGV

Top 10 frames of crashing thread:

0  libc.so.6  poll  /usr/src/debug/glibc-2.38-14.fc39.x86_64/sysdeps/unix/sysv/linux/poll.c:29
1  libxul.so  PollWrapper  widget/gtk/nsAppShell.cpp:82
2  libglib-2.0.so.0  g_main_context_poll_unlocked  /usr/src/debug/glib2-2.78.3-1.fc39.x86_64/glib/gmain.c:4653
2  libglib-2.0.so.0  g_main_context_iterate_unlocked  /usr/src/debug/glib2-2.78.3-1.fc39.x86_64/glib/gmain.c:4344
3  libglib-2.0.so.0  g_main_context_iteration  /usr/src/debug/glib2-2.78.3-1.fc39.x86_64/glib/gmain.c:4414
4  libxul.so  nsAppShell::ProcessNextNativeEvent  widget/gtk/nsAppShell.cpp:492
4  libxul.so  nsBaseAppShell::DoProcessNextNativeEvent  widget/nsBaseAppShell.cpp:131
4  libxul.so  nsBaseAppShell::OnProcessNextEvent  widget/nsBaseAppShell.cpp:267
4  libxul.so  {virtual override thunk}  widget/nsBaseAppShell.cpp
4  libxul.so  nsThread::ProcessNextEvent  xpcom/threads/nsThread.cpp:1114

If you need more information or need me to do something, please let me know.

It would help if you could please attach the output of your about:support to this report. Also, does anything appear under your about:crashes report?

I'm not seeing anything in the full call stack (in the crash report) that would indicate graphics involvement here. Seems more appropriate for Widgets: Gtk to evaluate this one.

Component: Graphics → Widget: Gtk
Attached file about:support

Hey Bob, I've attached the output of about:support. When this freeze occurs, nothing is produced in about:crashes - Firefox does not crash, the UI just freezes but the page I'm on still works fine. But cannot open links in new tab or switch tabs.

Apologies for selecting the wrong component, first time reporting here and thought graphics sounded relevant.

It's x11/NVIDIA drivers so it's kinda expected due to NVIDIA binary drivers used.
Please try to get more crashes if Firefox is frozen by kill -s 11 $(pidof firefox) to get more data.
Thanks.

Flags: needinfo?(tomjordell)

(In reply to tomjordell from comment #0)

I can manually trigger a "freeze" by just switching tabs quickly using the mouse

Can this bug be prevented by setting nglayout.enable_drag_images to false on about:config and restarting Firefox? (bug 1796960)
(widget.gtk.ignore-bogus-leave-notify could also play a role (bug 1798131).)

OS: Unspecified → Linux
Hardware: Unspecified → Desktop
See Also: → 1796960

(In reply to Darkspirit from comment #5)

(In reply to tomjordell from comment #0)

I can manually trigger a "freeze" by just switching tabs quickly using the mouse

Can this bug be prevented by setting nglayout.enable_drag_images to false on about:config and restarting Firefox? (bug 1796960)
(widget.gtk.ignore-bogus-leave-notify could also play a role (bug 1798131).)

I'll set nglayout.enable_drag_images to false and see if prevents this issue, and initial testing of quickly switching tabs using the mouse doesn't trigger the bug anymore.

I found this video by another person who has reported similar behaviour, and the video shows identical behaviour to what I experience myself so this issue might be a duplicate? https://bugzilla.mozilla.org/show_bug.cgi?id=1802229#c0

Flags: needinfo?(tomjordell)

Yes, I think it's a duplicate - at least the backtrace looks like stalled internal compositor than NVIDIA/GFX driver issue.

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.

Flags: needinfo?(tomjordell)
Priority: -- → P2
Attached file log.txt
Flags: needinfo?(tomjordell)

I've attached the log after reproducing the issue. I haven't had the issue at all since setting nglayout.enable_drag_images to false, so before I took the log.txt you asked for I set that setting back to true to be able to reproduce the freeze.

Thanks, it looks promising.
Please try to flip 'browser.chrome.toolbar_tips' at about:config and try to reproduce again (with the log).

Flags: needinfo?(tomjordell)

Should I have nglayout.enable_drag_images set to true or false during this test?

nglayout.enable_drag_images=true to reproduce the issue.
Thanks.

Attached file log-toolbar_tips.txt
Flags: needinfo?(tomjordell)
See Also: → 1812405
Summary: Firefox UI freezes → [Wayland] Firefox UI freezes
Flags: needinfo?(stransky)

Just to note that I don't use Wayland but instead use Xorg, since I have a G-Sync monitor that doesn't G-Sync under Wayland on this somewhat old graphics card due to NVIDIA still working on Wayland G-Sync driver support for older cards.

# System Details Report
---

## Report details
- **Date generated:**                              2024-01-16 14:10:19

## Hardware Information:
- **Hardware Model:**                              MSI MS-7751
- **Memory:**                                      8,0 GiB
- **Processor:**                                   Intel® Core™ i7-2600K × 8
- **Graphics:**                                    NVIDIA GeForce GTX TITAN X
- **Disk Capacity:**                               860,2 GB

## Software Information:
- **Firmware Version:**                            V17.11
- **OS Name:**                                     Fedora Linux 39 (Workstation Edition)
- **OS Build:**                                    (null)
- **OS Type:**                                     64-bit
- **GNOME Version:**                               45.3
- **Windowing System:**                            X11
- **Kernel Version:**                              Linux 6.6.9-200.fc39.x86_64
Flags: needinfo?(stransky)
Summary: [Wayland] Firefox UI freezes → [X11] Firefox UI freezes
Flags: needinfo?(stransky)

I didn't get the freeze, however I did get a crash instead that I was able to reproduce twice: https://crash-stats.mozilla.org/report/index/66bda76d-3ef2-4f3d-b92c-e05010240119

Flags: needinfo?(tomjordell)
Flags: needinfo?(tomjordell)

Thanks a lot for testing, will look at it.

I am not able to reproduce the freeze on that new build. There were a couple of errors in the terminal, but nothing that seems to have affected the browser. I'll attach them anyway, in case it's relevant:

[sven@fedora firefox]$ MOZ_ENABLE_WAYLAND=0 ./firefox -ProfileManager -no-remote
[Parent 36652, Main Thread] WARNING: gtk_bin_remove: assertion 'priv->child == child' failed: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:187

(firefox-default:36652): Gtk-CRITICAL **: 05:45:52.020: gtk_bin_remove: assertion 'priv->child == child' failed
Flags: needinfo?(tomjordell)

(In reply to Sven from comment #23)

I am not able to reproduce the freeze on that new build. There were a couple of errors in the terminal, but nothing that seems to have affected the browser. I'll attach them anyway, in case it's relevant:

[sven@fedora firefox]$ MOZ_ENABLE_WAYLAND=0 ./firefox -ProfileManager -no-remote
[Parent 36652, Main Thread] WARNING: gtk_bin_remove: assertion 'priv->child == child' failed: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:187

(firefox-default:36652): Gtk-CRITICAL **: 05:45:52.020: gtk_bin_remove: assertion 'priv->child == child' failed

Thanks, it looks like there's an error during GtkWindow config. Will look at it.

Should be fixed by Bug 1875369.

Can you please check latest nightly if you still see it?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_binaries

As for the Gtk-CRITICAL **: 05:45:52.020: gtk_bin_remove: assertion 'priv->child == child' error message - if you see it please try to run on terminal with G_DEBUG=fatal-warnings env variable. It should crash on the message so please submit crash report and post crash ID here.

Thanks!

Flags: needinfo?(stransky) → needinfo?(tomjordell)

I cannot reproduce the bug on latest nightly, so it seems to be fixed! Did not get the GTK error this time around either.

Flags: needinfo?(tomjordell)

Okay, Thanks!

Status: UNCONFIRMED → RESOLVED
Closed: 9 months ago
Duplicate of bug: 1875369
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: