Solved The entire system periodically freezes while using Firefox and Chromium applications.

Hello.
FreeBSD 14.2 RELEASE
Xorg
Xfce
/var/log/messages and dmesg show nothing
32 GB memory without swap

For over a year, I've noticed that while using Firefox and Chromium applications, the entire system freezes completely:
  • applications become unresponsive,
  • switching between windows does not work,
  • the mouse cursor may initially move, but after a while, it also stops in one place,
  • typing on the keyboard sometimes works, sometimes does not,
  • switching between TTY works with a delay - after pressing "CTRL + ALT + F8," the switch occurs after 10-60 seconds.

The freezing occurs when many tabs are open (20-50) or when there are a few (3-10) very "heavy" tabs, such as trading charts.

It recovers by itself after some time.
Sometimes it takes 10-20 seconds, sometimes 1-2 minutes.
There are times when I wait 2-3 minutes, and it doesn't recover, so I turn it off using the power button (in this case, FreeBSD shuts down correctly, finishing all processes).

Has anyone else experienced this?
I suspect that the cause might be related to Xorg.
 
Last edited:
Install inxi and tell what tells a command

Code:
inxi -bSMGxx

You could also check xsession error files

Code:
cat .xsession-errors.old | grep chromium
cat .xsession-errors.old | grep firefox

Check also core files

Code:
ls -l *.core

You could start Firefox via command line for seeing its processes

Code:
firefox about:processes
 
swapinfo
 
swap I do not use
Code:
# ./memory.sh
суббота, 16 августа 2025 г. 11:15:21 (MSK)
   Wired:4558M
  Active:3460M
 Laundry:2343M
Inactive:8420M
   Cache:0000M
    Free:11966M
     Gap:0000M
--------------
   Total:30779M
   ARC  :9089609B


Code:
# inxi -bSMGxx
Duplicate specification "debug-width|debug-y|debug-zy:i" for option "debug-zy"
System:
  Host: home Kernel: FreeBSD 14.2-RELEASE amd64 bits: 64 compiler: clang
    v: 18.1.6 Desktop: Xfce 4.20.1 tk: Gtk 3.24.48 wm: xfwm dm: SDDM
    OS: FreeBSD 14.2-RELEASE
Machine:
  Type: Desktop System: ASUS product: All Series v: N/A serial: N/A
  Mobo: ASUSTeK model: Z87-A v: Rev 1.xx serial: *********
    UEFI: American Megatrends v: 2103 rev: 4.6 date: 08/15/2014 rom size: 8 MB
CPU:
  Info: 8-core Intel Core i7-4770K [MCP] arch: Haswell speed (MHz): 3500
Graphics:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics
    driver: vgapci bus-ID: 0:0:2.0 chip-ID: 8086:0412
  Display: server: X.Org 21.1.18 compositor: xfwm4 driver:
    loaded: modesetting resolution: 1680x1050~60Hz s-dpi: 96
  OpenGL: renderer: Mesa Intel HD Graphics 4600 (HSW GT2)
    v: 4.6 Mesa 24.1.7 direct render: Yes
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    driver: re port: N/A bus-ID: 0:3:0.0 chip-ID: 10ec:8168
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    driver: re port: N/A bus-ID: 0:6:0.0 chip-ID: 10ec:8168
Drives:
  Local Storage: total: raw: 2.5 TiB usable: 5.44 TiB used: 854.1 GiB (15.3%)
Info:
  Processes: 162 Uptime: 1d 17h 30m Memory: 30.89 GiB used: 19.24 GiB (62.3%)
  Init: init (BSD) v: N/A Compilers: gcc: N/A clang: 18.1.6 Packages: pkg: 5
  Shell: csh v: 6.22.04 running-in: mc inxi: 3.3.11

.xsession-errors.old file not found in home folder.

core dump disable.
Code:
dumpdev="NO"
 
Does the problem arises when you only use firefox ?
Does the problem arises when you only use chrome ?
Yes.
The problem occurs both in each browser and in other applications.
For example, if you open a large text file through Kate or KWrite.
Krusader sometimes hangs when opening a large archive.
 
Does the machine recover after a while, or do you have to reboot to get it back? Or does it reboot on its own?
 
Yes.
The problem occurs both in each browser and in other applications.
For example, if you open a large text file through Kate or KWrite.
Krusader sometimes hangs when opening a large archive.
I think that you have a faulty or incompatible RAM memory module.
 
Does the machine recover after a while, or do you have to reboot to get it back? Or does it reboot on its own?
It recovers by itself after some time.
Sometimes it takes 10-20 seconds, sometimes 1-2 minutes.
There are times when I wait 2-3 minutes, and it doesn't recover, so I turn it off using the power button (in this case, FreeBSD shuts down correctly, finishing all processes).

