Public bug reported:
Summary
-------
Booting the ubuntu-26.04.1-desktop-amd64 live image on a machine whose
hardware clock is in the past (here 2023-01-02) hangs forever at the
Ubuntu logo. The hang is in casper-bottom/41apt_build_cache_cdrom
(reintroduced for LP: #2145807): "apt-get update" completes all
downloads, then the APT::Update::Post-Invoke-Success hook
"appstreamcli refresh --source=os" never returns. There is no timeout,
and the splash screen and the hook's /dev/null redirection hide all
output, so the machine just looks frozen on the logo. That makes the
problem easy to mistake for a graphics issue: "nomodeset" and
"safe graphics" do not help.
Environment
-----------
- Image: ubuntu-26.04.1-desktop-amd64.iso (SHA256 verified)
- Hardware: Apple MacBook Pro Early 2015 (Intel Core i7)
- RTC at boot: 2023-01-02 00:55 UTC (actual date: 2026-10-22)
- Index files on the medium: Last-Modified Wed, 26 Aug 2026
- Medium: ISO contents copied to a FAT32 partition of a USB disk.
Other users report the same hang on the same line with regular
dd-written USB sticks (see "Related reports").
Steps to reproduce
------------------
1. Set the hardware clock to a date before the ISO build date
(e.g. 2023-01-01).
2. Boot the 26.04.1 desktop live image.
3. Remove "quiet splash" to see the console.
Expected: the live session starts (or the step fails or times out
and the boot continues).
Actual: the boot never gets past
Begin: Generating APT cache for cdrom ...
Ign:1 file:/cdrom resolute InRelease
Get:2 file:/cdrom resolute Release [664 B]
Get:3 file:/cdrom resolute Release.gpg [228 B]
Get:4 file:/cdrom resolute/main amd64 Packages [32.0 kB]
Get:5 file:/cdrom resolute/restricted amd64 Packages [14.5 kB]
and stays there indefinitely. systemd is never reached.
Analysis
--------
I used break=casper-bottom, then reproduced the exact environment of
41apt_build_cache_cdrom (same /etc/apt overlay, only cdrom.sources
kept) and ran:
chroot /root timeout -k 5 90 apt-get update --no-list-cleanup \
-o Debug::RunScripts=true -o Debug::pkgAcquire::Worker=true
- cdrom.sources has "Check-Date: no", so APT itself accepts the
"future" Release file, and every index file is fetched and stored
correctly.
- The hooks then run in this order:
touch /var/lib/apt/periodic/update-success-stamp ...
[ ! -f /var/run/dbus/system_bus_socket ] || dbus-send ...
/usr/bin/test -e .../org.freedesktop.PackageKit.service && ...
if /usr/bin/test -w /var/cache/swcatalog -a -e /usr/bin/appstreamcli;
then appstreamcli refresh --source=os > /dev/null || true; fi
The appstreamcli hook never returns, so the next two hooks
(cnf-update-db, update-motd-updates-available) never run.
- 80 s in, the process chain is apt-get -> sh -> sh (all in wait4),
and the leaf process, most likely appstreamcli, is blocked in:
do_poll -> do_sys_poll -> __x64_sys_poll
- The timeout fired: apt-get exit code 124.
- Setting the correct date fixes the boot.
Full diagnostic output attached (diag.txt).
Workaround
----------
Fix the hardware clock before booting the live image. Alternatively,
boot with break=casper-bottom, empty
/scripts/casper-bottom/41apt_build_cache_cdrom, then "exit".
Suggested fixes
---------------
1. casper: this boot-time "apt-get update" does not need the APT::Update
hooks. They could be disabled for this call, e.g. by dropping a
snippet into the temporary /etc/apt overlay the script already
mounts (named to sort last, e.g. zz-casper-no-hooks):
#clear APT::Update::Pre-Invoke;
#clear APT::Update::Post-Invoke;
#clear APT::Update::Post-Invoke-Success;
2. casper: wrap the call in "timeout" so that a misbehaving hook can
never block the boot forever.
3. appstream: find out why "appstreamcli refresh --source=os" never
returns when the system clock is earlier than the metadata
timestamps.
Related reports (same hang at "Get:5 file:/cdrom", fixed by
correcting the clock / firmware date):
-
https://community.frame.work/t/ubuntu-26-04-install-hangs-logo-freeze-then-stuck-at-get-5-file-cdrom/83392
- https://community.frame.work/t/struggling-to-boot-ubuntu/82993?page=2
** Affects: casper (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2171937
Title:
Live boot hangs forever at "Generating APT cache for cdrom" when the
system clock is in the past (appstreamcli refresh hook never returns)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/2171937/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs