понедельник

[Bug 2137457] [NEW] system runs out of memory after loading many corrupt apparmor profiles

Public bug reported:

Ubuntu questing AMD64, 8GB memory with 6.17.0-8-generic

run stress-ng with AppArmor stressor for ~5-10 mins, system runs out of
memory.

How to reproduce issue:

use latest stress-ng from https://launchpad.net/~colin-
king/+archive/ubuntu/stress-ng


sudo add-apt-repository ppa:colin-king/stress-ng
sudo apt-get update
sudo apt-get install stress-ng
sudo stress-ng --klog-check -v --apparmor 1

after a while one gets:

stress-ng: debug: [1628] invoked with './stress-ng --klog-check -v --apparmor 1' by user 0 'root'
stress-ng: debug: [1628] stress-ng 0.20.00 gf9ac1ba95c22
stress-ng: debug: [1628] system: Linux questing-amd64 6.17.0-8-generic #8-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 21:44:46 UTC 2025 x86_64, gcc 15.2.0, glibc 2.42, little endian
stress-ng: debug: [1628] RAM total: 7.3G, RAM free: 6.2G, swap free: 2.8G
stress-ng: debug: [1628] temporary file path: '/home/cking/stress-ng', filesystem type: ext4 (892311 blocks available, /dev/dm-0)
stress-ng: debug: [1628] 8 processors online, 8 processors configured
stress-ng: info: [1628] defaulting to a 1 day run per stressor
stress-ng: debug: [1628] CPU data cache: L1: 32K, L2: 4096K, L3: 16384K
stress-ng: debug: [1628] cache allocate: shared cache buffer size: 16384K
stress-ng: info: [1628] dispatching hogs: 1 apparmor
stress-ng: debug: [1628] starting stressor
stress-ng: debug: [1628] 1 stressor started
stress-ng: debug: [1630] apparmor: [1630] started (instance 0 on CPU 4)
stress-ng: info: [1629] klog-check: kernel cmdline: 'BOOT_IMAGE=/vmlinuz-6.17.0-8-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M'
stress-ng: info: [1629] klog-check: warning: [104.610917] 'stress-ng-appar invoked oom-killer: gfp_mask=0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), order=0, oom_score_adj=-1000'
stress-ng: info: [1629] klog-check: warning: [104.610923] 'CPU: 2 UID: 0 PID: 1634 Comm: stress-ng-appar Not tainted 6.17.0-8-generic #8-Ubuntu PREEMPT(voluntary) '
stress-ng: info: [1629] klog-check: warning: [104.610925] 'Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014'
stress-ng: info: [1629] klog-check: warning: [104.610926] 'Call Trace:'
stress-ng: info: [1629] klog-check: warning: [104.610927] ' <TASK>'
stress-ng: info: [1629] klog-check: warning: [104.610930] ' show_stack+0x49/0x60'
stress-ng: info: [1629] klog-check: warning: [104.610934] ' dump_stack_lvl+0x5f/0x90'
stress-ng: info: [1629] klog-check: warning: [104.610937] ' dump_stack+0x10/0x18'
stress-ng: info: [1629] klog-check: warning: [104.610949] ' dump_header+0x48/0x1be'
stress-ng: info: [1629] klog-check: warning: [104.610950] ' oom_kill_process.cold+0x8/0xac'
stress-ng: info: [1629] klog-check: warning: [104.610951] ' out_of_memory+0xff/0x2b0'
stress-ng: info: [1629] klog-check: warning: [104.610954] ' __alloc_pages_may_oom+0x10a/0x1d0'
stress-ng: info: [1629] klog-check: warning: [104.610956] ' __alloc_pages_slowpath.constprop.0+0x40e/0x990'
stress-ng: info: [1629] klog-check: warning: [104.610957] ' __alloc_frozen_pages_noprof+0x341/0x360'
stress-ng: info: [1629] klog-check: warning: [104.610958] ' alloc_pages_mpol+0x88/0x1b0'
stress-ng: info: [1629] klog-check: warning: [104.610960] ' folio_alloc_mpol_noprof+0x14/0x40'
stress-ng: info: [1629] klog-check: warning: [104.610961] ' __read_swap_cache_async+0x16c/0x260'
stress-ng: info: [1629] klog-check: warning: [104.610963] ' swap_cluster_readahead+0x20a/0x310'
stress-ng: info: [1629] klog-check: warning: [104.610963] ' swapin_readahead+0x75/0x100'
stress-ng: info: [1629] klog-check: warning: [104.610964] ' do_swap_page+0x227/0x1010'
stress-ng: info: [1629] klog-check: warning: [104.610966] ' ? arch_exit_to_user_mode_prepare.isra.0+0xd/0xe0'
stress-ng: info: [1629] klog-check: warning: [104.610967] ' ? do_syscall_64+0xb9/0xc90'
stress-ng: info: [1629] klog-check: warning: [104.610970] ' ? __pfx_default_wake_function+0x10/0x10'
stress-ng: info: [1629] klog-check: warning: [104.610971] ' handle_pte_fault+0x1b9/0x1f0'
stress-ng: info: [1629] klog-check: warning: [104.610972] ' __handle_mm_fault+0x59d/0x720'
stress-ng: info: [1629] klog-check: warning: [104.610974] ' handle_mm_fault+0xe7/0x2f0'
stress-ng: info: [1629] klog-check: warning: [104.610975] ' do_user_addr_fault+0x22b/0x6c0'
stress-ng: info: [1629] klog-check: warning: [104.610977] ' exc_page_fault+0x7f/0x1b0'
stress-ng: info: [1629] klog-check: warning: [104.610978] ' asm_exc_page_fault+0x27/0x30'
stress-ng: info: [1629] klog-check: warning: [104.610979] 'RIP: 0033:0x750ea1eb137f'
stress-ng: info: [1629] klog-check: warning: [104.610981] 'Code: 9d 38 ee ff ff e9 9c fc ff ff e8 cc 3c 09 00 90 66 66 2e 0f 1f 84 00 00 00 00 00 55 48 8b 4f 08 48 89 c8 48 83 e0 f8 48 89 e5 <48> 3b 04 07 0f 85 9e 00 00 00 48 8b 47 10 48 3b 78 18 75 75 48 8b'
stress-ng: info: [1629] klog-check: warning: [104.610981] 'RSP: 002b:00007ffdd4d66fd0 EFLAGS: 00010206'
stress-ng: info: [1629] klog-check: warning: [104.610983] 'RAX: 00000000000002f0 RBX: 0000750ea2034fc0 RCX: 00000000000002f1'
stress-ng: info: [1629] klog-check: warning: [104.610983] 'RDX: 0000750ea2034e00 RSI: 0000000000408000 RDI: 0000596c2fa8fd60'
stress-ng: info: [1629] klog-check: warning: [104.610984] 'RBP: 00007ffdd4d66fd0 R08: 0000000000000118 R09: 0000750ea2034b20'
stress-ng: info: [1629] klog-check: warning: [104.610984] 'R10: 0000000000000120 R11: 0000750ea2034ac0 R12: 00000000000002f0'

