Bug 495175 - After upgrade to 24.04 base, Plasma Shell crashes instantly upon launch, Desktop environment completely absent and unusable
Summary: After upgrade to 24.04 base, Plasma Shell crashes instantly upon launch, Desk...
Status: CONFIRMED
Alias: None
Product: neon
Classification: KDE Neon
Component: Packages User Edition (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-22 08:55 UTC by thebluequasar
Modified: 2024-11-24 16:38 UTC (History)
5 users (show)

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


Attachments
Backtrace saved with "Crashed process viewer" app (40.65 KB, text/plain)
2024-10-22 08:55 UTC, thebluequasar
Details
backtrace for plasmashell process, saved using "crashed process viewer" app (35.14 KB, text/plain)
2024-11-04 12:25 UTC, thebluequasar
Details
Saved backtrace with debug symbols installed (34.36 KB, text/plain)
2024-11-08 08:01 UTC, thebluequasar
Details
system log for the last 2 minutes after the crash (40.55 KB, text/plain)
2024-11-08 08:04 UTC, thebluequasar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description thebluequasar 2024-10-22 08:55:06 UTC
Created attachment 175104 [details]
Backtrace saved with "Crashed process viewer" app

SUMMARY
After upgrading my PC with KDE Neon 22.04 to the 24.04 Ubuntu base, the Plasma desktop environment is completely unusable as it crashes instantly after login. It doesn't restart so it could be used after this, and manually starting it (with the command: kstart plasmashell) resulted in exact same behavior: crashing instantly so that desktop background and icons only appear in a flash, and then disappear. Backtrace of the crash, saved via "crashed process viewer" app has been attached.

STEPS TO REPRODUCE
1. after receiving the notification on the (up-to-date) KDE Neon 22.04 computer about the availability of 24.04 upgrade, click to start upgrade, and proceed with the upgrade
2. after the upgrade is complete, log in to the system that now has the 24.04 base
3. Plasma will crash instantly and won't recover, starting it from a terminal produces the same outcome.

OBSERVED RESULT
Plasma desktop is completely unusable on the KDE Neon after upgrading to the 24.04 Ubuntu base, since it crashes instantly when launched and doesn't ever recover from the crash. It basically results in a distribution without a desktop environment.

EXPECTED RESULT
Plasma desktop should work normally on Neon with the 24.04 base, meaning being usable and recovering immediately 
from any sporadic crashes

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon 24.04 User edition
Plasma 6.2.0
KDE Frameworks 6.6.0
Qt 6.7.2
Graphics processor: AMD Radeon

ADDITIONAL INFORMATION
Some further information that might be useful: I have two panels, one default panel (almost) and a small one to the left side of the screen, both set to auto-hide. I also choose "Remove" for obsolete/broken packages during the upgrade to 24.04.
Comment 1 Oded Arbel 2024-10-29 10:28:30 UTC
Can you please post the output of running `apt policy qt6-base` ?
Comment 2 thebluequasar 2024-11-01 09:36:09 UTC
(In reply to Oded Arbel from comment #1)
> Can you please post the output of running `apt policy qt6-base` ?

Thanks for replying.
The problem is that, since this is a machine I work with everyday, I couldn't keep it in that broken state and reverted back to 22.04 base using a Timeshift snapshot. So I guess the output of this command won't be useful when run on my current KDE Neon 22.04 that works fine, right?
I think I may be able to upgrade again and get this output, and then revert back again if I have to, perhaps I could do so over the weekend.
If there's any other information I can get, please tell me the commands I can run to gather more details.
Comment 3 Oded Arbel 2024-11-02 19:49:48 UTC
(In reply to thebluequasar from comment #2)
> If there's any other information I can get, please tell me the commands I
> can run to gather more details.

There is currently ongoing (possibly already fixed) an issue where some packages have been upgraded to Qt 6.8 while other have not - and are incompatible with the new Qt, and thus will not run.

You should not have any problems if you are running on the Neon "user" release.

If you upgrade again and encounter the same problem, please provide the output of:

- `apt policy qt6-base` (to check what Qt versions are installed and/or available)
- `grep archive.neon.kde.org /etc/apt/sources.list.d/ -r` (to check which Neon release channel you are consuming)
- `kinfo` (for the system version report)
- grep archive.neon.kde.org /etc/apt/sources.list.d/ -r
Comment 4 thebluequasar 2024-11-04 12:23:44 UTC
(In reply to Oded Arbel from comment #3)
> (In reply to thebluequasar from comment #2)

> You should not have any problems if you are running on the Neon "user"
> release.

But I'm running the user edition of KDE Neon. It's a bit troubling because in my experience it's hardly ever been broken like this .
So, I did upgrade once again and it was the same story. I did, however, run these commands to get more info on this bug.
Here are the outputs:
---
`grep archive.neon.kde.org /etc/apt/sources.list.d/ -r`:
`/etc/apt/sources.list.d/neon.sources:URIs: http://archive.neon.kde.org/user`
---
`apt policy qt6-base`:
`qt6-base:
  Installed: 6.8.0-0zneon+24.04+noble+release+build16
  Candidate: 6.8.0-0zneon+24.04+noble+release+build16
  Version table:
 *** 6.8.0-0zneon+24.04+noble+release+build16 500
        500 http://archive.neon.kde.org/user noble/main amd64 Packages
        100 /var/lib/dpkg/status
     6.8.0-0zneon+24.04+noble+release+build15 500
        500 http://archive.neon.kde.org/user noble/main amd64 Packages
     6.8.0-0zneon+24.04+noble+release+build14 500
        500 http://archive.neon.kde.org/user noble/main amd64 Packages
     6.8.0-0zneon+24.04+noble+release+build13 500
        500 http://archive.neon.kde.org/user noble/main amd64 Packages`
---
`kinfo`:
`Operating System: KDE neon 6.2
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.8.0-48-generic (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 3 7320U with Radeon Graphics
Memory: 7.1 GiB of RAM
Graphics Processor: AMD Radeon Graphics`
---
I also saved the backtrace for Plasma shell using the "Crashed Process Viewer" app, which has been attached.
Hope these help somewhat in finding out what is going wrong here.
Comment 5 thebluequasar 2024-11-04 12:25:59 UTC
Created attachment 175515 [details]
backtrace for plasmashell process, saved using "crashed process viewer" app
Comment 6 Oded Arbel 2024-11-04 23:46:32 UTC
This is a crash deep in Qt6 QML library code. This isn't great - it shouldn't do that. The signal is a bit weird - its a SIGTRAP, which is most often used for debugging. If this was an uncaught exception, I'd expect to see a SIGABRT, and if it was a memory management problem I'd expect to see SIGSEGV. I haven't noticed the older backtrace up till now, and reviewing it - the traces seem identical, except for memory addresses, likely caused by different builds.

If you are willing to try it again, please first install the packages qt6-webengine-dbgsym and libplasma6-dbgsym - as it will help to understand where in Qt6 did the crash happened and what Plasma did to trigger that.
Comment 7 thebluequasar 2024-11-06 07:12:34 UTC
(In reply to Oded Arbel from comment #6)
> If you are willing to try it again, please first install the packages
> qt6-webengine-dbgsym and libplasma6-dbgsym - as it will help to understand
> where in Qt6 did the crash happened and what Plasma did to trigger that.

Alright, I think I can do that within a few days. So this time, only the backtrace is needed? of course after installing the debug symbols you mentioned.
And one more thing: Would running KDE Neon user edition from a live USB be the same in terms of producing this bug? since I can do this one much more easily and quickly.
Comment 8 Oded Arbel 2024-11-06 10:56:45 UTC
(In reply to thebluequasar from comment #7)
> Alright, I think I can do that within a few days. So this time, only the
> backtrace is needed? of course after installing the debug symbols you
> mentioned.

The backtrace will be mighty useful, but ideally you should also submit a copy of the log showing the start - if there are any issues that cause the crash, they might be reported there. You can get a useful code snippet from the text terminal, after the crash happened, by running
journalctl --user -S -5m > start-failed.log
(or a different time specification, if 5 minutes is too much or too little)

> And one more thing: Would running KDE Neon user edition from a live USB be
> the same in terms of producing this bug?

Maybe? 🤷 I actually expect that it would work fine (because the problem is caused by a local system configuration), but it would surely be a very interesting data point, if it does crash.
Comment 9 Carlos De Maine 2024-11-07 07:39:58 UTC
Comment on attachment 175104 [details]
Backtrace saved with "Crashed process viewer" app

there is obviously a big crash in libQt6WebEngineCore.so.6.  i'm not quite sure uses that library in a stock plasma 6 setup.  maybe you have a different applet that uses it installed.  what happens if you boot your system in safe-mode?  maybe you could try upgrading your system with apt of pkcon on a virtual terminal?
Comment 10 thebluequasar 2024-11-08 07:59:52 UTC
(In reply to Oded Arbel from comment #8)
> (In reply to thebluequasar from comment #7)
> The backtrace will be mighty useful, but ideally you should also submit a
> copy of the log showing the start - if there are any issues that cause the
> crash, they might be reported there. You can get a useful code snippet from
> the text terminal, after the crash happened, by running
> journalctl --user -S -5m > start-failed.log
>
> Maybe? 🤷 I actually expect that it would work fine

OK, so I did manage to get the backtrace and  system log using journalctl for 2 last minutes after the crash. I'm sending both as attachment. And you were right, it's caused by my current configuration and didn't happen on a live USB.
BTW, as you probably notice in the system log file, I have KDE PIM apps installed (kmail, merkuro) which start alongside Plasma (AFAIK). I did suspect those processes might be at fault, but last time I did remove all those apps - alongside all akonadi related backend packages - but that did not make any difference and the crash was happening in the same way.
Comment 11 thebluequasar 2024-11-08 08:01:24 UTC
Created attachment 175637 [details]
Saved backtrace with debug symbols installed
Comment 12 thebluequasar 2024-11-08 08:04:43 UTC
Created attachment 175638 [details]
system log for the last 2 minutes after the crash
Comment 13 thebluequasar 2024-11-08 08:25:18 UTC
(In reply to Carlos De Maine from comment #9)
> Comment on attachment 175104 [details]
> Backtrace saved with "Crashed process viewer" app
> 
> there is obviously a big crash in libQt6WebEngineCore.so.6.  i'm not quite
> sure uses that library in a stock plasma 6 setup.  maybe you have a
> different applet that uses it installed.  what happens if you boot your
> system in safe-mode?  maybe you could try upgrading your system with apt of
> pkcon on a virtual terminal?

Yes I do have a couple of applets installed, maybe they're causing an incompatibility? I'll try removing them and see what happens
Could you please explain what this virtual terminal is? I'm not familiar with that at all
Comment 14 thebluequasar 2024-11-08 14:26:19 UTC
I think I found out exactly what was causing Plasma to crash: it's the Dictionary plasmoid/widget - the one from KDE and bundled by default with Plasma desktop. 
I removed most of my Plasma configurations (from ~/.config and ~/.local/share) and when I was adding the pieces and tweaking the settings I discovered it. I tried several times with the same result: almost as soon as the dictionary widget was dropped onto a panel or into the desktop, Plasma would crash immediately.
 I was a bit surprised to see it's not a third-party plasmoid, but maybe this is a rare bug and not everyone is affected. However, I hope these information will come in handy.
Comment 15 Jonathan Riddell 2024-11-08 15:19:29 UTC
Yes I agree dict widget does crash Plasma.  The output is complaining about QtWebEngineProcess not running.
Comment 16 Jonathan Riddell 2024-11-14 14:07:48 UTC
Patch at 
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4893
But on testing it didn't help for me