I think that you have a faulty or incompatible RAM memory module.
I will try to work on Linux and will update you in a couple of weeks about the results. I will check if the problem occurs on Linux.
 
If you happen to use drm-kmod take a look at 14.3. From the release notes for 14.3: "LinuxKPI: linux_alloc_pages() now honors__GFP_NORETRY. This is to fix slowdowns with drm-kmod that get worse over time as physical memory become more fragmented (and probably also depending on other factors). "

Time for an update to 14.3?
 
This issue occurred for me after a power outage. Now, when I enter the Firefox settings, it automatically closes. I even completely uninstalled it and reinstalled it from scratch, and removed all Mozilla settings, but the problem wasn't solved.
Using the `fsck` command didn't fix the issue either. For now, I'm using the Chromium browser because every time I go to Firefox settings, the system freezes and the program closes. Even upgrading to FreeBSD 14.3 didn't resolve the problem.
Even Firefox-ESR and Firefox clones like Waterfox, etc., have the same problem.
 
This issue occurred for me after a power outage. Now, when I enter the Firefox settings, it automatically closes. I even completely uninstalled it and reinstalled it from scratch, and removed all Mozilla settings, but the problem wasn't solved.
Using the `fsck` command didn't fix the issue either. For now, I'm using the Chromium browser because every time I go to Firefox settings, the system freezes and the program closes. Even upgrading to FreeBSD 14.3 didn't resolve the problem.
Even Firefox-ESR and Firefox clones like Waterfox, etc., have the same problem.

You should clean out your profile directory completely, not just the settings,
 
Try run firefox from other profile:
Code:
mkdir /tmp/profile1
firefox -profile /tmp/profile1/

Also try to create a new user, enter it and run Firefox from under it.
Thanks. I did what you said but the same thing happend:

