Bug 491472 - plasmashell crashes when using software rendering in a VM
Summary: plasmashell crashes when using software rendering in a VM
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (other bugs)
Version First Reported In: 6.1.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-09 07:05 UTC by Randy
Modified: 2024-08-14 16:35 UTC (History)
2 users (show)

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


Attachments
Stack trace (60.14 KB, text/plain)
2024-08-09 07:05 UTC, Randy
Details
crashed processes report showing the plasmashell crash history (89.85 KB, image/png)
2024-08-09 07:15 UTC, Randy
Details
Memory leak evidence in virt manager (28.90 KB, image/png)
2024-08-10 19:10 UTC, Randy
Details
01 plasmashell stack trace (60.14 KB, text/plain)
2024-08-10 19:48 UTC, Randy
Details
02 plasmashell stack trace (60.72 KB, text/plain)
2024-08-10 19:50 UTC, Randy
Details
03 akonadi stack trace (31.24 KB, text/plain)
2024-08-10 19:50 UTC, Randy
Details
04 plasmashell stack trace (57.53 KB, text/plain)
2024-08-10 19:51 UTC, Randy
Details
05 plasmashell stack trace (82.24 KB, text/plain)
2024-08-10 19:51 UTC, Randy
Details
06 kmail stack trace (100.30 KB, text/plain)
2024-08-10 19:52 UTC, Randy
Details
07 plasmashell stack trace (60.19 KB, text/plain)
2024-08-10 19:52 UTC, Randy
Details
08 plasmashell stack trace (66.19 KB, text/plain)
2024-08-10 19:53 UTC, Randy
Details
09 plasmashell stack trace (62.77 KB, text/plain)
2024-08-10 19:53 UTC, Randy
Details
10 plasmashell stack trace (65.83 KB, text/plain)
2024-08-10 19:54 UTC, Randy
Details
11 plasmashell stack trace (58.87 KB, text/plain)
2024-08-10 19:54 UTC, Randy
Details
12 plasmashell stack trace (59.51 KB, text/plain)
2024-08-10 19:54 UTC, Randy
Details
13 plasmashell stack trace (64.05 KB, text/plain)
2024-08-10 19:55 UTC, Randy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randy 2024-08-09 07:05:03 UTC
Created attachment 172427 [details]
Stack trace

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
I am using KDE6 on Fedora 40.  All patches installed as of 8/8/24 1155pm PT.
It is hosted in KVM with LMDE6 host, also patched up to date.
I am using kmail, proton bridge, syncthing, and mozilla firefox
At random times, usually after doing something in kmail, the screen suddenly freezes. 
STEPS TO REPRODUCE
1. use kmail for a while and eventually it hangs
2. 
3. 

OBSERVED RESULT
The screen freezes.
The VM stops responding to ping from the host.   
virt manager shows that it is using all of the 16G memory.
After about a minute, the screen goes black and the display loses connection.
Then after about another minute, the screen is displayed again, although completely frozen.
At this point, it resumes responding to ping and I can login.


EXPECTED RESULT
no hang