Looks like the apparmor profiles being loaded/unloaded eat up memory

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

** Changed in: linux (Ubuntu)
Importance: Undecided => Low

** Description changed:

- Ubuntu question AMD64, 8GB memory with 6.17.0-8-generic
+ Ubuntu questing AMD64, 8GB memory with 6.17.0-8-generic

run stress-ng with AppArmor stressor for ~5-10 mins, system runs out of
memory.

How to reproduce issue:

use latest stress-ng from https://launchpad.net/~colin-
king/+archive/ubuntu/stress-ng

sudo add-apt-repository ppa:colin-king/stress-ng
sudo apt-get update
sudo apt-get install stress-ng
sudo stress-ng --klog-check -v --apparmor 1

after a while one gets:

stress-ng: debug: [1628] invoked with './stress-ng --klog-check -v --apparmor 1' by user 0 'root'
stress-ng: debug: [1628] stress-ng 0.20.00 gf9ac1ba95c22
stress-ng: debug: [1628] system: Linux questing-amd64 6.17.0-8-generic #8-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 21:44:46 UTC 2025 x86_64, gcc 15.2.0, glibc 2.42, little endian
stress-ng: debug: [1628] RAM total: 7.3G, RAM free: 6.2G, swap free: 2.8G
stress-ng: debug: [1628] temporary file path: '/home/cking/stress-ng', filesystem type: ext4 (892311 blocks available, /dev/dm-0)
stress-ng: debug: [1628] 8 processors online, 8 processors configured
stress-ng: info: [1628] defaulting to a 1 day run per stressor
stress-ng: debug: [1628] CPU data cache: L1: 32K, L2: 4096K, L3: 16384K
stress-ng: debug: [1628] cache allocate: shared cache buffer size: 16384K
stress-ng: info: [1628] dispatching hogs: 1 apparmor
stress-ng: debug: [1628] starting stressor
stress-ng: debug: [1628] 1 stressor started
stress-ng: debug: [1630] apparmor: [1630] started (instance 0 on CPU 4)
stress-ng: info: [1629] klog-check: kernel cmdline: 'BOOT_IMAGE=/vmlinuz-6.17.0-8-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M'
stress-ng: info: [1629] klog-check: warning: [104.610917] 'stress-ng-appar invoked oom-killer: gfp_mask=0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), order=0, oom_score_adj=-1000'
stress-ng: info: [1629] klog-check: warning: [104.610923] 'CPU: 2 UID: 0 PID: 1634 Comm: stress-ng-appar Not tainted 6.17.0-8-generic #8-Ubuntu PREEMPT(voluntary) '
stress-ng: info: [1629] klog-check: warning: [104.610925] 'Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014'
stress-ng: info: [1629] klog-check: warning: [104.610926] 'Call Trace:'
stress-ng: info: [1629] klog-check: warning: [104.610927] ' <TASK>'
stress-ng: info: [1629] klog-check: warning: [104.610930] ' show_stack+0x49/0x60'
stress-ng: info: [1629] klog-check: warning: [104.610934] ' dump_stack_lvl+0x5f/0x90'
stress-ng: info: [1629] klog-check: warning: [104.610937] ' dump_stack+0x10/0x18'
stress-ng: info: [1629] klog-check: warning: [104.610949] ' dump_header+0x48/0x1be'
stress-ng: info: [1629] klog-check: warning: [104.610950] ' oom_kill_process.cold+0x8/0xac'
stress-ng: info: [1629] klog-check: warning: [104.610951] ' out_of_memory+0xff/0x2b0'
stress-ng: info: [1629] klog-check: warning: [104.610954] ' __alloc_pages_may_oom+0x10a/0x1d0'
stress-ng: info: [1629] klog-check: warning: [104.610956] ' __alloc_pages_slowpath.constprop.0+0x40e/0x990'
stress-ng: info: [1629] klog-check: warning: [104.610957] ' __alloc_frozen_pages_noprof+0x341/0x360'
stress-ng: info: [1629] klog-check: warning: [104.610958] ' alloc_pages_mpol+0x88/0x1b0'
stress-ng: info: [1629] klog-check: warning: [104.610960] ' folio_alloc_mpol_noprof+0x14/0x40'
stress-ng: info: [1629] klog-check: warning: [104.610961] ' __read_swap_cache_async+0x16c/0x260'
stress-ng: info: [1629] klog-check: warning: [104.610963] ' swap_cluster_readahead+0x20a/0x310'
stress-ng: info: [1629] klog-check: warning: [104.610963] ' swapin_readahead+0x75/0x100'
stress-ng: info: [1629] klog-check: warning: [104.610964] ' do_swap_page+0x227/0x1010'
stress-ng: info: [1629] klog-check: warning: [104.610966] ' ? arch_exit_to_user_mode_prepare.isra.0+0xd/0xe0'
stress-ng: info: [1629] klog-check: warning: [104.610967] ' ? do_syscall_64+0xb9/0xc90'
stress-ng: info: [1629] klog-check: warning: [104.610970] ' ? __pfx_default_wake_function+0x10/0x10'
stress-ng: info: [1629] klog-check: warning: [104.610971] ' handle_pte_fault+0x1b9/0x1f0'
stress-ng: info: [1629] klog-check: warning: [104.610972] ' __handle_mm_fault+0x59d/0x720'
stress-ng: info: [1629] klog-check: warning: [104.610974] ' handle_mm_fault+0xe7/0x2f0'
stress-ng: info: [1629] klog-check: warning: [104.610975] ' do_user_addr_fault+0x22b/0x6c0'
stress-ng: info: [1629] klog-check: warning: [104.610977] ' exc_page_fault+0x7f/0x1b0'
stress-ng: info: [1629] klog-check: warning: [104.610978] ' asm_exc_page_fault+0x27/0x30'
stress-ng: info: [1629] klog-check: warning: [104.610979] 'RIP: 0033:0x750ea1eb137f'
stress-ng: info: [1629] klog-check: warning: [104.610981] 'Code: 9d 38 ee ff ff e9 9c fc ff ff e8 cc 3c 09 00 90 66 66 2e 0f 1f 84 00 00 00 00 00 55 48 8b 4f 08 48 89 c8 48 83 e0 f8 48 89 e5 <48> 3b 04 07 0f 85 9e 00 00 00 48 8b 47 10 48 3b 78 18 75 75 48 8b'
stress-ng: info: [1629] klog-check: warning: [104.610981] 'RSP: 002b:00007ffdd4d66fd0 EFLAGS: 00010206'
stress-ng: info: [1629] klog-check: warning: [104.610983] 'RAX: 00000000000002f0 RBX: 0000750ea2034fc0 RCX: 00000000000002f1'
stress-ng: info: [1629] klog-check: warning: [104.610983] 'RDX: 0000750ea2034e00 RSI: 0000000000408000 RDI: 0000596c2fa8fd60'
stress-ng: info: [1629] klog-check: warning: [104.610984] 'RBP: 00007ffdd4d66fd0 R08: 0000000000000118 R09: 0000750ea2034b20'
stress-ng: info: [1629] klog-check: warning: [104.610984] 'R10: 0000000000000120 R11: 0000750ea2034ac0 R12: 00000000000002f0'

