Bug 464989

Summary: Seemingly random hang and restart of the Plasma Desktop
Product: [Plasma] plasmashell Reporter: Danir Toma <danirtoma>
Component: generic-crashAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: akselmo, danirtoma, nate
Priority: NOR    
Version: 5.26.5   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Syslog of Crash1, with crashing most open applications
Syslog of Crash2, without any apparent additional crashed apps
Syslog of Crash 3, with crashing K-Apps. This log contains a plasmashell core dump.
Crashlog of hang and crash while using clipboard manager (Super+V).
Stacktrace of hang and crash while using clipboard manager (Super+V).
Third stacktrace of hang and crash while using clipboard manager (Super+V).

Description Danir Toma 2023-01-29 15:20:07 UTC
Created attachment 155766 [details]
Syslog of Crash1, with crashing most open applications

SUMMARY
I've for multiple version observed some servere crash in the plasma desktop that I first attributed to other (now solved) issues and can't wrap my head around it, I think the behavior started somewhere around Plasma ~ 5.24.

The plasma desktop (including all panels, menus and also visually "integrated" things like Krunner), just freeze and stop in time, not responding to any input and for example clock widgets also freezing in time - open applications and things like screen-edge-actions keep working (for example the show all windows edge action). 

If I try to interact with any of the freezed interface bits or try to restart plasma by running `plasmashell --replace` in an already open terminal window or Yakuake, all plasma panels slide out and also drag many applications into death as well. Apps that I've also regularly observed crashing when this happens are:
- Dolphin
- Kate
- Chrome
- Discord
- TeamSpeak
- Pamac

Some apps like Steam, CS:GO or YouTube-music-bin (Inofficial YouTube Music Desktop) always keep running and never crash when this happens.

Funnily, while writing this it happened again, but Chrome stayed alive.

STEPS TO REPRODUCE
Sadly I don't know how to reproduce the issue. It never happens directly after a fresh reboot, but occurs multiple times a day, when the system already has been running.
When it happens after the system has been idle (with screen off), it seems like more running applications are crashing then when it happens while actively working.
I'm using a 3-monitor setup with the open-source AMD-Linux & MESA drivers, Pipewire and Wayland.
I also have my phone fully connected with KDE Connect, pumping out notifications to the desktop.


OBSERVED RESULT
Freeze and crash of seemingly all plasma panels and services, even crashing open applications like Dolphin, Kate and Chrome. Plasma recovers itself, when I try to use any shortcut (Super-key or ALT+F2 for Krunner) and all panels slide an as if nothing happened. I don't get any crash report window.


EXPECTED RESULT
No crashes and a stable work environment.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 6.0.19-3-MANJARO (64-bit)
Graphics Platform: Wayland
Monitors: 3x 1440p Monitors
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 5700 XT
Audio Server: Pipewire 0.3.64-1
Manufacturer: ASUS

ADDITIONAL INFORMATION
I have attached two journal-logs:

The first log "crash1" shows the clock freezing at ~15:11 and the panel and me noticing while trying to use Krunner at ~15:17 and apps crashing at ~15:19 and all panels and functionality restoring shortly after. I lost all open apps and unsaved progress. The system was previously idle with me waking the screen and unlocking a few minutes prior.

The second log "crash2" is a log exerpt of the second crash that happened  at 15:53, but without killing open apps.
I noticed the clock being frozen and all panels to vanish shortly after. Plasma Panels only restored after I invoked KRunner with ALT+F2. I've been listening to music the whole time, not noticing any dropouts.
Comment 1 Danir Toma 2023-01-29 15:21:17 UTC
Created attachment 155767 [details]
Syslog of Crash2, without any apparent additional crashed apps
Comment 2 Danir Toma 2023-02-06 13:00:57 UTC
Today I've encountered another freeze and crash of all plasma desktop elements.
Yakuake still worked flawlessly, that's how I extracted the crash log with the plasmashell core dump at Feb 06 13:45:34.

KRunner didn't react to any Hotkeys while the plasmashell was frozen but recovered after it crashed.
Kate and Dolphin also crashed together with plasma and didn't generate any crash report window.

I've attached a log with the name Crash3.
Comment 3 Danir Toma 2023-02-06 13:12:42 UTC
Created attachment 155997 [details]
Syslog of Crash 3, with crashing K-Apps. This log contains a plasmashell core dump.

Freezing started at about ~ 13:44 after I've removed a desktop wallpaper module, which I tried out a few minutes prior.

The problem doesn't seem to arise from the plugin, as the first lines of the crash dump (starting line 3090) is referencing QT message logging and notification functions.

Apologies if this should be a misinterpretation on my side and this crash log not being related to the main issue.
Comment 4 Nate Graham 2023-02-08 20:56:21 UTC
> #4  0x00007ff9411d5697 _ZN13QSGRenderLoop28handleContextCreationFailureEP12QQuickWindow (libQt5Quick.so.5 + 0x1d5697)

