Bug 427373 - kwin hangs systemd until timeout
Summary: kwin hangs systemd until timeout
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.19.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-06 07:46 UTC by tudor.iacobescu.2
Modified: 2023-09-06 10:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
'journalctl -rb -2' log, covering a boot where this issue happened (864.65 KB, text/x-log)
2020-10-06 07:46 UTC, tudor.iacobescu.2
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tudor.iacobescu.2 2020-10-06 07:46:42 UTC
Created attachment 132142 [details]
'journalctl -rb -2' log, covering a boot where this issue happened

Attempting to shut down or restart will often (but not always) make it so that systemd has to wait 90s for kwin_x11 and QDBusController to close. Looking through the logs, it seems they're spammed with kwin attempting to start over and over prior to being killed.

STEPS TO REPRODUCE
1. Shut down or restart

OBSERVED RESULT
Systemd waits for 90s for kwin_x11 and QDBusController to close, then kills them.

EXPECTED RESULT
It should close itself.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Kernel version: 5.8.12-arch1-1
Comment 1 Vlad Zahorodnii 2020-10-09 16:34:45 UTC
Git commit 08263b534d4a73781fb06b2f875e7557965c729c by Vlad Zahorodnii.
Committed on 09/10/2020 at 16:33.
Pushed by vladz into branch 'master'.

Safely remove all internal clients and override-redirect windows

When we destroy all internal clients and override-redirect windows, we
assume that corresponding lists will be implicitly detached.

However, in some cases, that might be not the case. For example, if the
list is not shared, neither begin() nor end() will detach. Therefore, it
is possible to hit invalidated iterators if the list is modified inside
the loop.

This change prevents hitting invalidated iterators by making explicit
list copies.

M  +6    -2    workspace.cpp

https://invent.kde.org/plasma/kwin/commit/08263b534d4a73781fb06b2f875e7557965c729c
Comment 2 Vlad Zahorodnii 2020-10-09 16:35:49 UTC
Git commit 5df72c6613e588b2cc920863dbefba16ba0b89c7 by Vlad Zahorodnii.
Committed on 09/10/2020 at 16:35.
Pushed by vladz into branch 'Plasma/5.20'.

Safely remove all internal clients and override-redirect windows

When we destroy all internal clients and override-redirect windows, we
assume that corresponding lists will be implicitly detached.

However, in some cases, that might be not the case. For example, if the
list is not shared, neither begin() nor end() will detach. Therefore, it
is possible to hit invalidated iterators if the list is modified inside
the loop.

This change prevents hitting invalidated iterators by making explicit
list copies.


(cherry picked from commit 08263b534d4a73781fb06b2f875e7557965c729c)

M  +6    -2    workspace.cpp

https://invent.kde.org/plasma/kwin/commit/5df72c6613e588b2cc920863dbefba16ba0b89c7
Comment 3 Rounak Dutta 2022-05-18 10:18:08 UTC
We are on the same page. I am having the same issue- https://bugs.kde.org/show_bug.cgi?id=453928 
look at that
Comment 4 David Edmundson 2023-09-06 10:38:07 UTC
This bug was reported against an outdated version of KWin. We have made many changes since the. 
If the issue persists in newer versions can you reopen the bug report updating the version number.