Public bug reported:

Since upgrading to linux-image-7.0.0-43-generic, the whole system
intermittently hard-locks when snapd.service is stopped or restarted
while snapd's experimental AppArmor prompting feature is enabled.

== Symptoms ==
- Complete system freeze: display, keyboard and all USB devices stop 
responding. Only a hard power-off recovers.
- No kdump vmcore is captured, even though kdump-tools is loaded and 
kernel.panic_on_oops=1, so this is a lockup, not an oops/panic.
- After reboot, ext4 replays its journal and clears orphaned inodes. dpkg/apt 
logs contain NUL bytes from unflushed writes.

== Kernel warning seen before the lockups ==
On boots that survive, the following is logged at the moment snapd restarts:

  WARNING: lib/list_debug.c:65 at __list_del_entry_valid_or_report+0xc0/0x10b, 
CPU#2: snapd/10261
  WARNING: lib/list_debug.c:62 at __list_del_entry_valid_or_report+0xe4/0x10b, 
CPU#2: snapd/10261
   slab kmalloc-rnd-01-192 ... pointer offset 16 size 192
  Call Trace:
   remove_wait_queue.cold+0x9/0x12
   ep_remove+0x3c/0xe0
   do_epoll_ctl+0x589/0x820
   __x64_sys_epoll_ctl+0x6c/0xb0
   do_syscall_64+0x105/0x580

Full traces from two separate boots are attached (kernel-43-list-
corruption.txt).

== Reproduction ==
1. Kernel 7.0.0-43-generic, snapd 2.78+ubuntu26.04
2. sudo snap set system experimental.apparmor-prompting=true
   (prompting-client and desktop-security-center snaps installed)
3. sudo systemctl restart snapd
   (also triggered by "apt upgrade" when it upgrades the snapd package)

Result: about 3 hard lockups out of 5 restarts, plus the list_debug
warning on others.

== Isolation ==
- With experimental.apparmor-prompting=false on the same 7.0.0-43 kernel: 4 
consecutive snapd restarts, no lockup, no warning.
- Never observed on 7.0.0-31, -34, -38 or -42 (17 earlier boots, zero 
list_debug warnings, zero unclean shutdowns).
- This suggests a regression in -43 affecting the AppArmor notification fd's 
wait queue when snapd closes its prompting listener. The listener fd is 
inferred from timing; it has not been confirmed.

== System ==
- Ubuntu 26.04.1 LTS, kernel 7.0.0-43-generic (HWE)
- snapd 2.78+ubuntu26.04
- AMD Ryzen 5 7600X, ASUS B650E MAX GAMING WIFI, BIOS 3287
- NVIDIA RTX 3050 with nvidia-driver-595-open (kernel tainted O) plus AMD 
Raphael iGPU
- Root filesystem: ext4 on NVMe

== Workaround ==
sudo snap set system experimental.apparmor-prompting=false
or boot 7.0.0-42-generic.

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: linux-image-7.0.0-43-generic 7.0.0-43.43
ProcVersionSignature: Ubuntu 7.0.0-43.43-generic 7.0.14
Uname: Linux 7.0.0-43-generic x86_64
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Fri Nov 13 17:47:10 2026
InstallationDate: Installed on 2026-09-03 (71 days ago)
InstallationMedia: Ubuntu 26.04 "Resolute Raccoon" - Release amd64 (20260423.1)
MachineType: ASUS System Product Name
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
ProcFB: 0 nvidia-drmdrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-7.0.0-43-generic 
root=UUID=43e9e9fb-9e35-4cc7-ac3c-8d38aff88b40 ro quiet splash 
crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/19/2025
dmi.bios.release: 32.87
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 3287
dmi.board.asset.tag: Default string
dmi.board.name: B650E MAX GAMING WIFI
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: 
dmi:bvnAmericanMegatrendsInc.:bvr3287:bd09/19/2025:br32.87:svnASUS:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnB650EMAXGAMINGWIFI:rvrRev1.xx:cvnDefaultstring:ct3:cvrDefaultstring:skuSKU:pfaTobefilledbyO.E.M.:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: System Product Name
dmi.product.sku: SKU
dmi.product.version: System Version
dmi.sys.vendor: ASUS

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


** Tags: amd64 apport-bug resolute wayland-session

** Attachment added: "kernel-43-list-corruption.txt"
   
https://bugs.launchpad.net/bugs/2174407/+attachment/6017703/+files/kernel-43-list-corruption.txt

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

Title:
  7.0.0-43: hard lockup on snapd restart with apparmor-prompting enabled
  (list_debug corruption in ep_remove)

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


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

Reply via email to