Problem with Chromium after latest update on unstable branch

The bulk of our packages come from arch-am. We sync our unstable branch with their repo periodically to be current with them. We do have manjaro related packages we maintain we call overlays. Also some of arch-arm packages are not compatible due to various reasons so we maintain our version. You can usually tell arch-arm packages in our repo database by looking at the Packager line using pacman -Si <package name>.

[ray@jellyfin ~]$ pacman -Si chromium
Repository      : extra
Name            : chromium
Version         : 131.0.6778.85-1
Description     : A web browser built for speed, simplicity, and security
Architecture    : aarch64
URL             : https://www.chromium.org/Home
Licenses        : BSD-3-Clause
Groups          : None
Provides        : None
Depends On      : gtk3  nss  alsa-lib  xdg-utils  libxss  libcups  libgcrypt
                  ttf-liberation  systemd  dbus  libpulse  pciutils  libva
                  libffi  desktop-file-utils  hicolor-icon-theme  fontconfig
                  brotli  libjpeg-turbo  icu  flac  libxml2  libwebp  minizip
                  opus  harfbuzz  libxslt  libpng  freetype2
Optional Deps   : pipewire: WebRTC desktop sharing under Wayland
                  kdialog: support for native dialogs in Plasma
                  gtk4: for --gtk-version=4 (GTK4 IME might work better on
                  Wayland)
                  org.freedesktop.secrets: password storage backend on GNOME /
                  Xfce
                  kwallet: support for storing passwords in KWallet on Plasma
                  upower: Battery Status API support
Conflicts With  : None
Replaces        : None
Download Size   : 85.69 MiB
Installed Size  : 316.93 MiB
Packager        : Arch Linux ARM Build System <builder+seattle@archlinuxarm.org>
Build Date      : Wed 20 Nov 2024 05:47:01 AM CST
Validated By    : MD5 Sum  SHA-256 Sum  Signature

But since I downgraded chromium manually from an outside source the installed package will show up with pacman -Qi <package name>.

[ray@jellyfin ~]$ pacman -Qi chromium
Name            : chromium
Version         : 130.0.6723.58-1
Description     : A web browser built for speed, simplicity, and security
Architecture    : aarch64
URL             : https://www.chromium.org/Home
Licenses        : BSD-3-Clause
Groups          : None
Provides        : None
Depends On      : gtk3  nss  alsa-lib  xdg-utils  libxss  libcups  libgcrypt
                  ttf-liberation  systemd  dbus  libpulse  pciutils  libva
                  libffi  desktop-file-utils  hicolor-icon-theme  fontconfig
                  brotli  libjpeg-turbo  icu  flac  libxml2  libwebp  minizip
                  opus  harfbuzz  libxslt  libpng  freetype2
Optional Deps   : pipewire: WebRTC desktop sharing under Wayland [installed]
                  kdialog: support for native dialogs in Plasma
                  gtk4: for --gtk-version=4 (GTK4 IME might work better on
                  Wayland) [installed]
                  org.freedesktop.secrets: password storage backend on GNOME /
                  Xfce [installed]
                  kwallet: support for storing passwords in KWallet on Plasma
                  [installed]
                  upower: Battery Status API support [installed]
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 314.99 MiB
Packager        : Arch Linux ARM Build System <builder+seattle@archlinuxarm.org>
Build Date      : Wed 16 Oct 2024 08:11:56 PM CDT
Install Date    : Sat 23 Nov 2024 08:46:29 AM CST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

Thanks for the info. So then we are actually using “mostly” arch packages without any modification. I asked this question before and got conflicting answers. Anyway, i got back to unstable right now and chromium 131 made the same crashes again. Each tab crashes after a short while. Even the “settings” tab crashes. I disabled all my extensions. Crash still happens. I will now revert to a previous version of chromium. But i would like to help if anybody is interested in my logs to diagnose the problem. Just ask.

I can’t help. I have the same problem with the latest version of chromium. I have run out of ideas to diagnose. I aim to just monitor for arch-arm’s next version and download and install and test it.

https://archlinuxarm.org/packages/aarch64/chromium

