Public bug reported:

On Ubuntu 26.04 a boot sometimes stops after "Starting initrd-switch-
root.service" and stays there until a key is pressed; then it goes on
and finishes. It happens with a serial console active as well as the VT,
which makes plymouth use its details (text) view. Here, in a VM with
every package current on 2026-11-17 (systemd 259.9-0ubuntu0.1, kernel
7.0.0-43), with four "yes" processes running on the VM's host and that
host busy with other work as well, 1 of 160 boots stopped. The same
guest before the update (systemd 259.5-0ubuntu3.4), booted the same day
under the same load: none of 80. Earlier, on 259.5-0ubuntu3.4 and with
less other work on the host, it was 2 of 23 with the four "yes"
processes running and 1 of 194 without them.

What is asked
- systemd: please backport upstream 4ca7ac0275, "terminal-util: don't query 
terminal size on virtual consoles" 
(https://github.com/systemd/systemd/commit/4ca7ac02750c2f83bf2d6afc7e4f419b5582612e),
 to 26.04 (resolute) and 26.10 (stonking). It skips the size query when the 
console is a VT, as it is here and in the first hardware report below; by its 
own message it does not help where /dev/console is the serial port. It is in 
upstream v260.6, v261.4 and v262.1 and the point releases after them, and in no 
v259.x (v259.11 is the newest). In Ubuntu only 27.04 has it (262.1-1ubuntu1); 
26.10's 261.3-0ubuntu3 is one upstream point release short of it, and the 
update planned in bug 2174844 (261.5) would bring it; 26.04 follows upstream's 
v259 point releases (259.9 is in updates, and the same bug plans 259.11), and 
no v259.x has it, so 26.04 needs a distro patch or an upstream backport to 
v259-stable, which I have not yet asked upstream for. The commit does not apply 
to 259 unchanged (terminal_fix_size() differs around the lines it replaces). 
Upstream wrote it to save boot time, not for this hang.
- plymouth: nothing to pick yet. Upstream merge request 523 
(https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/523, open 
since 2026-11-01, not reviewed yet) reads keys from a terminal through a 
second, non-blocking descriptor; the plymouth task is here to track it. No 
Ubuntu plymouth has it.
- Neither change has been run on this guest yet; the plymouth one has the one 
outside test below. I will add results to this bug when I have them.

To reproduce
1. Ubuntu 26.04 with plymouth, and a serial console active as well as the VT: 
/sys/class/tty/console/active lists both ("ttyAMA0 tty0" here). Here the VM is 
a QEMU "virt" machine with ACPI (4 vCPUs, a virtio-gpu display, a USB 
keyboard), whose SPCR table adds ttyAMA0; the kernel command line has "quiet 
splash console=tty0" and no serial console (for the boots on current packages 
also sysrq_always_enabled=1, for the dump). The first hardware report below has 
console=ttyS0,115200 console=tty1.
2. Boot it repeatedly (cold boots here; in these counts every boot that stopped 
had a VNC viewer reading the display). It needs unlucky timing: it was more 
frequent with four "yes" processes running on the VM's host in my first runs (2 
of 23 against 1 of 194), and with the host busier still it was rare again (1 of 
240).
3. Some boots stop after "Starting initrd-switch-root.service". One key press 
lets them go on.
Expected: every boot goes through without a key press.

What I saw
systemd 259.9-0ubuntu0.1, plymouth 24.004.60+git20250831.4a3c171d-0ubuntu8, 
kernel 7.0.0-43, arm64, every package current on 2026-11-17. Kernel 7.0.0-44 
reached resolute-updates on 2026-11-19 and has not been booted here. A kernel 
task dump of a stopped boot (SysRq t, attached) shows PID 1 blocked writing to 
the console (n_tty_write under redirected_tty_write) and plymouthd asleep in 
n_tty_read. On the console the output stops after "Starting 
initrd-switch-root.service", but PID 1 had gone on: the serial log after the 
key holds the job progress it printed meanwhile, up to where it blocked writing 
to the console. In these runs every stall where I pressed a key went on at that 
one key press (3 of 3: one on these packages, two before the update). The 
counts from before the update are on systemd 259.5-0ubuntu3.4 (the security 
pocket's); a dump there, on kernel 7.0.0-42, showed the same two stacks.

What I think happens: after switch-root systemd asks the console for its
size; plymouth's details view copies the query to tty1, whose VT
answers; systemd reads the answer that plymouthd's poll() had seen, so
plymouthd's blocking read() waits for a key, and everything that waits
on plymouthd waits with it.

Similar reports from real hardware
- A comment on plymouth merge request 523 
(https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/523#note_3783582)
 reports the same hang with Ubuntu's plymouth, systemd 261.3 (26.10's version) 
and console=ttyS0,115200 console=tty1 on an Orange Pi Zero 2: 4 hangs in 72 
boots, none in 50 with the merge request and 45655f12.
- https://github.com/Dasharo/dasharo-issues/issues/1897 reports Ubuntu 26.04 
with a serial console sometimes hanging at the switch-root message on an MSI 
PRO B850-P, and booting reliably without the serial console; its reporter has 
since seen it on a second, Intel-based machine.

Ways round it: press a key; plymouth.enable=0 (41 of 41 boots here, 40
of them under that load, before the update).

My setup: Ubuntu 26.04.1 Desktop, arm64, in a VM: QEMU 11.1.2 (my own
build with local patches) under Hypervisor.framework on an Apple M3. For
the boots of 2026-11-17 (the 160 and the 80) its virglrenderer 1.3.0
carried local changes too; for the earlier ones it was unmodified. The
guest also has my own guest agent installed (a service of my own, not
from the Ubuntu archive); it does not appear among the tasks in the
dump. The task dump is all inside the guest; I have not tried this guest
on a stock QEMU, nor without the agent. Filed by hand from another
machine, so without apport data: say what you need and I will attach it.

Upstream: https://github.com/systemd/systemd/issues/35499. Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=2439826, filed against
systemd and still open, last reported on Fedora 44 in July 2026; Fedora
44 has had plymouth 45655f12 since January 2026, but not merge request
523. Related: bug 2170214, the request to backport plymouth 45655f12,
and bug 2174844, the planned systemd updates named above.

** Affects: plymouth (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: resolute stonking

** Attachment added: "SysRq t task dump of a stalled boot (systemd 
259.9-0ubuntu0.1, kernel 7.0.0-43)"
   
https://bugs.launchpad.net/bugs/2176116/+attachment/6020967/+files/sysrq-t-stalled-boot.txt

** Tags added: resolute stonking

** Also affects: plymouth (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/2176116

Title:
  Boot sometimes stops after switch-root until a key is pressed when a
  serial console is active (please backport systemd 4ca7ac0275)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/2176116/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to