Public bug reported:

After upgrading from 6.8.0-149-generic to 7.0.0-43-generic, a Hyper-V Gen2 VM
(4 GB RAM, Ubuntu, "Microsoft Corporation Virtual Machine, BIOS Hyper-V UEFI
Release v4.1 09/25/2025") crashes repeatedly from memory exhaustion. There were
4 crashes in ~2 days, after anywhere from a few hours to ~19 hours of uptime.
Booting 6.8.0-149-generic on the same VM avoids the problem.

Observed on 7.0.0-43:

1. Most RAM is not usable at boot:
     Memory: 1269800K/4193104K available (... 2913116K reserved, 0K 
cma-reserved)
   versus 6.8.0-149 on the same VM:
     Memory: 3366808K/4193100K available (... 826032K reserved, 0K cma-reserved)

2. The memory that comes online later is counted as CMA, although no CMA area
   exists (no cma= on the kernel command line, 0K cma-reserved):
     CmaTotal:        0 kB
     CmaFree:    740740 kB    (3 minutes after boot, and growing)
   /proc/zoneinfo: DMA32 nr_free_cma 185185
   On 6.8.0-149: nr_free_cma 0.

3. Unmovable allocations can't use those pages. Over time GFP_KERNEL
   allocations fail, and the OOM killer kills almost all userspace while ~2 GB
   still shows as free, nearly all of it free_cma:
     gfp_mask=0x440dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_COMP), order=0
     DMA32 free:2135100kB ... free_cma:2072300kB
     Normal free:4916kB min:4916kB (zone exhausted)
   Remaining processes at that point: multipathd, systemd-udevd, dbus-daemon,
   systemd-journald, all with tiny RSS. The system then panics. Crash records
   are saved in /var/lib/systemd/pstore.

4. Happens with Hyper-V Dynamic Memory both enabled and disabled (static
   4096 MB), so it does not seem to depend on hv_balloon ballooning.

Expected: memory that comes online after boot is added as normal movable or
unmovable pages and is not counted in NR_FREE_CMA_PAGES when no CMA is
configured.

Workaround: boot 6.8.0-149-generic and hold linux-generic.

Kernel cmdline:
  BOOT_IMAGE=/boot/vmlinuz-7.0.0-43-generic root=UUID=... ro
  crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M

Evidence file attached (boot memory lines, OOM Mem-Info, panic lines
from pstore).

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: linux-image-7.0.0-43-generic 7.0.0-43.43
ProcVersionSignature: Ubuntu 6.8.0-149.149-generic 6.8.12
Uname: Linux 6.8.0-149-generic x86_64
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116,  1 Nov 12 18:00 seq
 crw-rw---- 1 root audio 116, 33 Nov 12 18:00 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', 
'/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
CasperMD5CheckResult: pass
CurrentDmesg: Error: command ['dmesg'] failed with exit code 1: dmesg: read 
kernel buffer failed: Operation not permitted
Date: Thu Nov 12 18:05:17 2026
InstallationDate: Installed on 2025-09-17 (421 days ago)
InstallationMedia: Ubuntu-Server 24.04.3 LTS "Noble Numbat" - Release amd64 
(20250805.1)
Lspci:
 
Lspci-vt:
 
Lsusb: Error: command ['lsusb'] failed with exit code 1:
Lsusb-t:
 
Lsusb-v: Error: command ['lsusb', '-v'] failed with exit code 1:
MachineType: Microsoft Corporation Virtual Machine
PciMultimedia:
 
ProcEnviron:
 LANG=en_GB.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
ProcFB: 0 hyperv_drmdrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.8.0-149-generic 
root=UUID=e796a5a2-5dc0-4e71-a04f-51244cb6d9d4 ro 
crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
SourcePackage: linux
UpgradeStatus: Upgraded to resolute on 2026-11-10 (2 days ago)
acpidump:
 
dmi.bios.date: 09/25/2025
dmi.bios.release: 4.1
dmi.bios.vendor: Microsoft Corporation
dmi.bios.version: Hyper-V UEFI Release v4.1
dmi.board.asset.tag: None
dmi.board.name: Virtual Machine
dmi.board.vendor: Microsoft Corporation
dmi.board.version: Hyper-V UEFI Release v4.1
dmi.chassis.asset.tag: 5845-5216-2968-8936-0257-8895-18
dmi.chassis.type: 3
dmi.chassis.vendor: Microsoft Corporation
dmi.chassis.version: Hyper-V UEFI Release v4.1
dmi.modalias: 
dmi:bvnMicrosoftCorporation:bvrHyper-VUEFIReleasev4.1:bd09/25/2025:br4.1:svnMicrosoftCorporation:pnVirtualMachine:pvrHyper-VUEFIReleasev4.1:rvnMicrosoftCorporation:rnVirtualMachine:rvrHyper-VUEFIReleasev4.1:cvnMicrosoftCorporation:ct3:cvrHyper-VUEFIReleasev4.1:skuNone:
dmi.product.family: Virtual Machine
dmi.product.name: Virtual Machine
dmi.product.sku: None
dmi.product.version: Hyper-V UEFI Release v4.1
dmi.sys.vendor: Microsoft Corporation

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


** Tags: amd64 apport-bug resolute

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2174302

Title:
    linux 7.0.0-43: free pages counted as CMA on Hyper-V VM with no CMA
  reserved, causing OOM and kernel panic

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


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

Reply via email to