Another effect of CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT=y on resolute, and a
worse one: arm64 kernels
with 64K pages panic at boot on 4 GiB VMs whenever KHO manages to reserve its
scratch area.
Seen in SRU testing (cycle 2026.11.23) on openstack arm64 VMs with 4 GiB of
RAM, with linux
7.0.0-45.45 (generic-64k) and linux-realtime 7.0.0-45.45.1 (realtime-64k). One
boot per test job:
boots KHO scratch reserved KHO reservation failed
realtime-64k 58 29, of which 20 panicked 29, none panicked
generic-64k 52 21, of which 17 panicked 31, none panicked
realtime (4K) 36 36, none panicked -
The panic comes at about 0.75 s, from an ordinary order-0 GFP_KERNEL allocation
in do_initcalls()
(realtime-64k-ltp_kernel_misc-1-panic.log):
swapper/0 invoked oom-killer:
gfp_mask=0xc2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_COMP|__GFP_NOMEMALLOC), order=0
...
uart_register_driver+0x44/0x218
serial8250_init+0x94/0x150
do_one_initcall+0x60/0x520
...
unevictable:5508 ...
free:54892 free_pcp:203 free_cma:49148
Node 0 DMA free:2987584kB boost:524288kB min:527424kB low:528320kB
high:529216kB ...
Node 0 Normal free:525504kB boost:0kB min:1408kB low:1792kB high:2176kB ...
Node 0 Normal: 1*64kB (U) 1*128kB (U) 1*256kB (U) 1*512kB (U) ... 1*524288kB
(C) = 525248kB
Out of memory and no killable processes...
Kernel panic - not syncing: System is deadlocked on memory
How the scratch takes the memory:
- KHO reserves three scratch areas (lowmem, global, node 0), sized from the
early kernel reservations
(scratch_scale=200), and rounds each one up to CMA_MIN_ALIGNMENT_BYTES, a
whole pageblock. With
64K pages a pageblock is 512 MiB, so on these VMs the scratch is 2560 MiB of
the 4 GiB:
KHO on: Memory: 790528K/4194304K available (... 2855296K reserved, 524288K
cma-reserved)
KHO off: Memory: 3405120K/4194304K available (... 233856K reserved, 524288K
cma-reserved)
- The scratch is then released as MIGRATE_CMA, which unmovable allocations
can't use. In the report
above 49148 of the 54892 free pages (64 KiB each) are CMA, so only about 360
MiB of non-CMA
memory is free, after the unpacked initramfs took 344 MiB (unevictable page
cache). The Normal
zone has nothing left but one CMA pageblock.
- In 26 of the 37 panics the DMA zone also carries a watermark boost of one
pageblock
(boost:524288kB), more than the non-CMA memory left. Upstream 331f94007d79
("mm/page_alloc: do not
boost watermarks in kdump capture kernels", already in 7.0.0-45) describes
the same panic, but
only removes the boost for kdump kernels.
- With 4K pages the same VMs keep 3.3 GB available with KHO on (810240K
reserved), and none of the 36
realtime boots panicked.
Whether KHO gets its scratch depends on the memory layout at boot. In the other
boots it prints
"KHO: Failed to reserve nid 0 scratch buffer" (37 boots) or "KHO: Failed to
reserve lowmem scratch
buffer" (23 boots), then "Failed to reserve scratch area, disabling kexec
handover", and the VM
boots normally with 3.4 GB available. The same job, rebooted, can go either way
(see attachments).
The 9 VMs that did boot with KHO on keep only about 790 MB outside CMA.
Reruns hide this in testing: 13 generic-64k jobs panicked at least once, and 12
of them booted fine
on a rerun, when KHO lost its reservation; that rerun is the result the test
database keeps. The config has been set since the v6.19-rc4 rebase
(UBUNTU: [Config] updateconfigs following v6.19-rc4 rebase, Dec 2025), so this
is not new in
7.0.0-45. No 7.0.0-44 boot logs are left to check.
Workaround: boot with kho=off.
Fix: the one this bug asks for, unset CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT on
resolute as was done
for 26.10 in 7.3.0-9.9 (LP: #2169198).
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2171297
Title:
resolute: please disable CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT (as done
for 26.10 in LP: #2169198); KHO scratch makes 13 GiB unusable for GPU
/ pinned memory
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2171297/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs