Bug 2279327 - On aarch64 devices, running kernel 6.8 and later will cause memory leak within kernel if specific condition is met
Summary: On aarch64 devices, running kernel 6.8 and later will cause memory leak withi...
Status: CLOSED DUPLICATE of bug 2275290
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 40
Hardware: aarch64
OS: Linux
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL: https://discussion.fedoraproject.org/...
Depends On:
TreeView+ depends on / blocked
Reported: 2024-05-06 14:41 UTC by wolf
Modified: 2024-05-09 16:14 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2024-05-09 16:14:52 UTC
Type: ---

Attachments (Terms of Use)

Description wolf 2024-05-06 14:41:24 UTC
1. Please describe the problem:
Running Linux Kernel version 6.8 (Version isn't accurate, needs more testing) and above, a memory leak issue will appear when a display output is active but no display is plugged in.

Tested on: Kernel 6.8.7 with Fedora 40 on Raspberry Pi 4B
           Kernel 6.8.7 with Fedora 40 on Raspberry Pi 4B (Same setup)
           Kernel 6.8.6 with Fedora 39 on Raspberry Pi 3B+

2. What is the Version-Release number of the kernel:
Kernel 6.8.7 and 6.8.6, I suspect it's kernel 6.8 and above.

3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :
Before kernel 6.8 everything is indeed working, with no memory leak issue. This issue first appeared on my Raspberry Pi with kernel 6.8.7, and later confirmed that version 6.8.6 was also affected by this issue.

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:
- Install Fedora 39 or Fedora 40, run ``sudo dnf upgrade``
- Edit ``/boot/efi/config.txt`` to enable HDMI hotplug, which will let Raspberry Pi open one active display output even if no display is plugged in.
- Disconnect the monitor if present, reboot, and verify that there is active display output by connecting the display after Raspberry Pi boots.
- Disconnect display, a reboot is recommended, and use SSH to monitor memory usage.
- After 4 hours (When using Raspberry Pi 3B+) to 2 days (On my setup, Raspberry Pi 4B), memory will be consumed by ghost process, which probably is the kernel.

``/proc/meminfo`` diff:

% diff -y meminfo.2024-05-01T11-03-01 meminfo.2024-05-01T15-13-15 | grep '|'
MemFree:         3147256 kB		|       MemFree:         2562128 kB
MemAvailable:    3230020 kB		|       MemAvailable:    2649060 kB
Buffers:           22856 kB		|       Buffers:           25864 kB
Cached:           196804 kB		|       Cached:           197904 kB
Active:           264392 kB		|       Active:           265524 kB
Inactive:          48128 kB		|       Inactive:          51148 kB
Active(anon):     103204 kB		|       Active(anon):     103248 kB
Active(file):     161188 kB		|       Active(file):     162276 kB
Inactive(file):    48128 kB		|       Inactive(file):    51148 kB
Dirty:               832 kB		|       Dirty:               804 kB
AnonPages:        101940 kB		|       AnonPages:        101952 kB
Mapped:            65680 kB		|       Mapped:            66660 kB
KReclaimable:      18320 kB		|       KReclaimable:      18436 kB
Slab:             337744 kB		|       Slab:             918704 kB
SReclaimable:      18320 kB		|       SReclaimable:      18436 kB
SUnreclaim:       319424 kB		|       SUnreclaim:       900268 kB
KernelStack:        5288 kB		|       KernelStack:        5272 kB
PageTables:         4328 kB		|       PageTables:         4260 kB
Committed_AS:    1853796 kB		|       Committed_AS:    1853800 kB
VmallocUsed:       39744 kB		|       VmallocUsed:       39728 kB

5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:
Not tested yet.

6. Are you running any modules that not shipped with directly Fedora's kernel?:
All modules were shipped from Fedora.

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.
Not collected in my case, OOM killer kicked in, after force reboot log were lost.

Reproducible: Always

Comment 1 Peter Robinson 2024-05-09 11:37:15 UTC
I think this is the same as bug #2275290

You'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-c90afc5c01`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-c90afc5c01

Comment 2 wolf 2024-05-09 16:14:52 UTC
Yup, indeed a duplicate bug report

*** This bug has been marked as a duplicate of bug 2275290 ***

Note You need to log in before you can comment on or make changes to this bug.