Looks like the apparmor profiles being loaded/unloaded eat up memory

--
You received this bug notification because you are subscribed to linux
in Ubuntu.
Matching subscriptions: Bgg, Bmail, Nb
https://bugs.launchpad.net/bugs/2137457

Title:
system runs out of memory after loading many corrupt apparmor profiles

Status in linux package in Ubuntu:
New

Bug description:
Ubuntu questing AMD64, 8GB memory with 6.17.0-8-generic

run stress-ng with AppArmor stressor for ~5-10 mins, system runs out
of memory.

How to reproduce issue:

use latest stress-ng from https://launchpad.net/~colin-
king/+archive/ubuntu/stress-ng

sudo add-apt-repository ppa:colin-king/stress-ng
sudo apt-get update
sudo apt-get install stress-ng
sudo stress-ng --klog-check -v --apparmor 1

after a while one gets:

stress-ng: debug: [1628] invoked with './stress-ng --klog-check -v --apparmor 1' by user 0 'root'
stress-ng: debug: [1628] stress-ng 0.20.00 gf9ac1ba95c22
stress-ng: debug: [1628] system: Linux questing-amd64 6.17.0-8-generic #8-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 21:44:46 UTC 2025 x86_64, gcc 15.2.0, glibc 2.42, little endian
stress-ng: debug: [1628] RAM total: 7.3G, RAM free: 6.2G, swap free: 2.8G
stress-ng: debug: [1628] temporary file path: '/home/cking/stress-ng', filesystem type: ext4 (892311 blocks available, /dev/dm-0)
stress-ng: debug: [1628] 8 processors online, 8 processors configured
stress-ng: info: [1628] defaulting to a 1 day run per stressor
stress-ng: debug: [1628] CPU data cache: L1: 32K, L2: 4096K, L3: 16384K
stress-ng: debug: [1628] cache allocate: shared cache buffer size: 16384K
stress-ng: info: [1628] dispatching hogs: 1 apparmor
stress-ng: debug: [1628] starting stressor
stress-ng: debug: [1628] 1 stressor started
stress-ng: debug: [1630] apparmor: [1630] started (instance 0 on CPU 4)
stress-ng: info: [1629] klog-check: kernel cmdline: 'BOOT_IMAGE=/vmlinuz-6.17.0-8-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M'
stress-ng: info: [1629] klog-check: warning: [104.610917] 'stress-ng-appar invoked oom-killer: gfp_mask=0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), order=0, oom_score_adj=-1000'
stress-ng: info: [1629] klog-check: warning: [104.610923] 'CPU: 2 UID: 0 PID: 1634 Comm: stress-ng-appar Not tainted 6.17.0-8-generic #8-Ubuntu PREEMPT(voluntary) '
stress-ng: info: [1629] klog-check: warning: [104.610925] 'Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014'
stress-ng: info: [1629] klog-check: warning: [104.610926] 'Call Trace:'
stress-ng: info: [1629] klog-check: warning: [104.610927] ' <TASK>'
stress-ng: info: [1629] klog-check: warning: [104.610930] ' show_stack+0x49/0x60'
stress-ng: info: [1629] klog-check: warning: [104.610934] ' dump_stack_lvl+0x5f/0x90'
stress-ng: info: [1629] klog-check: warning: [104.610937] ' dump_stack+0x10/0x18'
stress-ng: info: [1629] klog-check: warning: [104.610949] ' dump_header+0x48/0x1be'
stress-ng: info: [1629] klog-check: warning: [104.610950] ' oom_kill_process.cold+0x8/0xac'
stress-ng: info: [1629] klog-check: warning: [104.610951] ' out_of_memory+0xff/0x2b0'
stress-ng: info: [1629] klog-check: warning: [104.610954] ' __alloc_pages_may_oom+0x10a/0x1d0'
stress-ng: info: [1629] klog-check: warning: [104.610956] ' __alloc_pages_slowpath.constprop.0+0x40e/0x990'
stress-ng: info: [1629] klog-check: warning: [104.610957] ' __alloc_frozen_pages_noprof+0x341/0x360'
stress-ng: info: [1629] klog-check: warning: [104.610958] ' alloc_pages_mpol+0x88/0x1b0'
stress-ng: info: [1629] klog-check: warning: [104.610960] ' folio_alloc_mpol_noprof+0x14/0x40'
stress-ng: info: [1629] klog-check: warning: [104.610961] ' __read_swap_cache_async+0x16c/0x260'
stress-ng: info: [1629] klog-check: warning: [104.610963] ' swap_cluster_readahead+0x20a/0x310'
stress-ng: info: [1629] klog-check: warning: [104.610963] ' swapin_readahead+0x75/0x100'
stress-ng: info: [1629] klog-check: warning: [104.610964] ' do_swap_page+0x227/0x1010'
stress-ng: info: [1629] klog-check: warning: [104.610966] ' ? arch_exit_to_user_mode_prepare.isra.0+0xd/0xe0'
stress-ng: info: [1629] klog-check: warning: [104.610967] ' ? do_syscall_64+0xb9/0xc90'
stress-ng: info: [1629] klog-check: warning: [104.610970] ' ? __pfx_default_wake_function+0x10/0x10'
stress-ng: info: [1629] klog-check: warning: [104.610971] ' handle_pte_fault+0x1b9/0x1f0'
stress-ng: info: [1629] klog-check: warning: [104.610972] ' __handle_mm_fault+0x59d/0x720'
stress-ng: info: [1629] klog-check: warning: [104.610974] ' handle_mm_fault+0xe7/0x2f0'
stress-ng: info: [1629] klog-check: warning: [104.610975] ' do_user_addr_fault+0x22b/0x6c0'
stress-ng: info: [1629] klog-check: warning: [104.610977] ' exc_page_fault+0x7f/0x1b0'
stress-ng: info: [1629] klog-check: warning: [104.610978] ' asm_exc_page_fault+0x27/0x30'
stress-ng: info: [1629] klog-check: warning: [104.610979] 'RIP: 0033:0x750ea1eb137f'
stress-ng: info: [1629] klog-check: warning: [104.610981] 'Code: 9d 38 ee ff ff e9 9c fc ff ff e8 cc 3c 09 00 90 66 66 2e 0f 1f 84 00 00 00 00 00 55 48 8b 4f 08 48 89 c8 48 83 e0 f8 48 89 e5 <48> 3b 04 07 0f 85 9e 00 00 00 48 8b 47 10 48 3b 78 18 75 75 48 8b'
stress-ng: info: [1629] klog-check: warning: [104.610981] 'RSP: 002b:00007ffdd4d66fd0 EFLAGS: 00010206'
stress-ng: info: [1629] klog-check: warning: [104.610983] 'RAX: 00000000000002f0 RBX: 0000750ea2034fc0 RCX: 00000000000002f1'
stress-ng: info: [1629] klog-check: warning: [104.610983] 'RDX: 0000750ea2034e00 RSI: 0000000000408000 RDI: 0000596c2fa8fd60'
stress-ng: info: [1629] klog-check: warning: [104.610984] 'RBP: 00007ffdd4d66fd0 R08: 0000000000000118 R09: 0000750ea2034b20'
stress-ng: info: [1629] klog-check: warning: [104.610984] 'R10: 0000000000000120 R11: 0000750ea2034ac0 R12: 00000000000002f0'

Looks like the apparmor profiles being loaded/unloaded eat up memory

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

Комментариев нет:

Отправить комментарий