[snap] Chromium showing Japanese fonts incorrectly

Bug #1954980 reported by Richard Layton
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

It simply shows square rectangles for all Japanese characters this occurred after a recent update (earlier this week), a restart fixed it the first time but now it has reverted, probably after another update.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
ProcVersionSignature: Ubuntu 5.4.0-91.102-generic 5.4.151
Uname: Linux 5.4.0-91-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu27.21
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Thu Dec 16 11:54:12 2021
InstallationDate: Installed on 2019-02-08 (1041 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
Snap: chromium 96.0.4664.110 (latest/stable)
SnapSource: ubuntu/+source/chromium-browser
UpgradeStatus: Upgraded to focal on 2021-12-01 (14 days ago)

Revision history for this message
Richard Layton (richardl6) wrote :
Revision history for this message
Richard Layton (richardl6) wrote :

This happens every time I run the software updater, and happened again today.

Revision history for this message
Richard Layton (richardl6) wrote :

Is there really not even some basic advice that someone can offer so I can understand what the nature of the problem might be.

Revision history for this message
Richard Layton (richardl6) wrote :

Why can I not just use Snap to return to the previous version, assuming the version has been updated. I thought this was the strength of Snap, to make such problems trivial to fix.

Revision history for this message
Richard Layton (richardl6) wrote :

It fixes itself eventually, without restarting Ubuntu. Is this because mistakes are been made with the update, and then later corrected?!

I wonder if its move to Snap is representative of a de-prioritizing of this application and that is reflected in the inability to provide globally competent versions of it.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Sorry for the lack of responses until now Richard.

The problem is not likely a broken update of the chromium snap, but rather the update mechanism itself that messes with font caches, so reverting to a previous version, while possible (see https://snapcraft.io/docs/getting-started#heading--revert), wouldn't fix the problem for you I think.

I'm wondering whether this is happening when the chromium snap is being refreshed while it is running, or if it also happens when the snap is updated while it is not running?
If the former, you might want to enable Refresh App Awareness (https://forum.snapcraft.io/t/wip-refresh-app-awareness/10736), it should help mitigate the problem by preventing updates while chromium is running.

summary: - Chromium showing Japanese fonts incorrectly
+ [snap] Chromium showing Japanese fonts incorrectly
Revision history for this message
Walter (wdoekes) wrote :

I suspect OP suffers from this:

www.osso.nl/blog/chromium-snap-wrong-fonts

Clearing out the font cache `rm /var/snap/chromium/common/fontconfig/*` and restarting chromium is the only thing that reliably works for me.

I think "Refresh App Awareness" might be a workable workaround, as Chromium tends to update when I least want it. Enabling that now.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in chromium-browser (Ubuntu):
status: New → Confirmed
Revision history for this message
Walter (wdoekes) wrote :
Download full text (4.3 KiB)

Okay. That experimental.refresh-app-awareness did not fix it.

This morning (16 March), while switching tabs, the font "change" occurred visibly again. Apparently I'm not looking at a fresh Chromium. Yet still there is _something_ that messed up the fonts.

Here's some system info:

 $ snap list --all chromium
 Name Version Rev Tracking Publisher Notes
 chromium 98.0.4758.9 1868 latest/stable canonical✓ disabled
 chromium 96.0.4664.110 1854 latest/stable canonical✓ disabled
 chromium 98.0.4758.54 1873 latest/stable canonical✓ disabled
 chromium 97.0.4692.99 1878 latest/stable canonical✓ disabled
 chromium 98.0.4758.80 1895 latest/stable canonical✓ disabled
 chromium 98.0.4758.80 1899 latest/stable canonical✓ disabled
 chromium 98.0.4758.102 1912 latest/stable canonical✓ disabled
 chromium 99.0.4844.51 1926 latest/stable canonical✓ -

Running processes and start-time:

 $ ps -ho lstart,command -p $(pgrep -f chromium | tr '\n' , | sed -e 's/,$//') | awk '{print $2 " " $3 " " $6 " " $7}' | uniq -c

      1 Feb 11 /snap/chromium/1899/usr/lib/chromium-browser/chrome --password-store
      3 Feb 11 /snap/chromium/1899/usr/lib/chromium-browser/chrome --type=zygote
      1 Mar 7 /snap/chromium/1926/usr/lib/chromium-browser/chrome --password-store
      3 Mar 7 /snap/chromium/1926/usr/lib/chromium-browser/chrome --type=zygote
      1 Mar 7 /snap/chromium/1926/usr/lib/chromium-browser/chrome --type=gpu-process
      2 Mar 7 /snap/chromium/1926/usr/lib/chromium-browser/chrome --type=utility
      4 Mar 7 /snap/chromium/1926/usr/lib/chromium-browser/chrome --type=renderer
      1 Mar 8 /snap/chromium/1926/usr/lib/chromium-browser/chrome --type=utility
      1 Mar 8 /snap/chromium/1926/usr/lib/chromium-browser/chrome --type=renderer
      1 Mar 9 /snap/chromium/1926/usr/lib/chromium-browser/chrome --type=renderer
      1 Mar 14 /snap/chromium/1926/usr/lib/chromium-browser/chrome --type=renderer
     34 Mar 15 /snap/chromium/1926/usr/lib/chromium-browser/chrome --type=renderer
      1 Mar 15 /snap/chromium/1926/usr/lib/chromium-browser/chrome --type=utility
      2 Mar 15 /snap/chromium/1926/usr/lib/chromium-browser/chrome --type=renderer

So, apparently there _are_ two chromiums running at the same time. Not sure why, but that might explain conflicts. The old one was branched off a --password-store parent.

Looking at the age in the fontconfig dir:

 $ ls /var/snap/chromium/common/fontconfig/ -ltr
 total 1700
 -rw-r--r-- 1 root root 151 mrt 2 15:39 fonts.conf
 -rw-r--r-- 1 root root 408 mrt 2 15:39 34e0e5ac-5c62-4453-a219-f92185a510d1-le64.cache-7
 ...
 -rw-r--r-- 1 root root 104 mrt 2 15:39 34e3ea57-0766-47d7-ac34-3152aff3ab1c-le64.cache-7
 -rw-r--r-- 1 root root 152 mrt 2 15:39 2bdf00a0-773f-43e6-bc52-f8023b64a749-le64.cache-7

So, all files are from the same date and not recently changed or something.

Steps I did now:

- $ sudo rm /var/snap/chromium/common/fontconfig/*

- fonts were still bad

- stopping chromium (alt-4)

- observe how the old chromium is still running:

  $ ps -ho lstart,command -p $(pgrep -f chromium | tr '\n' , | sed -e 's/,$//') | awk '{p...

Read more...

Revision history for this message
Walter (wdoekes) wrote :

Today it was experimental.refresh-app-awareness expiry time. It claimed it had waited long enough and did the refresh anyway without consulting me.

Immediately my fonts broke. And, as usual, the red dot in the Ubuntu Dock (the "running applications indicator") next to the Chromium icon disappeared: a click on that icon will now open a _new_ Chromium instead of revealing the running one. (Another poor side effect from this snap auto-refresh thing.)

Olivier: do you happen to know where I can find this expiry-awareness timer and raise it to a million days?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.