Announcement

Collapse
No announcement yet.

Plasmashell memory leak

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Plasmashell memory leak

    Mine is bigger than yours!

    I've got a memory leak in plasmashell, it has at this moment more than 1 GB:



    Code:
    pemartins@pemartins-X55U: ~ $ ps aux | grep plasmashell
    pemarti+ 18186  3.7 33.0 6041604 1195304 ? Sl   05:22   9:54 /usr/bin/plasmashell
    pemarti+ 31834  0.0  0.0  14432   964 pts/1    S+   09:46   0:00 grep --color=auto plasmashell
    pemartins@pemartins-X55U: ~ $ apt policy plasma-desktop
    plasma-desktop:
    Installed: 4:5.12.5-0ubuntu0.1
    Candidate: 4:5.12.5-0ubuntu0.1
    Version table:
    *** 4:5.12.5-0ubuntu0.1 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     4:5.12.4-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
    pemartins@pemartins-X55U: ~ $ uptime
    09:46:46 up 12:07,  3 users,  load average: 1,52, 1,97, 1,99
    pemartins@pemartins-X55U: ~ $ uname -a
    Linux pemartins-X55U 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
    pemartins@pemartins-X55U: ~ $ free
              total        used        free      shared  buff/cache   available
    Mem:        3613648     2358588      391360       23656      863700     1170584
    Swap:       3761148       26124     3735024
    How can I identify the root of the leak?
    Last edited by pemartins; Jun 13, 2018, 03:05 AM.

    #2
    Can you disable redshift-gtk and see if that helps?

    You could also look at what's causing your CPU usage to be 57%.

    Including the output of
    Code:
    inxi -Fxz
    may be informative as well. If you don't have inxi installed, get it with sudo apt install inxi.

    See https://www.kubuntuforums.net/showth...ll-Memory-leak for widgets that could be misbehaving.
    Last edited by chimak111; Jun 13, 2018, 05:21 AM.
    Kubuntu 20.04

    Comment


      #3
      Are you using "Slideshow" as your screensaver?
      If you think Education is expensive, try ignorance.

      The difference between genius and stupidity is genius has limits.

      Comment


        #4
        Originally posted by chimak111 View Post
        You could also look at what's causing your CPU usage to be 57%.
        Oh that was the infamous update-apt-xapi.
        Code:
        $ inxi -Fxz
        System:    Host: pemartins-X55U Kernel: 4.15.0-23-generic x86_64 bits: 64 gcc: 7.3.0
                  Desktop: KDE Plasma 5.12.5 (Qt 5.9.5) Distro: Custom Live CD
        Machine:   Device: laptop System: ASUSTeK product: X55U v: 1.0 serial: N/A
                  Mobo: ASUSTeK model: X55U v: 1.0 serial: N/A
                  UEFI: American Megatrends v: X55U.423 date: 08/06/2013
        CPU:       Dual core AMD E2-1800 APU with Radeon HD Graphics (-MCP-)
                  arch: Bobcat rev.0 cache: 512 KB
                  flags: (lm nx sse sse2 sse3 sse4a ssse3 svm) bmips: 6787
                  clock speeds: max: 1700 MHz 1: 1002 MHz 2: 851 MHz
        Graphics:  Card: Advanced Micro Devices [AMD/ATI] Wrestler [Radeon HD 7340]
                  bus-ID: 00:01.0
                  Display Server: x11 (X.Org 1.19.6 ) driver: radeon
                  Resolution: 1366x768@60.01hz
                  OpenGL: renderer: AMD PALM (DRM 2.50.0 / 4.15.0-23-generic, LLVM 6.0.0)
                  version: 3.3 Mesa 18.0.4 Direct Render: Yes
        Audio:     Card-1 Advanced Micro Devices [AMD] FCH Azalia Controller
                  driver: snd_hda_intel bus-ID: 00:14.2
                  Card-2 Advanced Micro Devices [AMD/ATI] Wrestler HDMI Audio
                  driver: snd_hda_intel bus-ID: 00:01.1
                  Sound: Advanced Linux Sound Architecture v: k4.15.0-23-generic
        Network:   Card-1: Ralink RT5390 Wireless 802.11n 1T/1R PCIe
                  driver: rt2800pci v: 2.3.0 bus-ID: 01:00.0
                  IF: wlp1s0 state: up mac: <filter>
                  Card-2: Qualcomm Atheros AR8161 Gigabit Ethernet
                  driver: alx port: e000 bus-ID: 02:00.0
                  IF: enp2s0 state: down mac: <filter>
        Drives:    HDD Total Size: 500.1GB (6.5% used)
                  ID-1: /dev/sda model: ST500LM012_HN size: 500.1GB
        Partition: ID-1: / size: 56G used: 27G (52%) fs: ext4 dev: /dev/sda10
                  ID-2: swap-1 size: 3.85GB used: 0.00GB (0%) fs: swap dev: /dev/sda6
        RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
        Sensors:   System Temperatures: cpu: 59.0C mobo: N/A gpu: 59.0
                  Fan Speeds (in rpm): cpu: 2800
        Info:      Processes: 160 Uptime: 12 min Memory: 1154.7/3529.0MB
                  Init: systemd runlevel: 5 Gcc sys: 7.3.0
                  Client: Shell (bash 4.4.191) inxi: 2.3.56
        I exited Redshift.

        ---

        Originally posted by SpecialEd View Post
        Are you using "Slideshow" as your screensaver?
        Yes I am. When I browsed the issue I read that indeed that could be the cause of the memory leak but I do not think that it is in my particular situation. I have slideshow as screensaver set for about a week now and I never had any significant memory leak issues.

        It's usual that plasmashell keeps increasing size during a session but nothing significant, I do not recall seeing it above 300 MB (usually my system starts with it around 180 MB).
        Yesterday I remember doing stuff like adding themes and widgets to Plasma, changing themes (but I kept no new widgets besides the ones I already was using), testing different panel layouts, using Wine programs to look for duplicate files, I remember also using Firefox for normal browsing and watching a video stream, also used Kodi for a bit. Maybe I did some more stuff but this is what I can remember.

        Recalling my actions and the abnormal plasmashell size I'm tempted to jump to the conclusion that the cause could be the customization I was fooling around with, all the other actions I have done before without similar plasmashell behave.

        Comment


          #5
          Originally posted by pemartins View Post
          <<<<<<

          Yes I am. When I browsed the issue I read that indeed that could be the cause of the memory leak but I do not think that it is in my particular situation. I have slideshow as screensaver set for about a week now and I never had any significant memory leak issues.<<<<<
          I'm not saying Slideshow is your problem but seemingly unrelated updates can affect the way Slideshow and programs like Discover, etc., behave. Ask me how I know.
          If you think Education is expensive, try ignorance.

          The difference between genius and stupidity is genius has limits.

          Comment


            #6
            I just remembered that yesterday I also did a lot of moving and deleting files on Dolphin. Usually when I do that and when a lot of files (and big amount of data) are moved or deleted, I notice that the panel hangs for a bit (noticed once that the clock was delayed a couple of minutes) after the action is done; then I get the activity notification of files being moved, but actually the job is already done and nothing is being moved and I have to close (press stop on the icon in the notifications) the notification because it only shows a transfer but no file names are displayed.

            Today I've been using the pc normally and plasmashell remains as usual without signs of any memory leak. So I'll mark this one as solved since the abnormal activity seems to be what caused the memory leak and it's hard to reproduce the steps in order to try to replicate it.

            Comment


              #7
              Was it "abnormal" activity, or normal indexing?
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #8
                I really can't tell. I have file search disabled, also unchecked search folder updater from autostart, both are off since I installed Kubuntu. But I do not know if there are other indexing services running like updatedb or something similar, nor do I know if they are stored at plasmashell.

                Comment


                  #9
                  You can use ksysguard (K System Monitor) and sort by %CPU usage or total memory, or run top in a Konsole, to see which process is using the most memory or CPU. If you set ksysguard to the tree display mode then you can follow a process down the tree to locate the guilty party (if it is in a treed process).
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment


                    #10
                    The math is not right in my ram usage, if I do a total on all processes shown it should perhaps return a sum of about 600 MB or so; but as it shows in the printscreen, how can it be taking 1.6 GB of ram? What is using the extra 1 GB of ram not shown anywhere?



                    It just does not add up...

                    edit:
                    Code:
                    $ ps -u $USER -wo rss=,comm= --sort -rss | while read -r rss comm ; do echo $((rss/1024))"MB -" $comm; done && free -m
                    265MB - plasmashell
                    80MB - kded5
                    73MB - konsole
                    56MB - kwin_x11
                    27MB - krunner
                    27MB - ksmserver
                    24MB - http.so
                    24MB - http.so
                    22MB - firetools
                    15MB - kactivitymanage
                    15MB - klauncher
                    11MB - kdeconnectd
                    10MB - org_kde_powerde
                    10MB - python
                    10MB - polkit-kde-auth
                    10MB - kglobalaccel5
                    9MB - kwalletd5
                    9MB - kaccess
                    9MB - kuiserver5
                    9MB - pulseaudio
                    6MB - kdeinit5
                    5MB - xembedsniproxy
                    5MB - kscreen_backend
                    4MB - bash
                    3MB - xbindkeys
                    3MB - kio_http_cache_
                    3MB - ps
                    2MB - dbus-daemon
                    2MB - at-spi2-registr
                    2MB - gvfsd
                    2MB - redshift
                    2MB - systemd
                    2MB - at-spi-bus-laun
                    2MB - (sd-pam)
                    2MB - gconfd-2
                    1MB - dconf-service
                    1MB - bash
                    1MB - dbus-daemon
                    1MB - ksysguardd
                    0MB - gconf-helper
                    0MB - startkde
                    0MB - kwrapper5
                    0MB - ssh-agent
                    0MB - start_kdeinit
                                 total        used        free      shared  buff/cache   available
                    Mem:           3528        1649        1296           3         583        1654
                    Swap:          3672           2        3670
                    Last edited by pemartins; Jun 14, 2018, 08:48 PM.

                    Comment


                      #11
                      Code:
                      $ ps -u $USER -wo rss=,comm= --sort -rss | while read -r rss comm ; do echo $((rss/1024))"MB -" $comm; done && free -m
                      Could you please explain ^^^

                      I've usually just looked at free -m. Understanding RAM usage in Linux can get pretty difficult for us non-technical users: https://www.linuxatemyram.com/
                      Kubuntu 20.04

                      Comment


                        #12
                        @chimak111 thank you so much for the info, I really hope that link about the disk cache on ram is the explanation. Stuff like a 1 GB virus running on the background crossed my mind...

                        I'd love to be able to explain that command but unfortunately is most probable that we see Trump and Hillary dancing salsa together before I can understand what's on it It's a copy and paste from somewhere made some time ago, all I recall is that the command intents to display the ram use per application in the user session.

                        Comment


                          #13
                          Originally posted by chimak111 View Post
                          Code:
                          $ ps -u $USER -wo rss=,comm= --sort -rss | while read -r rss comm ; do echo $((rss/1024))"MB -" $comm; done && free -m
                          Could you please explain ^^^

                          I've usually just looked at free -m. Understanding RAM usage in Linux can get pretty difficult for us non-technical users: https://www.linuxatemyram.com/
                          It's output is a listing of the total RAM used for each running process, and totals for each of the parts RAM is divided into. For a complete listing of possible command sequences see "man ps". It is a lot easier to get totals this way rather than using a calculator on ksysguard's output and trying to total them manually.
                          Code:
                          :~$ ps -u $USER -wo rss=,comm= --sort -rss | while read -r rss comm ; do echo $((rss/1024))"MB -" $comm; done && free -m
                          319MB - plasmashell
                          301MB - firefox
                          199MB - Web Content
                          103MB - kwin_x11
                          84MB - Web Content
                          78MB - krunner
                          63MB - kgpg
                          62MB - konsole
                          61MB - hp-systray
                          60MB - blueman-applet
                          58MB - evolution-calen
                          55MB - kded5
                          52MB - evolution-alarm
                          52MB - klauncher
                          51MB - ksmserver
                          50MB - kdeconnectd
                          48MB - evolution-calen
                          48MB - evolution-calen
                          46MB - polkit-kde-auth
                          45MB - kwalletd5
                          44MB - kaccess
                          43MB - org_kde_powerde
                          42MB - kglobalaccel5
                          32MB - kactivitymanage
                          27MB - kuiserver
                          27MB - gmenudbusmenupr
                          27MB - xembedsniproxy
                          25MB - distro-release-
                          24MB - kscreen_backend
                          24MB - hp-systray
                          24MB - kio_http_cache_
                          23MB - evolution-sourc
                          22MB - kdeinit5
                          18MB - evolution-addre
                          18MB - evolution-addre
                          16MB - hp-systray
                          11MB - pulseaudio
                          9MB - obexd
                          7MB - gnome-keyring-d
                          6MB - kwrapper5
                          6MB - gnome-keyring-d
                          6MB - at-spi2-registr
                          6MB - gvfsd
                          5MB - gconfd-2
                          5MB - bash
                          5MB - at-spi-bus-laun
                          5MB - bash
                          4MB - systemd
                          4MB - dconf-service
                          4MB - dbus-daemon
                          4MB - gconf-helper
                          3MB - dbus-daemon
                          3MB - ps
                          2MB - dbus-launch
                          2MB - (sd-pam)
                          1MB - ksysguardd
                          1MB - bash
                          1MB - startkde
                          0MB - gpg-agent
                          0MB - ssh-agent
                          0MB - start_kdeinit
                                        total        used        free      shared  buff/cache   available
                          Mem:           5801        1094        2440          56        2266        4290
                          Swap:             0           0           0
                          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                          – John F. Kennedy, February 26, 1962.

                          Comment


                            #14
                            mine is even bigger...

                            ptime;ps -u $USER -wo rss=,comm= --sort -rss | while read -r rss comm ; do echo $((rss/1024))"MB -" $comm; done && free -m
                            20:06:35 up 7:30, 3 users, load average: 1,02, 0,91, 0,90
                            3112MB - plasmashell
                            713MB - akonadi_ews_res
                            629MB - chrome
                            532MB - TeamViewer
                            408MB - chrome
                            402MB - mysqld
                            383MB - kmail
                            368MB - chrome
                            364MB - chrome

                            Comment


                              #15
                              I have only 6GB of RAM. Do you have more?
                              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                              – John F. Kennedy, February 26, 1962.

                              Comment

                              Working...
                              X