Summary: | kded5 crashes in KScreen::Config::setOutputPriority() after monitor wakes from sleep | ||
---|---|---|---|
Product: | [Plasma] KScreen | Reporter: | Jurica Vukadin <u.ra604> |
Component: | common | Assignee: | kscreen-bugs-null <kscreen-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | accounts+kde, aleixpol, casta+kde, dxq7541, kde, lazuje7em, me, nate, nekonexus, niuchangcun, notmart, qydwhotmail |
Priority: | NOR | Keywords: | regression |
Version: | 5.26.90 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/libkscreen/commit/d42dea00822c1cfb7478d1d55746e0750156918b | Version Fixed In: | 5.27.1 |
Sentry Crash Report: | |||
Attachments: | libkscreen-crash.patch |
Description
Jurica Vukadin
2023-01-21 12:09:43 UTC
I can report the same crash here with kf 5.102 and plasma 5.26.90. The crash did not occur with plasma 5.26.5 Only one monitor connected using DP, the crash can be triggered simply by powering off/on the monitor. It seems to crash when powering back on the screen. I did not manage to get a stacktrace yet. Nothing special in log files when powering on the screen as you can see: janv. 29 11:11:26 dagobah kded5[836]: colord: Setting X atom (id: 0 ) "_ICC_PROFILE" on output: "DP-1" janv. 29 11:11:26 dagobah dbus-daemon[539]: [session uid=1000 pid=539] Activating via systemd: service name='org.kde.kscreen.osdService' unit='plasma-kscreen-osd.service' requested by ':1.12' (uid=1000 pid=836 comm="/usr/bin/kded5") janv. 29 11:11:26 dagobah systemd[504]: Starting plasma-kscreen-osd.service... janv. 29 11:11:26 dagobah dbus-daemon[539]: [session uid=1000 pid=539] Successfully activated service 'org.kde.kscreen.osdService' janv. 29 11:11:26 dagobah systemd[504]: Started plasma-kscreen-osd.service. janv. 29 11:11:27 dagobah kscreen_backend_launcher[1037]: kscreen.xrandr: Emitting configChanged() janv. 29 11:11:27 dagobah kded5[836]: KCrash: Attempting to start /usr/bin/kded5 janv. 29 11:11:27 dagobah kded5[836]: KCrash: crashing... crashRecursionCounter = 2 janv. 29 11:11:27 dagobah kded5[836]: KCrash: Application Name = kded5 path = /usr/bin pid = 836 janv. 29 11:11:27 dagobah kded5[836]: KCrash: Arguments: /usr/bin/kded5 janv. 29 11:11:27 dagobah ksmserver[1330]: 11:11:27.832 WARN unknown env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP janv. 29 11:11:27 dagobah keepassxc[1023]: kf.notifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP janv. 29 11:11:27 dagobah fookb[1154]: kf.notifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP janv. 29 11:11:27 dagobah systemd[504]: plasma-kded.service: Main process exited, code=dumped, status=11/SEGV janv. 29 11:11:27 dagobah systemd[504]: plasma-kded.service: Failed with result 'core-dump'. janv. 29 11:11:36 dagobah plasmashell[898]: trying to show an empty dialog Created attachment 155820 [details]
libkscreen-crash.patch
This is probably not the correct fix, but this small patch in libkscreen fixes the issue for me.
(In reply to Guillaume Castagnino from comment #2) > Created attachment 155820 [details] > libkscreen-crash.patch > > This is probably not the correct fix, but this small patch in libkscreen > fixes the issue for me. The patch looks sane, would you like to create a merge request? (In reply to Fushan Wen from comment #3) > The patch looks sane, would you like to create a merge request? Honestly, I do not think that’s the correct fix. It hides the crash, but I assume there is some flaw before this somewhere in the logic. In this case, we may fall under the case where the monitor is already primary but still disabled (here: https://invent.kde.org/plasma/libkscreen/-/blob/master/src/setconfigoperation.cpp#L175) . But is this not a race condition? Shouldn’t the screen be already woken-up when entering this code? With my patch, you may end with no primary at all, or multiple primary when exiting fixPrimaryOutput(). So I think there is something better to do than this patch that is just hiding things. The only purpose of this patch was in fact to narrow down the crash location and workaround until we get a proper fix :) Git commit 8a436ad524cd961bf9e367d83b5872af77645d9c by David Edmundson. Committed on 10/02/2023 at 11:09. Pushed by davidedmundson into branch 'master'. Fix potential crash setting new configs If we get a setConfigOperation with entirely disabled outputs we would not have a valid primary screen. At this point we would call setPrimaryOutput with a null pointer. M +1 -1 src/setconfigoperation.cpp https://invent.kde.org/plasma/libkscreen/commit/8a436ad524cd961bf9e367d83b5872af77645d9c Git commit d42dea00822c1cfb7478d1d55746e0750156918b by David Edmundson. Committed on 10/02/2023 at 11:10. Pushed by davidedmundson into branch 'Plasma/5.27'. Fix potential crash setting new configs If we get a setConfigOperation with entirely disabled outputs we would not have a valid primary screen. At this point we would call setPrimaryOutput with a null pointer. (cherry picked from commit 8a436ad524cd961bf9e367d83b5872af77645d9c) M +1 -1 src/setconfigoperation.cpp https://invent.kde.org/plasma/libkscreen/commit/d42dea00822c1cfb7478d1d55746e0750156918b *** Bug 466036 has been marked as a duplicate of this bug. *** *** Bug 466006 has been marked as a duplicate of this bug. *** Re-opening as we are getting more crash reports with the same backtrace from users on 5.27, which is the release that was supposed to have fixed this. Indeed, looking at git history, it seems it missed 5.27 and is for 5.27.1. I had to patch manually over 5.27. *** Bug 466223 has been marked as a duplicate of this bug. *** Right right right, well spotted! |