Booting a live session is slow - fontconfig regenerates its font cache

Bug #1749546 reported by Jean-Baptiste Lallement on 2018-02-14
52
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Fontconfig
Confirmed
Medium
fontconfig (Ubuntu)
High
Iain Lane
Bionic
High
Iain Lane

Bug Description

On Bionic Ubuntu Desktop booting to a live session is slow. It takes roughly 2 min on my test machine to boot from the "Try or Install Ubuntu" boot menu to a usable session.

It also takes 1 minute to logout and 17s to log in again.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: casper 1.388
ProcVersionSignature: Ubuntu 4.13.0-32.35-generic 4.13.13
Uname: Linux 4.13.0-32-generic x86_64
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
CasperVersion: 1.388
CurrentDesktop: ubuntu:GNOME
Date: Wed Feb 14 16:43:19 2018
LiveMediaBuild: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180214)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: casper
UpgradeStatus: No upgrade log present (probably fresh install)

Jean-Baptiste Lallement (jibel) wrote :
Jean-Baptiste Lallement (jibel) wrote :

journal with systemd log level set to debug.

tags: added: rls-bb-incoming
description: updated
Steve Langasek (vorlon) wrote :

This is probably not a bug in casper itself, as that code hasn't changed recently, but may be a change in the desktop live session. Assigning to the Desktop Team for further investigation.

Changed in casper (Ubuntu):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Jean-Baptiste Lallement (jibel) wrote :

this is definitely not a bug in casper but a mix of different issues. It is currently under investigation and this bug is used as a placeholder to track the problem. Specific bugs will be filed as causes are identified.

Will Cooke (willcooke) wrote :

Thanks to ali1234 this was tracked down to font-config rebuilding the cache at the start of the live session. Something changed in the way fontconfig validates the caches and so they are being rebuilt at the start of the live session.

This bug is likely related: https://bugs.freedesktop.org/show_bug.cgi?id=103652

no longer affects: casper (Ubuntu)
no longer affects: casper (Ubuntu Bionic)
Changed in fontconfig (Ubuntu Bionic):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Will Cooke (willcooke) on 2018-04-04
Changed in fontconfig (Ubuntu Bionic):
assignee: Canonical Desktop Team (canonical-desktop-team) → Iain Lane (laney)
Launchpad Janitor (janitor) wrote :

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

Changed in fontconfig (Ubuntu):
status: New → Confirmed
Iain Lane (laney) on 2018-04-04
Changed in fontconfig (Ubuntu Bionic):
status: Confirmed → In Progress
importance: Undecided → High
summary: - Booting a live session is slow
+ Booting a live session is slow - fontconfig regenerates its font cache
Will Cooke (willcooke) on 2018-04-04
tags: removed: rls-bb-incoming
Changed in fontconfig:
importance: Unknown → Medium
status: Unknown → Confirmed
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1749546

tags: added: iso-testing
Iain Lane (laney) wrote :

I've submitted a patch on the upstream bug - hopefully will get some feedback quickly. I'm not super sure if it's a sensible approach.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fontconfig - 2.12.6-0ubuntu2

---------------
fontconfig (2.12.6-0ubuntu2) bionic; urgency=medium

  * Upload proposed patch from upstream bug #103652. If the fontconfig cache
    was built on a system that has nanosecond timestamps and then later
    transplanted to one that doesn't - for example by mksquashfs as part of a
    live CD build - we consider the cache invalid and rebuild it during the
    boot process. Depending on the fonts involved, this can take a significant
    amount of time and potentially cause knock-on timeouts. The approach in
    this patch is to ignore the nanosecond portion of the cache's value if we
    get 0 when stat()ing the referenced directory, meaning it is considered
    fresh if the rest of the timestamp matches. (LP: #1749546)

 -- Iain Lane <email address hidden> Thu, 05 Apr 2018 17:13:52 +0100

Changed in fontconfig (Ubuntu Bionic):
status: In Progress → Fix Released
PeppeKorg (peppekorg) wrote :

Tested with xubuntu 20180408 live - boot process faster than before. Is there anything else we should check specifically?

Jeremy Soller (jackpot51) wrote :

I can also confirm that this fixed the issue in Pop!_OS and elementary OS.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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