Something right here is the cause of our worries:

https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/commit/a7b2f71e60e23dc2d90cc4544129ba503ed7eac1

Did some research in the chromium git log and the only change was upgrading the version.

Update:

I got the versions wrong. There was a ton of changes between the last 2 versions in their and our repo. This involved several commits/bug fixes and versions that never made it to their or our repo’s.

 diff --git a/extra/chromium/.SRCINFO b/extra/chromium/.SRCINFO
index db3645611..024367561 100644
--- a/extra/chromium/.SRCINFO
+++ b/extra/chromium/.SRCINFO
@@ -1,6 +1,6 @@
 pkgbase = chromium
 	pkgdesc = A web browser built for speed, simplicity, and security
-	pkgver = 130.0.6723.58
+	pkgver = 131.0.6778.85
 	pkgrel = 1
 	url = https://www.chromium.org/Home
 	arch = x86_64
@@ -62,13 +62,19 @@ pkgbase = chromium
 	options = !lto
 	source = fetch-chromium-release
 	source = https://github.com/foutrelis/chromium-launcher/archive/v8/chromium-launcher-8.tar.gz
+	source = unbundle-add-enable_freetype.patch
+	source = unbundle-icu-target.patch
+	source = const-atomicstring-conversion.patch
 	source = compiler-rt-adjust-paths.patch
 	source = increase-fortify-level.patch
 	source = use-oauth2-client-switches-as-default.patch
-	sha256sums = b571d1593df8cbc0ee2fba9eb3597f5106ed740aaeaf853c310e776fff4c9d87
+	sha256sums = 720a1196410080056cd97a1f5ec34d68ba216a281d9b5157b7ea81ea018ec661
 	sha256sums = 213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a
+	sha256sums = f6e05adc80bd2f22b766d41a91739276c62201e47272c561f18a099c4a809e37
+	sha256sums = 67de7744b92cbfa6fcbf43a71ba531eb5a7b00381d96703d8dc3dfdadaebf67d
+	sha256sums = ac0c9e366ca6afe0839f9ecb6bc42614747349da0c3dc46408e5053dcb7ada76
 	sha256sums = b3de01b7df227478687d7517f61a777450dca765756002c80c4915f271e2d961
 	sha256sums = d634d2ce1fc63da7ac41f432b1e84c59b7cceabf19d510848a7cff40c8025342
-	sha256sums = a9b417b96daec33c9059065e15b3a92ae1bf4b59f89d353659b335d9e0379db6
+	sha256sums = 6de648d449159dd579e42db304aca0a36243f2ac1538f8d030473afbbc8ff475
 
 pkgname = chromium
diff --git a/extra/chromium/PKGBUILD b/extra/chromium/PKGBUILD
index 1a8638892..cb47c2de1 100644
--- a/extra/chromium/PKGBUILD
+++ b/extra/chromium/PKGBUILD
@@ -15,7 +15,7 @@
 highmem=1
 
 pkgname=chromium
-pkgver=130.0.6723.58
+pkgver=131.0.6778.85
 pkgrel=1
 _launcher_ver=8
 _manual_clone=0
