Bug 398117 - plasmashell huge memory usage with flooding notifications
Summary: plasmashell huge memory usage with flooding notifications
Status: RESOLVED DUPLICATE of bug 423594
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: 5.13.5
Platform: Debian testing Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-01 01:34 UTC by GSC
Modified: 2020-09-09 03:40 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
huge memory (28.78 KB, image/png)
2018-09-01 01:34 UTC, GSC
Details

Note You need to log in before you can comment on or make changes to this bug.
Description GSC 2018-09-01 01:34:02 UTC
Created attachment 114725 [details]
huge memory

I have a program that sends error notifications to system. Sometimes when I' m not around for some time and it sends thousands of notifications to system, the plasmashell process could eat a lot of memory, like the attached picture  shows, making the system unresponsive.
Comment 1 Nate Graham 2018-09-04 16:53:28 UTC
What program is spamming you with notifications?
Comment 2 GSC 2018-09-05 01:40:51 UTC
My own program written by electron using the https://electronjs.org/docs/tutorial/notifications notifications API to send alerts.
Comment 3 Nate Graham 2018-09-05 02:56:20 UTC
So you could just have your app not send thousands of pointless notifications, then?

Not saying there isn't a bug in plasmashell here, of course, but there's no particular reason to stress the system for no reason. :)
Comment 4 Kai Uwe Broulik 2018-09-05 07:08:29 UTC
Does disabling notification history help?
Comment 5 David Edmundson 2018-09-05 08:01:49 UTC
What type of notification?

Can you capture one in dbus-monitor or post your electron line.
Comment 6 GSC 2018-09-08 03:42:29 UTC
It' s just that simple text only electron notification sent like:

let myNotification = new Notification('Title', {
    body: 'Lorem Ipsum Dolor Sit Amet'
  })
  
  myNotification.onclick = () => {
    console.log('Notification clicked')
  }

A single program would send a error notification every 3 seconds. But I have a bunch of them monitoring many programs on servers. In rare cases I left the computer for a long time and things went wrong I would see this. I would try disabling notification history, I feel it would help. The ability to set a history size would be better.
Comment 7 Stefano Forli 2018-11-15 18:20:07 UTC
The problem is present in Debian Buster with plasma-workspace 4:5.13.5-1+b1.
I've tried looking for the source of the problem by closing pretty much every program, and let Plasma up, and I found the source of the problem is a flood of notifications from BackInTime (1.1.24-0.1) due to wrong permissions in one directory with many files, the backup process returned lots of errors.

After that, plasma reached +13Gb of RAM:

 $ ps -e -orss=,args= | sort -b -k1,1n | /usr/bin/pr -TW$COLUMNS| tail -65
 ...
 10164 -bash
 10988 /usr/bin/atop -R -w /var/log/atop/atop_20181115 600
 12228 /usr/bin/python3 /usr/share/backintime/qt4/qt4systrayicon.py 3
 22556 /usr/bin/konsole
 38308 /usr/bin/krunner
 48832 /usr/bin/kwin_x11 -session 10c2746172000153445615100000024110004_1541
 100952 /usr/lib/xorg/Xorg -nolisten tcp -auth /var/run/sddm/{09ce96a3-8d39-
 13527632 /usr/bin/plasmashell
 
I've tried restarting the plasmashell and SDDM, but right after logging in, notifications not yet read pop up again, bringing the machine to its knees again.

I'll be happy to provide more details if it can help.
Comment 8 Nate Graham 2020-09-09 03:40:38 UTC

*** This bug has been marked as a duplicate of bug 423594 ***