SOFTWARE/OS VERSIONS

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.10.3-200.fc40.x86_64 (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Ryzen 7 3800X 8-Core Processor
Memory: 7.7 GiB of RAM
Graphics Processor: llvmpipe

ADDITIONAL INFORMATION
The crashed process report shows that plasmashell is producing a core dump
I attached the stack trace
Comment 1 Randy 2024-08-09 07:06:25 UTC
let me know if you need anything else
Randy Sirois    | RandySirois@pm.me
Comment 2 Randy 2024-08-09 07:11:24 UTC
clarification:   when it starts responding to ping again, the screen is still frozen and the keyboard and mouse are frozen.    However I can login with SSH and work on the command line.
Comment 3 Randy 2024-08-09 07:15:14 UTC
Created attachment 172428 [details]
crashed processes report showing the plasmashell crash history
Comment 4 Nate Graham 2024-08-09 20:15:46 UTC
Crashing in software rendering:

       #2  0x00007f31c489a270 _ZN6KCrash15setCrashHandlerEPFviE (libKF6Crash.so.6 + 0x7270)
                #3  0x00007f31c489a73e _ZN6KCrash19defaultCrashHandlerEi (libKF6Crash.so.6 + 0x773e)
                #4  0x00007f31c144fd00 __restore_rt (libc.so.6 + 0x40d00)
                #5  0x00007f318018e3a8 n/a (n/a + 0x0)
                #6  0x00007f31a552e916 lp_rast_shade_quads_all (swrast_dri.so + 0x72e916)
                #7  0x00007f31a552f3bf lp_rast_triangle_1 (swrast_dri.so + 0x72f3bf)
                #8  0x00007f31a552c7fb rasterize_scene (swrast_dri.so + 0x72c7fb)
                #9  0x00007f31a552ca5f thread_function (swrast_dri.so + 0x72ca5f)

Is there a reason why software rendering it used here? Are you in a VM or have you forced it to use software rendering?
Comment 5 Randy 2024-08-10 18:56:13 UTC
(In reply to Nate Graham from comment #4)
> Crashing in software rendering:
> 
>        #2  0x00007f31c489a270 _ZN6KCrash15setCrashHandlerEPFviE
> (libKF6Crash.so.6 + 0x7270)
>                 #3  0x00007f31c489a73e _ZN6KCrash19defaultCrashHandlerEi
> (libKF6Crash.so.6 + 0x773e)
>                 #4  0x00007f31c144fd00 __restore_rt (libc.so.6 + 0x40d00)
>                 #5  0x00007f318018e3a8 n/a (n/a + 0x0)
>                 #6  0x00007f31a552e916 lp_rast_shade_quads_all
> (swrast_dri.so + 0x72e916)
>                 #7  0x00007f31a552f3bf lp_rast_triangle_1 (swrast_dri.so +
> 0x72f3bf)
>                 #8  0x00007f31a552c7fb rasterize_scene (swrast_dri.so +
> 0x72c7fb)
>                 #9  0x00007f31a552ca5f thread_function (swrast_dri.so +
> 0x72ca5f)
> 
> Is there a reason why software rendering it used here? Are you in a VM or
> have you forced it to use software rendering?

Nate,
Please clarify what you mean by "software rendering".   It that related to the diagnostic info I submitted or the environment?
It's running in a KVM VM on hosted on LMDE6 with an AMD3800X CPU and 64G of ram.
I have experimented with allocating 8GB, 12GB and 16GB of ram for the VM to see if it makes a difference.   Every time, it runs out of memory and then crashes.   I can see with 'htop' that it uses all the swap and allocated memory when it crashes.
All software on both the host machine and VM is up-to-date.
What additional info do you need?   I have several more stack traces that are collected in kde "Crashed Processes Viewer"   I can send more of these in text files and any additional info that you need.
I am sending this message from Firefox in the VM.    I am trying to use this Fedora40kde in VM as my daily driver machine with kmail, firefox, syncthing, but because I lose documents every time it crashes, I had to go back to use of the host LMDE machine with thunderbird, firefox, syncthing, and virtmanager running.   My primary use is job hunting because I am a technical PM in high tech software development, and the market has been very difficult during the last year.
I am happy to help any way I can.
Comment 6 Randy 2024-08-10 18:57:26 UTC Comment hidden (spam)
Comment 7 Randy 2024-08-10 18:58:10 UTC Comment hidden (spam)
Comment 8 Randy 2024-08-10 18:58:25 UTC Comment hidden (spam)
Comment 9 Randy 2024-08-10 19:10:26 UTC
Created attachment 172479 [details]
Memory leak evidence in virt manager

This is a screen shot from kvm virt manager showing that the Fedora40 VM was consuming all of its memory until i shut it down, which is shown too.  It hadn't crashed, but it will eventually exhaust all of its memory and swap then crash.   In this instance it has 8G memory allocated but the same thing happens with 12g and 16g.   The host has 64G overall.  
hoping this helps
Comment 10 Randy 2024-08-10 19:48:47 UTC
Created attachment 172480 [details]
01 plasmashell stack trace

