[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-07-01 Thread Vlad Zagorodniy
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #28 from Vlad Zagorodniy  ---
Git commit f5b66a583de4ddfc6982d5bc54a307476077fc0f by Vlad Zagorodniy.
Committed on 01/07/2019 at 19:04.
Pushed by vladz into branch 'master'.

[plugins/qpa] Implement native offscreen surface

Summary:
Depending on whether the underlying platform supports offscreen surfaces,
QOffscreenSurface may create an invisible QWindow. In our case that's the
case, for each offscreen surface a native window is created. This may
lead to some funky results related to window decorations, see bug 407612.

There are several ways to implement offscreen surfaces - either use pbuffers
or utilize a surfaceless context extension. For the sake of simplicity
this change sticks with pbuffers, but it's a good idea to support both
methods.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, alexeymin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22150

M  +1-0plugins/qpa/CMakeLists.txt
M  +6-0plugins/qpa/integration.cpp
M  +1-0plugins/qpa/integration.h
A  +82   -0plugins/qpa/offscreensurface.cpp [License: GPL (v2)]
A  +53   -0plugins/qpa/offscreensurface.h [License: GPL (v2)]
M  +34   -22   plugins/qpa/sharingplatformcontext.cpp

https://commits.kde.org/kwin/f5b66a583de4ddfc6982d5bc54a307476077fc0f

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-28 Thread Vlad Zagorodniy
https://bugs.kde.org/show_bug.cgi?id=407612

Vlad Zagorodniy  changed:

   What|Removed |Added

 Status|CONFIRMED   |RESOLVED
   Version Fixed In||5.16.3
 Resolution|--- |FIXED
  Latest Commit||https://commits.kde.org/kwi
   ||n/61956025f0801170692c02d31
   ||3ddc324e27e9c6c

--- Comment #27 from Vlad Zagorodniy  ---
Git commit 61956025f0801170692c02d313ddc324e27e9c6c by Vlad Zagorodniy.
Committed on 28/06/2019 at 22:24.
Pushed by vladz into branch 'Plasma/5.16'.

Decorate only toplevel internal clients

Summary:
Unfortunately Aurorae decoration engine creates several internal clients
per each decoration. One of those clients represents QOffscreenSurface,
which is not a toplevel. Given that no QWindow object will be found for
such clients, m_internalWindowFlags contains undefined value.

Luckily, QOffscreenSurface sets FramelessWindowHint flag, but because
InternalClient is not able to find matching QWindow object, cached
QWindow flags won't have that hint set.

Thus InternalClient will attempt to decorate QOffscreenSurface. A new
Aurorae decoration will be created, which means a new QOffscreenSurface
will be created, which means a new Aurorae decoration will be created,
and so on.

This change restricts subset of internal clients that can be decorated.
Only clients with valid m_internalWindow can be decorated. If m_internalWindow
isn't null, then m_internalWindowFlags is guaranteed to be valid as well.
FIXED-IN: 5.16.3

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22136

M  +13   -1internal_client.cpp

https://commits.kde.org/kwin/61956025f0801170692c02d313ddc324e27e9c6c

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-28 Thread Vlad Zagorodniy
https://bugs.kde.org/show_bug.cgi?id=407612

Vlad Zagorodniy  changed:

   What|Removed |Added

 Ever confirmed|0   |1
URL||https://phabricator.kde.org
   ||/D22136
 Status|REPORTED|CONFIRMED
  Flags||Wayland+, X11-,
   ||ReviewRequest+

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-28 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=407612

aska...@hotmail.fr changed:

   What|Removed |Added

 CC||aska...@hotmail.fr

--- Comment #26 from aska...@hotmail.fr ---
I am also affected by this bug. Simply running "kwin_wayland
--exit-with-session termite" from a TTY starts a KWin session, but eats the
whole RAM in a matter of seconds (I picked termite as an application because it
has native Wayland support and allows me to see the RAM usage, but Konsole
running through XWayland gave the same result).

Distribution: Archlinux
Kernel: 5.1.15-arch1-1-ARCH
KDE Plasma Version: 5.16.2
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.4

GPU : Intel HD Graphics 630 (driver: i915)

I also have an Nvidia GPU in the machine (it's an Optimus laptop) but the bug
happens even when it's powered off with its modules unloaded.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-24 Thread Vlad Zagorodniy
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #25 from Vlad Zagorodniy  ---
After a bit of testing, it looks like internal_client.cpp#L40 [1] causes this
bug. Though I'm not sure how exactly KWin falls in the infinite "loop."

[1] Commit hash: 9b922f88332fc470dcb50e9b55c7d69ab7da4d4c

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-24 Thread Vlad Zagorodniy
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #24 from Vlad Zagorodniy  ---
(In reply to Martin Flöser from comment #23)
> Oops, sorry. Though I don't understand why: Aurorae should not create any
> internal windows at all...

Qt asks our QPA to create a QPlatformWindow for each QOffscreenSurface, which
never gets mapped.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-24 Thread Martin Flöser
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #23 from Martin Flöser  ---
Oops, sorry. Though I don't understand why: Aurorae should not create any
internal windows at all...

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-24 Thread Vlad Zagorodniy
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #22 from Vlad Zagorodniy  ---
git bisect start
# good: [a1c443cbcd43af18e654704c4f7d848a4b6669c2] SVN_SILENT made messages
(.desktop file) - always resolve ours
git bisect good a1c443cbcd43af18e654704c4f7d848a4b6669c2
# bad: [e8fe3f2fb7195fe562a073d1a78eb05d74670cfd] SVN_SILENT made messages
(.desktop file) - always resolve ours
git bisect bad e8fe3f2fb7195fe562a073d1a78eb05d74670cfd
# good: [57440d1d6b490cdad51266977d0269a08918b82f] Fix captions with non-BMP
characters
git bisect good 57440d1d6b490cdad51266977d0269a08918b82f
# bad: [5eb28512dd077998a6be2ff8aa6262a3c4f4f9af] Use new window decoration
theme icon for the Window Decorations KCM
git bisect bad 5eb28512dd077998a6be2ff8aa6262a3c4f4f9af
# good: [beb35d8b8fb6d2aebfcc625fbbdf18244f0e1817] SVN_SILENT made messages
(.desktop file) - always resolve ours
git bisect good beb35d8b8fb6d2aebfcc625fbbdf18244f0e1817
# bad: [40477aff2d8178eb99b8e5f7d6bae6076ef4bffe] SVN_SILENT made messages
(.desktop file) - always resolve ours
git bisect bad 40477aff2d8178eb99b8e5f7d6bae6076ef4bffe
# good: [6e08fb2fa5f6f2d03d9ad5ef74519295357c6ba2] [xwl] Generic X selections
translation mechanism with Clipboard support
git bisect good 6e08fb2fa5f6f2d03d9ad5ef74519295357c6ba2
# good: [062dfefafe06629117abf37b68ef59964fbb9654] [platforms/hwcomposer] Port
to AbstractOutput
git bisect good 062dfefafe06629117abf37b68ef59964fbb9654
# bad: [06f64d5e567e951ffe355f4b12af8ba3f83225b8] [autotests] Sub-surface
resize test
git bisect bad 06f64d5e567e951ffe355f4b12af8ba3f83225b8
# bad: [9b922f88332fc470dcb50e9b55c7d69ab7da4d4c] Split out a dedicated
InternalClient class
git bisect bad 9b922f88332fc470dcb50e9b55c7d69ab7da4d4c
# good: [66faa480d414eb5844ef7ff74c4643716a87f7f2] SVN_SILENT made messages
(.desktop file) - always resolve ours
git bisect good 66faa480d414eb5844ef7ff74c4643716a87f7f2
# first bad commit: [9b922f88332fc470dcb50e9b55c7d69ab7da4d4c] Split out a
dedicated InternalClient class

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-24 Thread Vlad Zagorodniy
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #21 from Vlad Zagorodniy  ---
Plasma/5.15 is good. I'll start bisecting.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-24 Thread Vlad Zagorodniy
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #20 from Vlad Zagorodniy  ---
Looks like KWin falls into some sort of an infinite loop. It keeps creating
InternalClient.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-22 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=407612

Nate Graham  changed:

   What|Removed |Added

   Priority|NOR |HI
   Severity|normal  |grave

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-22 Thread Michał Dybczak
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #19 from Michał Dybczak  ---
Created attachment 121070
  --> https://bugs.kde.org/attachment.cgi?id=121070=edit
kwin-wayland-memory-leak-non-breeze-aurorae-theme

You can see on the screenshot how RAM usage is increasing at a rapid pace, CPU
is busy (the whole desktop session is very choppy because of that and then
hangs).
On processes card, it's visible that kwin-walaynd is eating RAM and CPU but I
didn't manage to do a second screenshot. RAM increase was too high and too
quick.

You can also see the lack of proper titlebar (Aurorae theme Breezmite) which is
causing the issue with kwin-wayalnd.

Again, when I switched to Breeze aurorae theme, there was no memory leak on
wayaland session.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-22 Thread Michał Dybczak
https://bugs.kde.org/show_bug.cgi?id=407612

Michał Dybczak  changed:

   What|Removed |Added

 CC||michal.dybc...@gmail.com

--- Comment #18 from Michał Dybczak  ---
I can confirm the bug on my end. At first, I thought it's about window theme so
I switched from kvantum to Breeze, no effect, heavy memory leak still occurred
on kwin-wayland.

I noticed that the Aurorae theme (window decoration theme) was not properly
displayed I switched from Breezmite to Breeze and... it fixed the issue, memory
leak stopped.

The issue happened on Intel proprietary drivers, didn't dare to test Nvidia in
such case. The memory leak was too severely crippling the system so it was even
hard to take any screenshot. In a matter of seconds, memory and CPU were used
and hang.

Operating System: Manjaro Linux 
KDE Plasma Version: 5.16.1
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.4
Kernel Version: 5.1.12-1-MANJARO
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 7,7 GiB

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-16 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #17 from alexander.reim...@pm.me ---
(In reply to alexander.reimelt from comment #16)
> Can confirm it also on openSUSE Tumbleweed.
> X11 is unaffected

Only changing the window decoration from breeze to something else is triggering
the bug on my system, color and icon themes are unaffected. After going back to
breeze the performance recovers but the memory won't get freed. Even setting
everything back to breeze won't recover the lost memory. Somehow going from
affected decoration to affected decoration to breeze decoration will recover
some lost memory (in my case plastik -> adapta -> breeze).

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-16 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=407612

alexander.reim...@pm.me changed:

   What|Removed |Added

 CC||alexander.reim...@pm.me

--- Comment #16 from alexander.reim...@pm.me ---
Can confirm it also on openSUSE Tumbleweed.
X11 is unaffected

Theme: Adapta
Operating System: openSUSE Tumbleweed 20190612
KDE Plasma Version: 5.16.0
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.3
Kernel Version: 5.1.7-1-default
OS Type: 64-bit
Processors: 8 × AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx
Memory: 15,4 GiB

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-12 Thread Sawyer Bergeron
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #15 from Sawyer Bergeron  ---
(In reply to tromzy from comment #14)
> (In reply to Sawyer Bergeron from comment #11)
> > Not sure if this would help track it down any further, but it seems that
> > changing the theme back within the same session brings performance back to
> > normal and the memory lost initially is fully recovered. So it's not a leak
> > per se, as it is kept track of enough to free later.
> 
> It does not on my system. Changing the theme does not  help.

Do you mean changing from one affected theme to another or from a theme that
comes with a leak back to Breeze or some unaffected theme? For me the latter
undoes the leak, the former does not.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-12 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #14 from tro...@free.fr ---
(In reply to Sawyer Bergeron from comment #11)
> Not sure if this would help track it down any further, but it seems that
> changing the theme back within the same session brings performance back to
> normal and the memory lost initially is fully recovered. So it's not a leak
> per se, as it is kept track of enough to free later.

It does not on my system. Changing the theme does not  help.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-12 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #13 from tro...@free.fr ---
OK, I noticed something interesting : with some themes, the bug does not
happen, eg. : SierraBreezeEnhanced.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-12 Thread Kishore Gopalakrishnan
https://bugs.kde.org/show_bug.cgi?id=407612

Kishore Gopalakrishnan  changed:

   What|Removed |Added

 CC||kishor...@gmail.com

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-11 Thread Loren
https://bugs.kde.org/show_bug.cgi?id=407612

Loren  changed:

   What|Removed |Added

 CC||loren.buf...@gmail.com

--- Comment #12 from Loren  ---
Just installed KDE 5.16 (not beta) on kde neon. I can confirm the memory leak
stil present.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-06-11 Thread Nick
https://bugs.kde.org/show_bug.cgi?id=407612

Nick  changed:

   What|Removed |Added

 CC||futurepi...@gmx.us

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-05-17 Thread Sawyer Bergeron
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #11 from Sawyer Bergeron  ---
Not sure if this would help track it down any further, but it seems that
changing the theme back within the same session brings performance back to
normal and the memory lost initially is fully recovered. So it's not a leak per
se, as it is kept track of enough to free later.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-05-17 Thread Sawyer Bergeron
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #10 from Sawyer Bergeron  ---
(In reply to David Edmundson from comment #8)
> And you don't see this same leak with non-breeze on X?
> 
> Can you see if changing the render loop  in "kcmshell5 qtquicksettings"
> makes a difference
> 
> Also confirm that leaving it as breeze but using the alt-tab switcher causes
> a smaller leak.

Non-breeze on x does not have the leak

If I use a theme that *would* have the leak on wayland, and try changing the
render loop between basic, threaded, and automatic, the leak persists and does
not go away.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-05-17 Thread Sawyer Bergeron
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #9 from Sawyer Bergeron  ---
(In reply to David Edmundson from comment #8)
> And you don't see this same leak with non-breeze on X?
> 
> Can you see if changing the render loop  in "kcmshell5 qtquicksettings"
> makes a difference
> 
> Also confirm that leaving it as breeze but using the alt-tab switcher causes
> a smaller leak.

Changing the render loop does not seem to cause the leak with breeze enabled,
but I'll check if with another theme (that would cause a memory leak) enabled
it makes a difference.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-05-17 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #8 from David Edmundson  ---
And you don't see this same leak with non-breeze on X?

Can you see if changing the render loop  in "kcmshell5 qtquicksettings"
makes a difference

Also confirm that leaving it as breeze but using the alt-tab switcher causes a
smaller leak.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-05-17 Thread Sawyer Bergeron
https://bugs.kde.org/show_bug.cgi?id=407612

--- Comment #7 from Sawyer Bergeron  ---
It seems as though oxygen works without problems as well, but nothing other
than that and breeze.

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

[kwin] [Bug 407612] [Wayland] On Plasma 5.16 beta, with any Window Decoration theme other than Breeze, Kwin eats all the RAM in a few seconds and the session hangs

2019-05-17 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=407612

Nate Graham  changed:

   What|Removed |Added

Summary|[Wayland] On Plasma 5.16|[Wayland] On Plasma 5.16
   |beta, Kwin eats all the RAM |beta, with any Window
   |in a few seconds and the|Decoration theme other than
   |session hangs.  |Breeze, Kwin eats all the
   ||RAM in a few seconds and
   ||the session hangs

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