Bug 239007

Summary: Recent notifications memory leak
Product: [Plasma] plasma4 Reporter: KOPRajs <zdenek.koprivik>
Component: notificationsAssignee: Rob Scheepmaker <rob>
Status: RESOLVED FIXED    
Severity: normal CC: plasma-bugs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description KOPRajs 2010-05-27 14:09:48 UTC
Version:           unspecified (using KDE 4.4.2) 
OS:                Linux

When removing (closing) a notification from the "Recent notifications" list a small amount of memory and a file descriptor is leaked.
These two bugs are related to this and explains what is the cause and that the Notification applet not the plasma itself should be responsible for this:
https://bugs.kde.org/show_bug.cgi?id=234781
https://bugs.kde.org/show_bug.cgi?id=232973

Reproducible: Always

Steps to Reproduce:
In my case Kopete creates many "new message" or "user online" notifications. They are stored in the Recent notifications list (buffer) for some time but then they are deleted when new notification arrives or you can remove (close) them manually one by one.
For every removed notification you can see one new file like this in the #lsof -p <plasma-desktop pid>:
plasma-de 3504 koprajs  197u   REG                8,1         0    6450 /tmp/kde-koprajs/plasma-desktopRk3504.tmppx3504.new (deleted)

This indicates that plasma has a new temporary file opened which never get closed.

Actual Results:  
For me plasma-desktop get 1024 files opened this way in one day and then bug #232973 appears because it is unable to open any more files and therefore unable to lock the icon cache.

Expected Results:  
Properly deallocate Qfile object and close the temporary file before deleting it.
Comment 1 Marco Martin 2010-05-27 18:20:05 UTC
SVN commit 1131212 by mart:

limit notification number to 15
still have to investigate where the open files come from
CCBUG:239007


 M  +5 -0      notificationsmanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1131212
Comment 2 Aaron J. Seigo 2010-06-01 23:09:41 UTC
SVN commit 1133514 by aseigo:

clean up afte the services
BUG:239007


 M  +9 -8      jobs/dbusjobprotocol.cpp  
 M  +10 -5     notifications/dbusnotificationprotocol.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1133514