Bug 486966

Summary: Plasma Wayland breaks when more than ~110 windows are open
Product: [Plasma] kwin Reporter: Sam <samuel.c.eriksen>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: duha.bugs, kde, nate
Priority: NOR    
Version First Reported In: 6.0.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Sam 2024-05-13 14:08:01 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
Plasma Wayland breaks when more than ~110 windows are open

STEPS TO REPRODUCE
1. Choose a browser
2. Quarter tile the browser window
3. Spam open new windows

OBSERVED RESULT
Just past 100 windows, the wallpaper and taskbar dissappear and the wayland session is not able to recover until logout and log back in.

EXPECTED RESULT
Kwin tolerates the large number of windows or warns the user that opening more windows is not possible/recommended at this time.

SOFTWARE/OS VERSIONS
Operating System: TUXEDO OS 3
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.5.0-10036-tuxedo (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION

Attempet with both Google Chrome (Flatpak) and Firefox packaged by disto maintainer (Tuxedo Computers)
Comment 1 duha.bugs 2024-05-13 17:53:45 UTC
Sounds like you are running out of RAM. Please check if you still have free memory before your session crashes.

I tried your method, but was unable to crash my session before I ran out of memory.  Not sure how many I managed, how did you count your open windows :D?
Comment 2 Sam 2024-05-13 19:49:56 UTC
I counted windows 1 by one. I have 32 gb of ram, so memory prob isn't an issue, but ill doublecheck. Assuming one window takes 125-200 mb, that should be around 150-240 windows the system should handle (assuming system without the windows uses 2GB). Even after closing all the windows, the plasma session fails to recover without a login. I will test again soon while watching memory.
Comment 3 Sam 2024-05-13 20:44:25 UTC
Error occurs at roughly 60% memory utilization. Happens again with Konsole. Also at roughly 20GB of memory utilization
Comment 4 duha.bugs 2024-05-13 21:17:42 UTC
Apologies  I was logged into a X11 for testing and didn't notice.

I retried in wayland and I was able to reproduce, sorry.
Comment 5 Sam 2024-05-13 22:59:04 UTC
Annoys me when that happens to me. Relatable.
Comment 6 David Edmundson 2024-05-14 21:00:55 UTC
It's not out of RAM, there's a max limit to the size of a wayland message we send with the stacking order.
Comment 7 Nate Graham 2024-05-14 21:37:41 UTC

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