plasma stack trace 01
Comment 11 Randy 2024-08-10 19:50:09 UTC
Created attachment 172481 [details]
02 plasmashell stack trace
Comment 12 Randy 2024-08-10 19:50:41 UTC
Created attachment 172482 [details]
03 akonadi stack trace
Comment 13 Randy 2024-08-10 19:51:03 UTC
Created attachment 172483 [details]
04 plasmashell stack trace
Comment 14 Randy 2024-08-10 19:51:32 UTC
Created attachment 172484 [details]
05 plasmashell stack trace
Comment 15 Randy 2024-08-10 19:52:00 UTC
Created attachment 172485 [details]
06 kmail stack trace
Comment 16 Randy 2024-08-10 19:52:33 UTC
Created attachment 172486 [details]
07 plasmashell stack trace
Comment 17 Randy 2024-08-10 19:53:23 UTC
Created attachment 172487 [details]
08 plasmashell stack trace
Comment 18 Randy 2024-08-10 19:53:48 UTC
Created attachment 172488 [details]
09 plasmashell stack trace
Comment 19 Randy 2024-08-10 19:54:08 UTC
Created attachment 172489 [details]
10 plasmashell stack trace
Comment 20 Randy 2024-08-10 19:54:30 UTC
Created attachment 172490 [details]
11 plasmashell stack trace
Comment 21 Randy 2024-08-10 19:54:55 UTC
Created attachment 172491 [details]
12 plasmashell stack trace
Comment 22 Randy 2024-08-10 19:55:23 UTC
Created attachment 172492 [details]
13 plasmashell stack trace
Comment 23 Randy 2024-08-10 19:56:47 UTC
nate,
I submitted all 13 crash trace files collected in the fedora/kde "crashed processes viewer" application
they are .txt files
-Randy
Comment 24 Nate Graham 2024-08-13 22:23:40 UTC
Ok so yeah, software rendering in a VM.

The problem is that the crash indicates it's in the graphics drivers. In this case, those drivers are provided by the VM software. So at the moment it looks like the crash is out of our control.

If your VM host software offers other graphics drivers, can you try those instead? Especially any that support hardware rendering and/or 3D acceleration.
Comment 25 Randy 2024-08-13 23:46:58 UTC
Thanks Nate,
It is using the virtio driver from KVM.
3d Accelleration was turned OFF.
I turned it ON and will continue to check for reoccurance.
Best regards,
Randy Sirois | 425-306-8966 | RandySirois@pm.me


On Tuesday, August 13th, 2024 at 15:23, Nate Graham <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=491472
> 
> Nate Graham nate@kde.org changed:
> 
> 
> What |Removed |Added
> ----------------------------------------------------------------------------
> Summary|plasma shell core dumps on |plasmashell crashes when
> |Fedora40 KDE - system hang |using software rendering in
> | |a VM
> 
> --- Comment #24 from Nate Graham nate@kde.org ---
> 
> Ok so yeah, software rendering in a VM.
> 
> The problem is that the crash indicates it's in the graphics drivers. In this
> case, those drivers are provided by the VM software. So at the moment it looks
> like the crash is out of our control.
> 
> If your VM host software offers other graphics drivers, can you try those
> instead? Especially any that support hardware rendering and/or 3D acceleration.
> 
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You reported the bug.
Comment 26 Randy 2024-08-14 06:01:24 UTC
Nate,
Thank you.
I added 3d Acceleration to the virtio driver.
It hasn't crashed yet.
This crashes left some damage that I could not fix, even by reinstalling kmail.   
so, ...  I created a completely new virtual machine and reinstalled Fedora40 
KDE and reconfigured Kmail and Proton Bridge.
I am monitoring for another failure and I'll let you know

On Tuesday, August 13, 2024 3:23:40 PM PDT you wrote:
> https://bugs.kde.org/show_bug.cgi?id=491472
> 
> Nate Graham <nate@kde.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
> Summary|plasma shell core dumps on  |plasmashell crashes when
>                    |Fedora40 KDE - system hang  |using software rendering in
>                    |
>                    |                            |a VM
> 
> --- Comment #24 from Nate Graham <nate@kde.org> ---
> Ok so yeah, software rendering in a VM.
> 
> The problem is that the crash indicates it's in the graphics drivers. In
> this case, those drivers are provided by the VM software. So at the moment
> it looks like the crash is out of our control.
> 
> If your VM host software offers other graphics drivers, can you try those
> instead? Especially any that support hardware rendering and/or 3D
> acceleration.
> 
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You reported the bug.
Comment 27 Nate Graham 2024-08-14 16:35:19 UTC
Thanks! Glad that helped. Closing for now since it looks like the problem was caused by those faulty graphics drivers.