Bug 411415

Summary: Latte Dock freezes when "Move Window [direction]" global shortcut key is pressed.
Product: [Plasma] lattedock Reporter: Rylsm <rylsm>
Component: applicationAssignee: Michail Vourlakos <mvourlakos>
Status: RESOLVED UPSTREAM    
Severity: normal CC: ruben
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:

Description Rylsm 2019-08-29 10:32:30 UTC
SUMMARY


STEPS TO REPRODUCE
1. Open "Application Menu" or any of the alternatives
2. Press any global shortcut bound to "Move Window [direction]"

OBSERVED RESULT
Latte Dock hangs and needs to be killed (latte-dock --replace doesn't work or took a long time to respond).

EXPECTED RESULT
Latte Dock shouldn't crash.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Michail Vourlakos 2019-08-29 10:42:35 UTC
1. Show me how to set the Move Window shortcut
2. With plasma panels don't you have that issue?
Comment 2 Michail Vourlakos 2019-08-29 10:49:48 UTC
3. I searched in plasma systemsettings, global shortcuts, KWin I found a Move window one I set it up and tried to reproduce.... Latte in my system works ok.

The only issue I noticed is that when application launcher is constantly Latte using 1% of cpu and does not stop, but I dont think should happen... so I will open a different thread for this one.
Comment 3 Michail Vourlakos 2019-08-29 16:00:16 UTC
3.Run Latte with default layout, latte-dock --default-layout is the problem present?
Comment 4 Rylsm 2019-08-29 17:50:55 UTC
Looks like it's even worse than I thought and maybe this is a KDE Plasma bug and not Latte Dock. I still have the hanging issue even with clean Latte Dock install. I noticed the hanging issue with Plasma components as well like System Settings and Plasma Shell, even Dolphin sometimes doesn't respond quickly when launched like it used to be.

I have two video showing how I make both Latte Dock and/or System Settings hang here:
https://drive.google.com/open?id=1R8hnhQvsG04Czpsmo0MaCNpgGBAEHaAV
https://drive.google.com/open?id=1AJtvyXpuOG5c264rnelZjhCXocx2uxR0

I forgot to include my system detail, so here is the detail:
Linux/KDE Plasma: Manjaro (testing branch)
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.0
Comment 6 Rylsm 2019-09-03 11:08:53 UTC
Looks like the hang occurs when these warning messages started to appear on after I do anything related to Meta key press.
 
[warning 17:50:40.907907] - Expected JSON property "X-Plasma-Provides" to be a single string. but it is a stringlist
[warning 17:51:10.945945] - QProcess: Destroyed while process ("kreadconfig5") is still running.
[warning 17:51:40.974974] - Expected JSON property "X-Plasma-Provides" to be a single string. but it is a stringlist
[warning 17:52:11.012012] - QProcess: Destroyed while process ("kreadconfig5") is still running.
[warning 17:52:41.023023] - Expected JSON property "X-Plasma-Provides" to be a single string. but it is a stringlist
[warning 17:53:11.062062] - QProcess: Destroyed while process ("kreadconfig5") is still running.
[warning 17:53:41.092092] - Expected JSON property "X-Plasma-Provides" to be a single string. but it is a stringlist
[warning 17:54:11.128128] - QProcess: Destroyed while process ("kreadconfig5") is still running.

Also the process "kreadconfig5" owned by latte-dock turns to a zombie process during the hang and then "disappear"/clean properly after a while or it will just hang indefinitely and killing the latte-dock process is the only solution.

ps aux | grep kreadconfig5
xxxxx     4406  0.0  0.0      0     0 pts/3    Z+   17:50   0:00 [kreadconfig5] <defunct>
xxxxx     4522  0.0  0.0      0     0 pts/3    Z+   17:51   0:00 [kreadconfig5] <defunct>
xxxxx     4532  0.0  0.0      0     0 pts/3    Z+   17:52   0:00 [kreadconfig5] <defunct>
xxxxx     4593  0.0  0.0   6276  2372 pts/4    R+   17:53   0:00 grep --color kreadconfig5

pstree -p -s 4406
systemd(1)───yakuake(1414)───zsh(3936)───latte-dock(4323)───kreadconfig5(4406)

pstree -p -s 4522
systemd(1)───yakuake(1414)───zsh(3936)───latte-dock(4323)───kreadconfig5(4522)

pstree -p -s 4532
systemd(1)───yakuake(1414)───zsh(3936)───latte-dock(4323)───kreadconfig5(4532)

The only part of Latte Dock code that explicitly call QProcess to kreadconfig5 is here: 
https://phabricator.kde.org/source/latte-dock/browse/master/?grep=kreadconfig

What do you think? Is this Qt bug? Race condition?
Comment 7 Michail Vourlakos 2019-09-03 11:26:24 UTC
What is your video driver in use?
Comment 8 Rylsm 2019-09-04 01:33:54 UTC
I am using amdgpu all the time. 
I actually tried to run Plasma under Nvidia PRIME and the hanging issues is still there.
Comment 9 Michail Vourlakos 2019-09-04 05:38:14 UTC
Sorry I have no idea why this occurs in your system. There are plenty of reports lately that after last updates of Arch/Manjaro plasma and Qt and Latte appear freezes
Comment 10 Rylsm 2019-09-05 03:57:00 UTC
Downgrading ostree to 2019.2-1 fixes the hanging issue. Looks like we need to wait what Arch Linux team will do to fix this issue.
Relevant Arch Linux bug report: https://bugs.archlinux.org/task/63614
Comment 11 Ruben Bakker 2019-09-05 06:45:43 UTC
I can also confirm the issue is with ostree. Downgrading it solved my problem as well. 

https://bugs.kde.org/show_bug.cgi?id=411421

when pressing super/meta key for a period longer than 1 second, latte dock pops up and shows pinned applications and their respective shortcut keys.

This is the exact behavior that does not happen when ostree is at latest version, it hangs before it shows the dock + shortcuts.
Comment 12 Michail Vourlakos 2019-09-05 11:12:34 UTC
ok, this is upstream and should influence plenty plasma cases and ostree cases...