https://bugs.kde.org/show_bug.cgi?id=506863

            Bug ID: 506863
           Summary: On a 15.6GiB RAM system, kwin will crash with out of
                    memory even when more than 8GiB is free when
                    overcomitting is disabled
    Classification: Plasma
           Product: kwin
      Version First 6.4.2
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY

On a 15.6GiB RAM system, kwin will crash with out of memory even when more than
8GiB is free when overcommitting is disabled, with kernel log messages like
these:

[ 6219.447523] __vm_enough_memory: pid: 5777, comm: kwin_wayland, bytes:
3739648 not enough memory for the allocation

I understand that disabling overcommitting memory has inherent limitations in
particular when it comes to using fork() instead of vfork(). However, I wanted
to leave this here in case there is some obvious low hanging fruit on how to
improve this. Disabling overcommitting can be useful as a protective measure
for some processes from others and to enable programs capable of recovering
from failed allocations to do so, I recognize almost nobody uses this but it
would still be neat if it worked. Also, I distinctly remember not having this
issue quite a while ago when testing out this kernel mode, so this might be a
regression of some sort.

Perhaps kwin is mmap()ing some huge files or should be using vfork() in an
obvious place?

My apologies if this ticket isn't useful.

STEPS TO REPRODUCE

1. Disable overcommitting RAM on a ~16GB RAM system
2. Do light usage with roughly 3GiB RAM taken.
3. It seems like kwin_wayland will eventually crash.

OBSERVED RESULT

Even with plenty of memory free, kwin seems to do something that requires a
relatively giant allocation (even if not actually written into and therefore
not actually reserved with overcommitting disabled) when perhaps that might be
avoidable.

EXPECTED RESULT

It would be nice if kwin somewhat worked with overcommitting disabled, at least
under such low RAM usage.

SOFTWARE/OS VERSIONS

Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: postmarketOS EDge
KDE Plasma Version: 6.4.2
KDE Frameworks Version: 6.15.0
Qt Version: 6.8.3

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to