Bug 436119 - Possible memory leak
Summary: Possible memory leak
Status: REOPENED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (show other bugs)
Version: 5.21.4
Platform: Arch Linux Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-24 11:09 UTC by hancerli
Modified: 2021-10-21 18:20 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hancerli 2021-04-24 11:09:43 UTC
SUMMARY
Hi there

I've been observing strange plasmashell behavior since it's installed. After using it a couple of days (a couple of sleep-wakeup cycles) plasmashell starts consuming a humongous amount of memory even though there are no memory-intensive applications running in the background.

To lower the usage down, I have to either restart the plasmashell (kquitapp5/kstart5) or reboot the device, otherwise, my total memory usage goes up to %80-90, and swap is being used. Total usage reached around %88-%90 today and lowered to %60 after restarting the plasmashell.

Is there any way to trace what consumes that much memory?

STEPS TO REPRODUCE
1. Start the KDE as usual
2. Use suspend instead of turning-off for a couple of days

OBSERVED RESULT
Memory usage of the plasmashell keeps increasing

EXPECTED RESULT
Memory usage of the plasmashell should stay same

SOFTWARE/OS VERSIONS
Windows: No
macOS: No
Linux/KDE Plasma: Yes 
(available in About System)
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 David Edmundson 2021-04-24 21:47:57 UTC
>Is there any way to trace what consumes that much memory?

There is a tool called Heaptrack

That or just turning off applets individually till you nail it down.

I'm afraid there's not much we can do without some narrowing it down
Comment 2 Bug Janitor Service 2021-05-09 04:33:34 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 hancerli 2021-05-16 11:42:29 UTC
(In reply to David Edmundson from comment #1)
> >Is there any way to trace what consumes that much memory?
> 
> There is a tool called Heaptrack
> 
> That or just turning off applets individually till you nail it down.
> 
> I'm afraid there's not much we can do without some narrowing it down

Hi there,

Seems I skipped your response, somehow, sorry.

I just run the plasmashell with heaptrack and waiting for the memory usage to rise up again, then I'll share the report. Should I switch the status back to REPORTED?

Btw, thanks for the tip.
Comment 4 hancerli 2021-05-17 08:43:50 UTC
Here's the heaptrack analysis file. 
https://drive.google.com/file/d/1Ejj5GPR3iok-fsHCfKS_ncyu5GWreNXg/view?usp=sharing

Can't add ass attachment since it's 170mb. 

I'm fairly new to heaptrack and it'll take some time for me to start understanding the content. So I decided to upload it asap if you'd like to analyze it.
Comment 5 Quartz 2021-10-21 18:20:25 UTC
Bump x6. 

I'd appreciate if this bug takes priority - it might be causing other accidental threads being created in relation to memory leaks and mistaking side effects in other places (such as I did with plasma widgets).

It makes it impossible to keep a desktop linux distro running KDE for several days and it's making the desktop environment give a really poor impression and experience.