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. Can anyone reproduce it ? More precisely: 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 Such a leak is at least a severe issue for anyone like me who set a nproc limit to protect against fork-bombs, in particular because it causes mysterious process crashes. I only understood the problem when I wanted to build a software that spawned a lot of processes. It also makes nproc limiting quite unusable without restarting KDE from time to time. Version 4:5.27.2-2 was affected too. I previously had 4:5.24.4-1 and I'm almost sure it had no leak. A few notes that may be specific to my setup: - I do have a 4k intel display. And regularly, for less than 1s, the display is corrupted. I haven't tried Wayland yet and I hope it will fix it. - I use mpv from deb-multimedia. - mpv conf: vo = gpu I couldn't find anything on bug.kde.org: should I forward ? Julien
Julien Muchembled <jm@jmuchemb.eu> writes: Interesting! Mine starts with only 11 threads. I wonder if this is hardware dependent? I was able to reproduce (with mpv 0.35.1-4), but going fullscreen didn't increase the kwin thread count on my system; however, exiting fullscreen consistently increased kwin's thread count by exactly two threads each time mpv leaves fullscreen. I would say "I'm horrified too!" but couldn't this be a new feature that is designed to limit media consumption? ;) The good news is that one doesn't need to restart KDE. Try this: kwin --replace& That's not a terrible range to bisect, if it comes to that. Oh, maybe this is why yours has more threads than mine? Maybe it's resolution dependent? (I'm not familiar with kwin's source) For reference, please note that bugs must be reproducible with Debian alone, otherwise they may be marked invalid. Here is the config I confirmed with: hwdec=vaapi vo=gpu profile=gpu-hq Yes please :) Kind regards, Nicholas
Julien Muchembled <jm@jmuchemb.eu> writes: Interesting! Mine starts with only 11 threads. I wonder if this is hardware dependent? I was able to reproduce (with mpv 0.35.1-4), but going fullscreen didn't increase the kwin thread count on my system; however, exiting fullscreen consistently increased kwin's thread count by exactly two threads each time mpv leaves fullscreen. I would say "I'm horrified too!" but couldn't this be a new feature that is designed to limit media consumption? ;) The good news is that one doesn't need to restart KDE. Try this: kwin --replace& That's not a terrible range to bisect, if it comes to that. Oh, maybe this is why yours has more threads than mine? Maybe it's resolution dependent? (I'm not familiar with kwin's source) For reference, please note that bugs must be reproducible with Debian alone, otherwise they may be marked invalid. Here is the config I confirmed with: hwdec=vaapi vo=gpu profile=gpu-hq Yes please :) Kind regards, Nicholas
I added more information upstream. Le 10/06/2023 à 20:22, Nicholas D Steeves a écrit : That's actually what I wrote. Oh thanks! But I finally decided to switch to Wayland, and now new issues :( - without downgrading any build-depends (and without forcing -d), compilation error; - the executable inside the binary package depends on libraries that aren't there anymore. I gave up. Sure. Actually, there's also a leak with --vo=x11 Julien
I added more information upstream. Le 10/06/2023 à 20:22, Nicholas D Steeves a écrit : That's actually what I wrote. Oh thanks! But I finally decided to switch to Wayland, and now new issues :( - without downgrading any build-depends (and without forcing -d), compilation error; - the executable inside the binary package depends on libraries that aren't there anymore. I gave up. Sure. Actually, there's also a leak with --vo=x11 Julien