RHEL 8.10: Memory leak in kernel-4.18.0-553.81.1.el8_10 and later

https://access.redhat.com/solutions/7134408

Environment Red Hat Enterprise Linux (RHEL) 8.10 kernel-4.18.0-553.81.1.el8_10.x86_64 or later transparent huge pages configured Issue There is a memory leak after updating the system to kernel-4.18.0-553.81.1.el8_10 or later. The system is frequently running Out of memory after updating the system to kernel-4.18.0-553.81.1.el8_10 or later kernels, even though no single process is consuming a huge amount of memory. Resolution The issue is resolved via the following errata release under Private JIRA 132449.

RHEL 8

The issue has been resolved with kernel-4.18.0-553.94.1.el8_10 via errata: RHSA-2026:0759 RHEL 8-rt

The issue has been resolved with kernel-rt-4.18.0-553.94.1.rt7.435.el8_10.x86_64 via errata: RHSA-2026:0760 Workarounds The issue is not reproducible on kernel-4.18.0-553.80.1.el8_10, so booting that exact kernel, or a previous kernel, prevents the issue. Alternatively, transparent hugepages can be disabled as described in How to use, monitor, and disable transparent hugepages in RHEL?. For workloads that leverage the use of Shared Memory THPs, please also be sure to also disable their usage by executing this at boot before workloads start: Raw

echo deny > /sys/kernel/mm/transparent_hugepage/shmem_enabled

Note: For Red Hat Pacemaker clusters, it is recommended to disable THP on all nodes of the cluster to get consistent behaviours across the environment. For all other cluster types, please engage the respective cluster vendor to confirm the best practice.

Root Cause There is a potential memory leak after updating the system to kernel-4.18.0-553.81.1.el8_10 or later, when Transparent Huge Pages (THP) and swap are enabled.

The issue will be resolved with upstream commit below:

Raw 06dac2f467fe (“mm: compaction: update the COMPACT[STALL|FAIL] events properly”) Diagnostic Steps Verify the running kernel version. It must be kernel-4.18.0-553.81.1.el8_10 or later. Raw

uname -r

4.18.0-553.81.1.el8_10.x86_64 Verify the status of Transparent HugePages (THP) to ensure it is enabled. Raw $ cat /sys/kernel/mm/transparent_hugepage/enabled [always] madvise never

$ grep AnonHugePages /proc/meminfo AnonHugePages: 1492992 kB Even if Shared memory THPs are set to “never”, they can still be allocated. To disabled them, set this to “deny”. Raw $ cat /sys/kernel/mm/transparent_hugepage/shmem_enabled always within_size advise [never] deny force

$ grep ShmemHugePages /proc/meminfo ShmemHugePages: 1828864 kB Product(s) Red Hat Enterprise LinuxComponent kernelTags kernel memory rhel_8 This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Updated: