Bug 463148 - Closing an app sometimes freezes complete plasmashell
Summary: Closing an app sometimes freezes complete plasmashell
Status: RESOLVED DUPLICATE of bug 432810
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.4
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-17 11:13 UTC by Andreas Hartmann
Modified: 2022-12-28 19:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Hartmann 2022-12-17 11:13:28 UTC
If a program is closed (like libreoffice. keepassxc, ...) plasmashell sometimes freezes for 5 or 10 seconds. This means: The tasklist is dead e.g. (each click on an existing running program is ignored, you can't start any new program), context menu of desktop doesn't work either. After some time (5 or 10 s) it's suddenly working again as if nothing happened before. The tasklist is now updated.

This problem is pretty old and not since today. It happens using X or Wayland - on AMD and nvidia GPUs.


STEPS TO REPRODUCE
1. Start several programs
2. End a program
3. 

OBSERVED RESULT
Sometimes (not always), plasmashell freezes.

EXPECTED RESULT
Plasmashell shouldn't freeze.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.26.4
(available in About System)
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Comment 1 michaelk83 2022-12-28 12:01:19 UTC
*** This bug has been marked as a duplicate of bug 432810 ***
Comment 2 matthias sweertvaegher 2022-12-28 16:47:12 UTC
could you explain how to reproduce this problem with libreoffice? I have the problem with KeepassXC but fail to reproduce it with LibreOffice Writer and Calc
Comment 3 Andreas Hartmann 2022-12-28 17:00:00 UTC
Unfortunately not. That's why I wrote "sometimes". If the problem doesn't happen, all apps can be closed without any problem - even keepassxc. If it happens, it happens not only with keepassxc, but any other program, too - like libreoffice e.g.

Is it possible to enable some debug output?
Comment 4 matthias sweertvaegher 2022-12-28 17:09:20 UTC
interesting, you could check the xserver log in your home dir.. I'm not sure we are having the same problem then, as I can consistently reproduce it with KeepassXC (and only that app). Of course, it only happens when copying a password to the clipboard, otherwise, it closes just fine.
Comment 5 Andreas Hartmann 2022-12-28 17:21:03 UTC
No - it happens only sometimes (sporadically) and it is not reproducible (or I don't know how to reproduce it). Using keepassxc via copy / paste of passwords (CTRL-SHIFT-V) doesn't necessarily trigger the problem (tested at the moment again - worked just fine as expected).
Comment 6 Andreas Hartmann 2022-12-28 17:44:27 UTC
I was able to trigger it a few times at the moment with keepassxc:
- Start keepassx
- Search for account via search field
- mark the desired entry
- CTRL-u to copy the URL
- paste URL to Firefox
- open URL in Firefox
- CTRL-B to copy password to Firefox login dialog of website
- closed keepasxc
- kicker and desktop, ... hangs
Comment 7 Andreas Hartmann 2022-12-28 17:49:47 UTC
I was able to reproduce the same problem as described before after logout from KDE and relogin. Seems that CTRL-b or CTRL-u triggers the problem, but not SHIFT-CTRL-c ?
Comment 8 Andreas Hartmann 2022-12-28 18:44:19 UTC
I did a strace on the keepassxc process. After closing keepassxc (using ALT-F4 e.g.), the app is closed instantly, but the icon hangs for about 5 s in the plasmashell.

Next, I straced kded and plasmashell. kded exactly reports the end of keepassxc:
22457 19:30:51 (+     0.009041) --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=28400, si_uid=1000, si_status=0, si_utime=93, si_stime=8} ---
22457 19:30:51 (+     0.000013) waitid(P_ALL, 0, {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=28400, si_uid=1000, si_status=0, si_utime=0, si_stime=0}, WNOHANG|WEXITED|WNOWAIT, NULL) = 0
22457 19:30:51 (+     0.000017) wait4(28400, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, {ru_utime={tv_sec=0, tv_usec=974179}, ru_stime={tv_sec=0, tv_usec=91589}, ...}) = 28400

After this entry, it takes 5 seconds until plasmashell is "unlocked" again. This starts with this TIMEOUT:
22471 19:30:56 (+     0.293456) <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)

Unfortunately, I can't say which connection exactly timed out.

BTW:
It's even not necessary to paste the copied data anywhere - it's enough to just do CTRL-u ... .
Comment 9 Andreas Hartmann 2022-12-28 19:05:14 UTC
Further strace shows, that the mentioned timed out connection (0x55c409e84f40) is an existing connection in plasmashell which gets reused over and over again (as long as plasmashell isn't stopped).

It is exactly reused at the moment of the copy to clipboard with CTRL-u.

Maybe there is a problem after clipboard clearing? Keepassxc clears the clipboard after 10 s (but waiting after the clipboard is cleared doesn't "solve" the problem).