Bug 494544 - Plasmashell exhibits high memory use and eventually freezes with standalone Media Player widget on panel after any length of time (wayland, AMD gpu, arch)
Summary: Plasmashell exhibits high memory use and eventually freezes with standalone M...
Status: RESOLVED DUPLICATE of bug 491946
Alias: None
Product: plasmashell
Classification: Plasma
Component: Media Player widget (show other bugs)
Version: 6.2.0
Platform: Arch Linux Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-11 15:19 UTC by zxq5
Modified: 2024-12-27 15:03 UTC (History)
6 users (show)

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


Attachments
Results from gdb running on plasmashell during a session when Media Player freezes (47.96 KB, text/plain)
2024-12-11 17:51 UTC, John Kizer
Details
System journal entries with the identifier plasmashell (10.65 KB, text/plain)
2024-12-11 17:51 UTC, John Kizer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zxq5 2024-10-11 15:19:47 UTC
SUMMARY
Plasmashell / the panel freezes after any significant length of time using the desktop environment.

STEPS TO REPRODUCE
1. login to kde plasma and use the desktop environment for any reasonable amount of time.
2. the plasma panel will freeze after any time from a few minutes to a few hours.

OBSERVED RESULT
- Plasma panel completely freezes and is unresponsive. additionally typing on the desktop no longer shows krunner (so maybe more than just a panel issue)
- krunner no longer appears when typing on the desktop
- right click context menu does not appear
- memory use of plasmashell continually increases after the freeze (as of typing this it's using 12.7GB)
- plasmashell shows no error logs.

EXPECTED RESULT
none of the above

SOFTWARE/OS VERSIONS
OS: Arch linux (up to date as of 11th oct 2024)
KDE Plasma Version: 6.2.0 (though the issue has persisted since 6.0.x)
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3

ADDITIONAL INFORMATION
problem has persisted for several months since a 6.0.x version.

attempting to "terminate" plasmashell or running "killall" or "sudo killall" on plasmashell does nothing. running plasmashell --replace shows the following:

  󰘧  plasmashell --replace
kf.dbusaddons: Failed to register name 'org.kde.plasmashell' with DBUS - does this process have permission to use the name, and do no other processes own it already?

running the journalctl command, there are no logs at all from plasmashell when the desktop freezes
manually running "kill" on the plasmashell process (from system monitor) will *sometimes* fix the issue and make the panel responsive, however often when plasmashell is restarted the panel does not appear again.

running kwin_wayland --replace and then manually killing plasmashell consistently works to make the panel responsive again.
Comment 1 zxq5 2024-10-11 15:20:26 UTC
now plasmashell is using 13.3GB.
Comment 2 Nate Graham 2024-10-11 17:00:40 UTC
Sounds like there's a memory leak somewhere that's causing your system to run out of memory. These are unfortunately tricky to pinpoint.

To start with, can you create a new clean user account with no Plasma customizations and see if the issue still happens? If it does not, then the issue will be caused by something you've done with customizing Plasma in your normal user account. Then we'll want to figure out what it is.
Comment 3 zxq5 2024-10-18 14:31:27 UTC
(In reply to Nate Graham from comment #2)
> Sounds like there's a memory leak somewhere that's causing your system to
> run out of memory. These are unfortunately tricky to pinpoint.
> 
> To start with, can you create a new clean user account with no Plasma
> customizations and see if the issue still happens? If it does not, then the
> issue will be caused by something you've done with customizing Plasma in
> your normal user account. Then we'll want to figure out what it is.

I no longer seem to be experiencing the issue as of the last few days, I believe the issue must have been caused by a plasmoid as since resetting my panel to the default settings I have not experienced the issue again
Comment 4 Nate Graham 2024-10-22 17:14:35 UTC
Sounds good. If you ever manage to figure out which plasmoid it was specifically, that would be very helpful information!
Comment 5 zxq5 2024-10-28 15:01:03 UTC
(In reply to Nate Graham from comment #4)
> Sounds good. If you ever manage to figure out which plasmoid it was
> specifically, that would be very helpful information!

I'm almost certain that the plasmoid causing the problem was the media player plasmoid that's built in by default. I dont have any issues when it's running through the system tray however since removing the standalone plasmoid on my panel I'm no longer experiencing the freezes.
Comment 6 zxq5 2024-10-28 15:01:45 UTC
hope this helps
Comment 7 Nate Graham 2024-10-28 15:15:38 UTC
Thanks a lot! So when you add it back to your panel as a standalone widget, does the problem return?
Comment 8 zxq5 2024-11-03 00:58:31 UTC
(In reply to Nate Graham from comment #7)
> Thanks a lot! So when you add it back to your panel as a standalone widget,
> does the problem return?

yeah exactly that.
Comment 9 zxq5 2024-11-03 16:17:48 UTC
can confirm that after re-adding the media player as a standalone widget on my panel the issue has reappeared within a couple of hours
Comment 10 Nate Graham 2024-11-04 17:12:40 UTC
Thanks a lot, that's really helpful!
Comment 11 TraceyC 2024-11-04 23:32:03 UTC
I was unable to reproduce this with Plasma 6.2 or with git-master
I added the Media Player widget to a panel on each, and had it running all day. I was monitoring top. No CPU hogging, no memory hogging, no panel freezes

In the past, I *have* seen the Plasma panel freeze when playing Spotify as a snap
Today I had Spotify playing from the flatpak install (which also installs a snap, don't ask me), and no problems with it
Comment 12 zxq5 2024-11-08 19:26:44 UTC
(In reply to TraceyC from comment #11)
> I was unable to reproduce this with Plasma 6.2 or with git-master
> I added the Media Player widget to a panel on each, and had it running all
> day. I was monitoring top. No CPU hogging, no memory hogging, no panel
> freezes
> 
> In the past, I *have* seen the Plasma panel freeze when playing Spotify as a
> snap
> Today I had Spotify playing from the flatpak install (which also installs a
> snap, don't ask me), and no problems with it

I'm using youtube music (youtube-music-desktop on the AUR)  maybe that's the issue? although I can't be sure if I've always had that open when the issue has occurred
Comment 13 TraceyC 2024-11-12 18:22:33 UTC
What would be useful to us at this point is to do some debugging and possibly get details on when Plasmashell freezes
Take a look at https://community.kde.org/Plasma/Debugging, and see if that gets you any useful logs or backtrace. Thanks!
Comment 14 Bug Janitor Service 2024-11-27 03:46:27 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 15 John Kizer 2024-12-11 17:51:11 UTC
Created attachment 176528 [details]
Results from gdb running on plasmashell during a session when Media Player freezes

Hi - sorry, I don't know if this is the right kind of logging, but this is what I got from trying the process at https://community.kde.org/Plasma/Debugging#Attach_gdb_to_the_plasmashell_process - it's not a crash, so if there's a more appropriate kind of log to look for, I'm happy to find it.
Comment 16 John Kizer 2024-12-11 17:51:46 UTC
Created attachment 176529 [details]
System journal entries with the identifier plasmashell
Comment 17 John Kizer 2024-12-11 18:01:23 UTC
Reproduced on my system - I was able to reproduce this months ago and just wasn't able to file a bug at the time (sorry), so I don't think it's brand-new necessarily. Additional notes:

*Moving the cursor over the panel results in the old X cursor appearing
*The memory leak is extremely slow for me - it's been 15 minutes, and plasmashell is "only" at 1.0GB of RAM usage, and my system still has 26GB free, so I don't believe there's a system-level out-of-memory state happening
*For me, the freeze happens along with a song change in Elisa - when one song changes to the next, and the displayed content of the Media Player widget would then theoretically update, it doesn't update and instead plasmashell enters this state
*It's not on every song change, but seems to usually happen after about 15-20 songs have played
*There is constant CPU activity from plasmashell once it's visually frozen, on my system happens to be about 7.5% of CPU capacity
*This does not happen if the Media Player Plasmoid is opened from the System Tray, then pinned, but it can happen if the Media Player widget is added to a panel and pop-out from the widget (showing the album art/playback controls) is open (that's not required though, it can also happen if the pop-out is not open and it's just in its "resting" state on the panel)

Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.11-300.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 30.4 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4070 SUPER/PCIe/SSE2

Thanks!
Comment 18 Fushan Wen 2024-12-27 14:51:03 UTC
*** This bug has been marked as a duplicate of bug 491946 ***
Comment 19 John Kizer 2024-12-27 15:03:03 UTC
(In reply to Fushan Wen from comment #18)
> 
> *** This bug has been marked as a duplicate of bug 491946 ***

Hi - could you please give some guidance here on where/how this issue, as described above, should be reported? The bug this was marked as a duplicate of is indicated as fixed in 6.2.0 - since the symptoms remain, should 491946 be reopened?