$ mkdir /tmp/profile1
$ firefox -profile /tmp/profile1/
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt (t=17.9142) [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
JavaScript warning: https://cdn.accounts.firefox.com/settings/prod/static/js/observability-chunk.5cef0779869d13a77aba.js, line 1: Script terminated by timeout at:
o@https://cdn.accounts.firefox.com/settings/prod/static/js/observability-chunk.5cef0779869d13a77aba.js:1:11651
6851/de/</<@https://cdn.accounts.firefox.com/settings/prod/static/js/observability-chunk.5cef0779869d13a77aba.js:1:11727
6851/E/<@https://cdn.accounts.firefox.com/settings/prod/static/js/observability-chunk.5cef0779869d13a77aba.js:1:7674
t@https://cdn.accounts.firefox.com/settings/prod/static/js/observability-chunk.5cef0779869d13a77aba.js:1:7545

console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "getService", Cc[aContract] is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: TopSitesFeed: Failed to fetch data from MARS server: NetworkError when attempting to fetch resource.
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
console.warn: services.settings: Could not determine network status. Message: TypeError: can't access property "isLinkUp", lazy.gNetworkLinkService is undefined
1755684642825 FirefoxAccounts ERROR FxA rejecting with error UNVERIFIED_ACCOUNT, details: undefined
1755684642826 FirefoxAccounts ERROR Background refresh of initial profile failed: Error: UNVERIFIED_ACCOUNT(resource://gre/modules/FxAccounts.sys.mjs:1663:18) JS Stack trace: _error@FxAccounts.sys.mjs:1663:18
withSessionToken@FxAccounts.sys.mjs:874:18
console.info: "Skipping device list refresh; not signed in"
console.info: "Skipping fetching other attached clients"
1755684642827 FirefoxAccounts ERROR FxA rejecting with error UNVERIFIED_ACCOUNT, details: undefined
1755684642827 FirefoxAccounts ERROR Background refresh of initial profile failed: Error: UNVERIFIED_ACCOUNT(resource://gre/modules/FxAccounts.sys.mjs:1663:18) JS Stack trace: _error@FxAccounts.sys.mjs:1663:18
withSessionToken@FxAccounts.sys.mjs:874:18
1755684672290 FirefoxAccounts ERROR FxA rejecting with error UNVERIFIED_ACCOUNT, details: undefined
1755684672290 FirefoxAccounts ERROR Background refresh of initial profile failed: Error: UNVERIFIED_ACCOUNT(resource://gre/modules/FxAccounts.sys.mjs:1663:18) JS Stack trace: _error@FxAccounts.sys.mjs:1663:18
withSessionToken@FxAccounts.sys.mjs:874:18
1755684672292 FirefoxAccounts ERROR FxA rejecting with error UNVERIFIED_ACCOUNT, details: undefined
[Parent 3685, Main Thread] WARNING: Failed to connect to proxy: 'glib warning', file /wrkdirs/usr/ports/www/firefox/work/firefox-142.0/toolkit/xre/nsSigHandlers.cpp:201

(firefox:3685): libnotify-WARNING **: 14:41:12.297: Failed to connect to proxy
1755684672299 FirefoxAccounts ERROR Background refresh of initial profile failed: Error: UNVERIFIED_ACCOUNT(resource://gre/modules/FxAccounts.sys.mjs:1663:18) JS Stack trace: _error@FxAccounts.sys.mjs:1663:18
withSessionToken@FxAccounts.sys.mjs:874:18
1755684672299 FirefoxAccounts ERROR Background refresh of initial profile failed: Error: UNVERIFIED_ACCOUNT(resource://gre/modules/FxAccounts.sys.mjs:1663:18) JS Stack trace: _error@FxAccounts.sys.mjs:1663:18
withSessionToken@FxAccounts.sys.mjs:874:18
console.info: "Skipping device list refresh; not signed in"
console.info: "Skipping fetching other attached clients"
console.error: "WebChannel message failed. No message data."
1755684689540 Sync.ErrorHandler ERROR Sync encountered a login error
console.error: "Sync encountered an error - see about:sync-log for the log file."
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Segmentation fault (core dumped)
 
For over a year, I've noticed that while using Firefox and Chromium applications, the entire system freezes completely:
I used FreeBSD since 14.1 (on 14.3-R-p2 now) and never seen this on Xfce with Xorg. But maybe it's GPU-related? I have Intel UHD 630 and force Intel's DDX (not modesetting), and gfx.webrender.all in Firefox.

Edit: Actually I do recall one random system freeze now that I wrote that, and it was specifically when I switched to modesetting from Intel DDX to test something in an unrelated app (the system freeze was while browsing in Firefox). If on AMD or Intel GPU I'd force their specific DDX driver in xorg.conf, and disable compositing (Xfce has a checkbox option; iirc can't do it easily if at all from GNOME)

I have odd video playback in Firefox still today with OSS though; also solved 14.3-R-p2 (FF 140.2.0esr) with installing sndio: https://forums.freebsd.org/threads/stuttering-video-in-browsers-oss-related.97857/#post-701850
 
If you happen to use drm-kmod take a look at 14.3. From the release notes for 14.3: "LinuxKPI: linux_alloc_pages() now honors__GFP_NORETRY. This is to fix slowdowns with drm-kmod that get worse over time as physical memory become more fragmented (and probably also depending on other factors). "

Time for an update to 14.3?
Thank you.
The update to FreeBSD 14.3 solved this problem.
Over the past 3 days, there has been not a single hang.
It seems that this commit is fixed problem - https://cgit.freebsd.org/src/commit/?id=831e6fb0baf6


Similar problems:

Created: 2024-03-04
Bug 277476 - graphics/drm-515-kmod: amdgpu periodic hangs due to phys contig allocations
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277476

Created: 2024-05-21
X11 unusably slow with DRM 5.15 and 6.1's amdgpu on a RX 800
https://github.com/freebsd/drm-kmod/issues/302

Created: 2025-04-24
AMD Radeon Vega progressively slower over time

Created: 2025-06-08
Sudden unresponsiveness in GUI
 
Yesterday and today, the system started freezing again.
The windows stop switching, and the keyboard and mouse don't work. After 10-20 seconds, the mouse may start working again. The freezing can last for a minute or two, or it may not go away at all.

I have to close the browser to free up RAM.
I have Firefox, Chromium, Krusader, Konsole, Kate, and several smaller applications running.
Firefox and Chromium are consuming most of the RAM.
I have 32 GB of RAM without swap.

dmesg:
Code:
pid 70559 (ungoogled-chromium), jid 1, uid 1001, was killed: a thread waited too long to allocate a page
Limiting closed port RST response from 305 to 212 packets/sec

"top" after exit killed chromium
top_after_exit_chromium.png
 
Yesterday and today, the system started freezing again.
The windows stop switching, and the keyboard and mouse don't work. After 10-20 seconds, the mouse may start working again. The freezing can last for a minute or two, or it may not go away at all.

I have to close the browser to free up RAM.
I have Firefox, Chromium, Krusader, Konsole, Kate, and several smaller applications running.
Firefox and Chromium are consuming most of the RAM.
I have 32 GB of RAM without swap.

dmesg:
Code:
pid 70559 (ungoogled-chromium), jid 1, uid 1001, was killed: a thread waited too long to allocate a page
Limiting closed port RST response from 305 to 212 packets/sec

"top" after exit killed chromium

Well, do you think this could be a real OOM situation? Aka unrelated to the hangs that might be fixed with the commit you linked?

Can you share a top(1) output from shortly before the OOM kill?
 
Back
Top