@@ -39,17 +39,23 @@ optdepends=('pipewire: WebRTC desktop sharing under Wayland'
 options=('!lto') # Chromium adds its own flags for ThinLTO
 source=(https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz
         https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz
+        unbundle-add-enable_freetype.patch
+        unbundle-icu-target.patch
+        const-atomicstring-conversion.patch
         compiler-rt-adjust-paths.patch
         increase-fortify-level.patch
         use-oauth2-client-switches-as-default.patch
         0001-widevine-support-for-arm.patch
         0002-Run-blink-bindings-generation-single-threaded.patch
         0003-Fix-eu-strip-build-for-newer-GCC.patch)
-sha256sums=('720a1196410080056cd97a1f5ec34d68ba216a281d9b5157b7ea81ea018ec661'
+sha256sums=('aa296edec7275d19feade5ef32cbe7dfdd41594d4c0c1afd94bbf4d310c38c4e'
             '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
+            'f6e05adc80bd2f22b766d41a91739276c62201e47272c561f18a099c4a809e37'
+            '67de7744b92cbfa6fcbf43a71ba531eb5a7b00381d96703d8dc3dfdadaebf67d'
+            'ac0c9e366ca6afe0839f9ecb6bc42614747349da0c3dc46408e5053dcb7ada76'
             'b3de01b7df227478687d7517f61a777450dca765756002c80c4915f271e2d961'
             'd634d2ce1fc63da7ac41f432b1e84c59b7cceabf19d510848a7cff40c8025342'
-            'a9b417b96daec33c9059065e15b3a92ae1bf4b59f89d353659b335d9e0379db6'
+            '6de648d449159dd579e42db304aca0a36243f2ac1538f8d030473afbbc8ff475'
             '4246da8a2d0bd689b6c8a6ce3042e72ec72497ea64ad47ceb92334afa34a27f1'
             '123dbf9cc82085242ee4a9bdaf6354257ea8eba993fb45fcb7f407a176c29abd'
             '13e866a9f22a90fde979cc11b15b45fca7f00c78ebb55b41610415c24790bc85')
@@ -138,6 +144,11 @@ prepare() {
   patch -Np1 -i ../use-oauth2-client-switches-as-default.patch
 
   # Upstream fixes
+  patch -Np1 -i ../unbundle-add-enable_freetype.patch
+
+  # Fixes from Gentoo
+  patch -Np1 -i ../unbundle-icu-target.patch
+  patch -Np1 -i ../const-atomicstring-conversion.patch
 
   # Allow libclang_rt.builtins from compiler-rt >= 16 to be used
   patch -Np1 -i ../compiler-rt-adjust-paths.patch
diff --git a/extra/chromium/const-atomicstring-conversion.patch b/extra/chromium/const-atomicstring-conversion.patch
new file mode 100644
index 000000000..52f746669
--- /dev/null
+++ b/extra/chromium/const-atomicstring-conversion.patch
@@ -0,0 +1,35 @@
+From 403ee5b14df12c8ee3b3583177bbd30d930e9aaf Mon Sep 17 00:00:00 2001
+From: Matt Jolly <kangie@gentoo.org>
+Date: Sat, 12 Oct 2024 13:45:37 +1000
+Subject: [PATCH] Convert 'Const AtomicString' to 'const char *'.
+
+I don't know why this is suddenly required?
+--- a/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
++++ b/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
+@@ -323,7 +323,10 @@ void TextCodecICU::CreateICUConverter() const {
+   DCHECK(!converter_icu_);
+ 
+ #if defined(USING_SYSTEM_ICU)
+-  const char* name = encoding_.GetName();
++  //convert to WTF::String to use existing `const char *` dependent functions
++  WTF::String nameString = encoding_.GetName();
++  std::string nameUtf8 = nameString.Utf8();
++  const char* name = nameUtf8.c_str();
+   needs_gbk_fallbacks_ =
+       name[0] == 'G' && name[1] == 'B' && name[2] == 'K' && !name[3];
+ #endif
+@@ -448,7 +451,10 @@ String TextCodecICU::Decode(base::span<const uint8_t> data,
+   // <http://bugs.webkit.org/show_bug.cgi?id=17014>
+   // Simplified Chinese pages use the code A3A0 to mean "full-width space", but
+   // ICU decodes it as U+E5E5.
+-  if (!strcmp(encoding_.GetName(), "GBK")) {
++  // Convert AtomicString to String
++  WTF::String nameString = encoding_.GetName();
++  std::string nameUtf8 = nameString.Utf8();
++  if (!strcmp(nameUtf8.c_str(), "GBK")) {
+     if (EqualIgnoringASCIICase(encoding_.GetName(), "gb18030"))
+       resultString.Replace(0xE5E5, kIdeographicSpaceCharacter);
+     // Make GBK compliant to the encoding spec and align with GB18030
+-- 
+2.46.2
+
diff --git a/extra/chromium/unbundle-add-enable_freetype.patch b/extra/chromium/unbundle-add-enable_freetype.patch
new file mode 100644
index 000000000..1fd94c25c
--- /dev/null
+++ b/extra/chromium/unbundle-add-enable_freetype.patch
@@ -0,0 +1,32 @@
+From 88676c640928fd2dce56a46c1c3adb62ac349697 Mon Sep 17 00:00:00 2001
+From: "lauren n. liberda" <lauren@selfisekai.rocks>
+Date: Thu, 24 Oct 2024 17:54:35 +0000
+Subject: [PATCH] [unbundle] add enable_freetype
+
+fixes freetype unbundle after https://crrev.com/c/5832411
+
+Bug: none
+Change-Id: If5573d2c0e833ef3c18b505c004b3fa997f903a0
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5952222
+Reviewed-by: Lei Zhang <thestig@chromium.org>
+Commit-Queue: Lei Zhang <thestig@chromium.org>
+Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
+Cr-Commit-Position: refs/heads/main@{#1373430}
+---
+ build/linux/unbundle/freetype.gn | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/build/linux/unbundle/freetype.gn b/build/linux/unbundle/freetype.gn
+index 73f9666833e5..c780c630d55b 100644
+--- a/build/linux/unbundle/freetype.gn
++++ b/build/linux/unbundle/freetype.gn
+@@ -11,4 +11,9 @@ declare_args() {
+   # System FreeType configurations other than as described WILL INTRODUCE TEXT
+   # RENDERING AND SECURITY REGRESSIONS.
+   use_system_freetype = true
++
++  # Use FreeType for font rendering. If this is set to false, FreeType is
++  # replaced with the Rust-based Fontations set of libraries plus Skia
++  # path rendering.
++  enable_freetype = true
+ }
diff --git a/extra/chromium/unbundle-icu-target.patch b/extra/chromium/unbundle-icu-target.patch
new file mode 100644
index 000000000..618750f13
--- /dev/null
+++ b/extra/chromium/unbundle-icu-target.patch
@@ -0,0 +1,21 @@
+From a665875b4013eed997bd042326a038e24f3296e7 Mon Sep 17 00:00:00 2001
+From: Matt Jolly <kangie@gentoo.org>
+Date: Thu, 10 Oct 2024 14:36:51 +1000
+Subject: [PATCH] unbundle: add missing icu target
+
+--- a/build/linux/unbundle/icu.gn
++++ b/build/linux/unbundle/icu.gn
+@@ -65,6 +65,10 @@ group("icuuc_public") {
+   public_deps = [ ":icuuc" ]
+ }
+ 
++group("icui18n_hidden_visibility") {
++  public_deps = [ ":icuuc" ]
++}
++
+ shim_headers("icui18n_shim") {
+   root_path = "source/i18n"
+   headers = [
+-- 
+2.46.2
+
diff --git a/extra/chromium/use-oauth2-client-switches-as-default.patch b/extra/chromium/use-oauth2-client-switches-as-default.patch
index 888b67b00..118514d21 100644
--- a/extra/chromium/use-oauth2-client-switches-as-default.patch
+++ b/extra/chromium/use-oauth2-client-switches-as-default.patch
@@ -1,18 +1,21 @@
-diff --git a/google_apis/google_api_keys-inc.cc b/google_apis/google_api_keys-inc.cc
-index 4d13e697a54d..61aac7b48662 100644
---- a/google_apis/google_api_keys-inc.cc
-+++ b/google_apis/google_api_keys-inc.cc
-@@ -193,11 +193,11 @@ class APIKeyCache {
-     std::string default_client_id = CalculateKeyValue(
-         GOOGLE_DEFAULT_CLIENT_ID,
-         STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), std::string(),
--        nullptr, std::string(), environment.get(), command_line, gaia_config);
-+        ::switches::kOAuth2ClientID, std::string(), environment.get(), command_line, gaia_config);
-     std::string default_client_secret = CalculateKeyValue(
-         GOOGLE_DEFAULT_CLIENT_SECRET,
-         STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), std::string(),
--        nullptr, std::string(), environment.get(), command_line, gaia_config);
-+        ::switches::kOAuth2ClientSecret, std::string(), environment.get(), command_line, gaia_config);
+diff --git a/google_apis/api_key_cache.cc b/google_apis/api_key_cache.cc
+index e8bc9bb79704..38e5d2bd005f 100644
+--- a/google_apis/api_key_cache.cc
++++ b/google_apis/api_key_cache.cc
+@@ -221,14 +221,14 @@ ApiKeyCache::ApiKeyCache(const DefaultApiKeys& default_api_keys) {
+ 
+   std::string default_client_id = CalculateKeyValue(
+       default_api_keys.google_default_client_id,
+-      STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), std::string(), nullptr,
++      STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), std::string(), ::switches::kOAuth2ClientID,
+       std::string(), environment.get(), command_line, gaia_config,
+       default_api_keys.allow_override_via_environment,
+       default_api_keys.allow_unset_values);
+   std::string default_client_secret = CalculateKeyValue(
+       default_api_keys.google_default_client_secret,
+       STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), std::string(),
+-      nullptr, std::string(), environment.get(), command_line, gaia_config,
++      ::switches::kOAuth2ClientSecret, std::string(), environment.get(), command_line, gaia_config,
+       default_api_keys.allow_override_via_environment,
+       default_api_keys.allow_unset_values);
  
-     // We currently only allow overriding the baked-in values for the
-     // default OAuth2 client ID and secret using a command-line

test 4K/16K

Good idea. I tested using the pi4 kernel on my pi5 with Version 131.0.6778.85 (Official Build) Arch Linux ARM (64-bit) and so far no crash.

Also yesterday I installed the same Snap and Flatpak versions 131.0.6778.85 using the pi5 kernel and got different results:

Snap crashed - Version 131.0.6778.85 (Official Build) snap (64-bit)
Flatpak did not crash - Version 131.0.6778.85 (Official Build) (64-bit)

With the pi4 kernel the Snap version does not crash.

Could it be about the new “numa” implementation which comes with the new kernel i guess?

I doubt it. Numa has been in the kernel since October 22.

https://github.com/raspberrypi/linux/commit/14da166f35fd908b39ba10f2cff12561efe28791

Just upgraded to Chromium_v131 from Manjaro-Arm-Repo. Chromium_v131 seems to be working on GT King Pro.

Is this related to Rpi only?

It appears to be the case with the rpi5. It’s kernel has 16k pages enabled in it’s kernel. Some programs has issues with that.

Probably one or more of the 4 news patches.

I posted all the latest commits to chatgpt and asked if any of these changes can cause a crash of chromium on raspberry pi. Its answer was:

The crash you are experiencing could be related to the following changes:

  1. Increased Fortification Level: The increase-fortify-level.patch could result in stricter checks, potentially causing instability if system libraries do not align.
  2. Encoding Conversion Refactor: The patch converting atomic strings may introduce issues in string handling, especially if the ICU libraries or encoding are not fully compatible with ARM architecture.
  3. OAuth Client Switches: Changes to OAuth defaults could lead to additional overhead or conflicts with authentication-related processes.

The problem is with 16k kernel (rpi5 only), chromium is supposed to be compatible with 16K since 2022. The 4 patches were imported from arch (x86_64) who don’t care about arm and even more of 16K. If latest chromium is important switch to a 4k kernel.

Why is the flatpak version of Chromium work without issues then (the same version, 131)? Is it tapping on to a different kernel? How is that even possible?

Flatpak by the way is really growing on me. No matter what i download just works right out. Had no problems with it. Maybe it really is the future of package management.

My guess is whoever built the flatpak did no build chromium with all of those patches.

So yeah, probably what’s gonna happen is that once this new version arrives RPIOS repositories, they will make a fix and send it to upstream and then it will be fixed for everybody. Until then, 130 it is.

I think because RPIOS is debian based, we can’t really build and use the RPI version of Chromium:

https://github.com/RPi-Distro/chromium

RPiOS maintains their own version against current libs they are using.

That will work until as long as the libs we currently have do not get upgraded. Chromium will require a certain version with some libs. Best hope is arch-arm fixes their mistake.

Apparently, other devices also faces crashes with the new Chromium_v131
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1088162

That is good news :slight_smile: