SUMMARY After 17 days, the number of threads of /usr/bin/kwin_x11 process has exceeded 2700 and it keeps increasing. At the beginning of a session, the process starts with 34 threads. I could find that such leak happens when viewing videos fullscreen e.g. with mpv. More precisely, when exiting fullscreen. I found the issue because I configure a nproc limit to protect against fork-bombs. STEPS TO REPRODUCE 1. start mpv without --fs -> thread count does not change 2. switch to fullscreen -> usually -2 threads 3. leaves fullscreen -> usually +17 threads 4. exit mpv -> thread count does not change ADDITIONAL INFORMATION - Version 4:5.27.2 was affected too. I previously used 4:5.24.4 and I'm almost sure it had no leak or it was not as severe. - I do have a 4k intel display. - I was unable to reproduce the issue inside qemu (didn't try 4k though, only FHD). - I found that the number of threads (initially & how fast it increases) depends on the number of CPU. I have a i7-1260P (16 entries in /proc/cpuinfo). - kwin_wayland is not affected. And wayland also fixes display corruption I had with X11 (regularly, for less than 1s).
How did you see how many threads were being used? Could you reproduce this with firefox going fullscreen and back?
(In reply to David Edmundson from comment #1) > How did you see how many threads were being used? With `ls |wc -l` within the `/proc/<pid>/task/` folder of kwin_x11 process. > Could you reproduce this with firefox going fullscreen and back? No issue with Firefox. I even tried a youtube video. BTW, I only mentioned mpv as an example but there's also vlc. To get more information, I can try patches against 4.27.5 if you have any.
Created attachment 159609 [details] strace output just after kwin_x11 has started During the capture, I used mpv and went/left fullscreen twice. If I look at correctly, leaked threads are stuck at a futex syscall so it may not be useful.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
Cannot reproduce
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!