By any chance, did you upgrade your system and graphics drivers and not reboot afterwards?
Comment 5 Danir Toma 2023-02-09 05:24:44 UTC
(In reply to Nate Graham from comment #4)
> > #4  0x00007ff9411d5697 _ZN13QSGRenderLoop28handleContextCreationFailureEP12QQuickWindow (libQt5Quick.so.5 + 0x1d5697)
> 
> By any chance, did you upgrade your system and graphics drivers and not
> reboot afterwards?

I'm pretty sure that's not the case with example 1 and 2, but can't certainly remember with example 3.
Comment 6 Akseli Lahtinen 2024-05-30 11:05:49 UTC
Has this crash happened anymore with Plasma 6?
Comment 7 Danir Toma 2024-05-30 11:59:08 UTC
(In reply to Akseli Lahtinen from comment #6)
> Has this crash happened anymore with Plasma 6?

Sadly yes. I'll try to capture a fresh log, the next time it happens.
Comment 8 Danir Toma 2024-06-05 22:16:15 UTC
Created attachment 170186 [details]
Crashlog of hang and crash while using clipboard manager (Super+V).
Comment 9 Danir Toma 2024-06-05 22:16:34 UTC
Created attachment 170187 [details]
Stacktrace of hang and crash while using clipboard manager (Super+V).
Comment 10 Danir Toma 2024-06-05 22:17:53 UTC
I had it happening today again, while copying and pasting text (1000 chars?) multiple times a minute. 
I've not managed to capture a crashdump with debug symbols, but I've attached the stacktrace and the crash log.
Comment 11 Akseli Lahtinen 2024-06-10 07:26:57 UTC
Thanks, if you can get the debug symbols too that would be really helpful. It seems libKF6GlobalAccel and plasma_engine_clipboard.so are doing something wrong, but these logs unfortunately do not tell us *what* is going wrong.
Comment 12 Danir Toma 2024-07-09 12:16:07 UTC
Today it happened again - without a crash. 
I have KDE Connect notifications enabled and when I got a phone call on my smartphone, a plasma notification about the call appeared in the notification area as a popup (via KDE connect) and all plasma related things froze and just recovered about a minute after the call ended at 14:09:16.

The logs are pretty empty, the only thing that showed last in the log was at 14:06:08:
```
Jul 09 14:09:16 archlinux easyeffects[4218]: 'spa_pod_is_array(pod)' failed at /usr/include/spa-0.2/spa/pod/iter.h:319 spa_pod_get_array()
Jul 09 14:09:16 archlinux easyeffects[4218]: 'spa_pod_is_array(pod)' failed at /usr/include/spa-0.2/spa/pod/iter.h:319 spa_pod_get_array()
Jul 09 14:09:16 archlinux easyeffects[4218]: 'spa_pod_is_array(pod)' failed at /usr/include/spa-0.2/spa/pod/iter.h:319 spa_pod_get_array()
Jul 09 14:06:08 archlinux kded6[3820]: Service  ":1.439" unregistered
Jul 09 14:04:34 archlinux kdeconnectd[4132]: 2024-07-09T14:04:34 kdeconnect.plugin.sendnotifications: Unimplemented conversation of type 'r' 114
Jul 09 14:03:59 archlinux rtkit-daemon[3708]: Supervising 11 threads of 7 processes of 1 users.
Jul 09 14:03:59 archlinux rtkit-daemon[3708]: Supervising 11 threads of 7 processes of 1 users.
Jul 09 14:03:38 archlinux kdeconnectd[4132]: 2024-07-09T14:03:38 kdeconnect.plugin.sendnotifications: Unimplemented conversation of type 'r' 114
Jul 09 14:02:20 archlinux kdeconnectd[4132]: 2024-07-09T14:02:20 kdeconnect.plugin.sendnotifications: Unimplemented conversation of type 'r' 114
Jul 09 14:01:13 archlinux kdeconnectd[4132]: 2024-07-09T14:01:13 kdeconnect.plugin.sendnotifications: Unimplemented conversation of type 'r' 114
Jul 09 14:01:00 archlinux CROND[94817]: (root) CMDEND (run-parts /etc/cron.hourly)
Jul 09 14:01:00 archlinux CROND[94818]: (root) CMD (run-parts /etc/cron.hourly)
Jul 09 14:00:53 archlinux wireplumber[3701]: wp-event-dispatcher: <WpAsyncEventHook:0x55db6af81980> failed: <WpSiStandardLink:0x55db6b2607e0> link failed: 1 of 1 PipeWire links failed to activate
Jul 09 14:00:27 archlinux kdeconnectd[4132]: 2024-07-09T14:00:27 kdeconnect.plugin.sendnotifications: Unimplemented conversation of type 'r' 114
```
Comment 13 Danir Toma 2024-07-24 00:39:40 UTC
Created attachment 171944 [details]
Third stacktrace of hang and crash while using clipboard manager (Super+V).

It happened again after making a screenshot and opening the clipboard manager to select it.
I hope the attached log is sufficient, I exported it with the KDE Crashed Processes Viewer.
Comment 14 Nate Graham 2024-07-24 18:52:17 UTC
Ah, it's Bug 489638.

*** This bug has been marked as a duplicate of bug 489638 ***
Comment 15 Danir Toma 2024-07-24 21:16:36 UTC
Thank you for analyzing Nate!
Comment 16 Nate Graham 2024-08-01 12:58:40 UTC

*** This bug has been marked as a duplicate of bug 490791 ***