https://bugs.kde.org/show_bug.cgi?id=508412

            Bug ID: 508412
           Summary: Memory Leak in plasmashell - with heaptrack data.
    Classification: Plasma
           Product: plasmashell
      Version First 6.3.6
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: 1.0

SUMMARY
There are numerous reports of memory leaks in plasmashell, but few have enough
details to actually enable efficient troubleshooting.  I hope to provide all of
the info for us to be able to get to the bottom of this.

I'm running debian trixie.  The exact package versions I'm using can be found
in the DATA section, below.

STEPS TO REPRODUCE
1. run `htop`.  Observe that plasmashell is using less than 700MB of RES Ram.
2.  Run kde for 6 hours
3.  Observe that for most of this, plasmashell is using 100% CPU.
2. Observe that plasmashell is using more than 2G of RES Ram.  If left alone,
it will keep eating ram until the system runs out.

EXPECTED RESULT
No memory leak.  Stable performance

POSSIBLE CONFOUNDING FACTOR
This may or may not be related to an error I got when trying to add a shortcut
to the shortcuts settings.  When I tried to add the shortcut I got a "Error
while communicating with the global shortcuts service" with these lines in my
system log:

2025-08-18T11:07:07.722037+08:00 localhost org.kde.ActivityManager[311980]:
org.kde.kactivities.resources: "INSERT INTO ResourceEvent        (usedActivity,
 initiatingAgent,  targettedResource,  start,  end) VALUES (:usedActivity,
:initiatingAgent, :targettedResource, :start, :end)"
2025-08-18T11:07:07.722383+08:00 localhost org.kde.ActivityManager[311980]:
org.kde.kactivities.resources: QSqlError("5", "Unable to fetch row", "database
is locked")
2025-08-18T11:07:09.771753+08:00 localhost org.kde.ActivityManager[311980]:
org.kde.kactivities.resources: "UPDATE ResourceScoreCache SET cachedScore =
:cachedScore, lastUpdate  = :lastUpdate WHERE :usedActivity      = usedActivity
AND :initiatingAgent   = initiatingAgent AND :targettedResource =
targettedResource "
2025-08-18T11:07:09.771850+08:00 localhost org.kde.ActivityManager[311980]:
org.kde.kactivities.resources: QSqlError("5", "Unable to fetch row", "database
is locked")
2025-08-18T11:07:10.330716+08:00 localhost systemsettings[357445]:
org.kde.kcm_keys: "Error while calling objectPath of added
applicationnet.local.screenDim.desktop"
2025-08-18T11:07:10.330952+08:00 localhost systemsettings[357445]:
org.kde.kcm_keys: "org.kde.kglobalaccel.NoSuchComponent" "The component
'net.local.screenDim.desktop' doesn't exist."

After that, kglobalacceld slowly started increasing it's RES memory size as
well, up to nearly 1GB.  It'll do more if I leave it longer.  I'm not sure if
these are two separate issues or if the problem is related to the interaction
between the two components.  

DATA:
I'm attaching the packages I have installed and the heaptrack dumps and
heaptrack_print analysis for both plasmashell and kglobalacceld here with the
hope they will be useful in tracking down the issue(s): 
https://drive.google.com/drive/u/0/folders/1dMye3iIzLqhckoXydLYyQ4-cSzbbLeAL

REQUEST:
I'd specifically like to avoid the typical "try this and see if it works" back
and forth.  That ends up being very time consuming for both of us in the end,
and since a single experiment is 6-12h long, exasperating.  Maybe that's why
this specific bug hasn't been fixed yet.  I think a better approach is to focus
on how I can either run a single command on my machine that gives you all of
the information you need to find the exact line of code that is at fault or how
I can get you a suitable replication of my setup so you can reproduce the issue
yourself and troubleshoot without me in the loop.  If this heaptrack isn't
precisely what you need, then what commands would you like me to run that would
give you 99% certainty that you will have what you need to pinpoint the issue
in one go?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to