Ubuntu

notification-daemon using 237MB of memory

Reported by Justin Mason on 2006-10-20
18
Affects Status Importance Assigned to Milestone
notification-daemon (Ubuntu)
Medium
Unassigned
Hardy
Medium
Unassigned

Bug Description

: jm 325...; ps auxww | grep 6276
jm 6276 0.0 1.0 237004 10976 ? S Oct14 0:47 /usr/lib/notification-daemon/notification-daemon

yep, 237004 KB. looks like a leak.
The process is still running; let me know if you want maps files, etc.

TEST CASE:
1. Run in a terminal in hardy:
  $ notify-send lala ; pmap $(pidof notification-daemon) | grep total
  $ for i in $(seq 200); do notify-send lala; done
[wait a couple of seconds]
  $ pmap $(pidof notification-daemon) | grep total
2. verify that the second total is much higher than the first

3. Instal upgraded notification-daemon
4. run "killall notification-daemon"
5. repeat the steps in 1
6. verify that the number is much smaller

Sebastien Bacher (seb128) wrote :

Thanks for your bug. What version of Ubuntu and notification-daemon theme do you use? The way to figure what the issue is would probably to run it with valgrind

Justin Mason (jm-ubuntu) wrote :

I'm on Dapper; so it's 0.3.4-0ubuntu8. I presume you mean what GNOME theme? it's one of the H2O themes: H2O-gtk2-Amber.

I could restart it with valgrind -- unfortunately it'd be assuming that this will happen again, and I can't guarantee that :(

Daniel Holbach (dholbach) wrote :

Do you get the same problem with another theme too?

Changed in notification-daemon:
status: Unconfirmed → Needs Info
Daniel Holbach (dholbach) wrote :

As described in the previous comments, your report lacks the information we need to investigate the problem further. We'll close this report for now - please reopen it if you can give us the missing information.

Changed in notification-daemon:
status: Needs Info → Rejected
Justin Mason (jm-ubuntu) wrote :

fwiw, I switched to the Human theme a few months back, and this problem hasn't reappeared. I suspect it was something to do with the H2O-gtk2-Amber theme.

Andrew Conkling (andrewski) wrote :

I just noticed this problem for the first time, n-d was using 70 MB. I'm using the Darkilouche theme. Has anyone determined this to be theme-specific? What kind of information--valgrind, gdb, etc.--would be useful to capture?

Changed in notification-daemon:
status: Rejected → Unconfirmed
Sebastien Bacher (seb128) wrote :

Getting a valgrind log would be useful to spot an incorrect usage

Changed in notification-daemon:
importance: Undecided → Medium
status: Unconfirmed → Needs Info

On 5/13/07, Sebastien Bacher <email address hidden> wrote:
>
> Getting a valgrind log would be useful to spot an incorrect usage

Would this still be useful if the memory usage isn't ridiculously extreme?
Currently n-d is using 22 MB, which still seems extreme than the 1 or 2 MB
it uses when I first start it or on my friends' systems.

In the meantime, it might be worth mentioning some specifics on my system:
thinking of things that use libnotify, I'm running Pidgin with the libnotify
plugin, Rhythmbox with song change notifications on, and the ZeroConf
Service Discovery applet. I'm using Darkilouche 0.2.2 as my GTK+ theme.

Sebastien Bacher (seb128) wrote :

the log might be useful, not easy to say without having it available though

Ruben Vermeersch (ruben) wrote :

I'm seeing the issue too, attaching two valgrind logs, each showing one notification from banshee. I'm using the default libnotify style.

Ruben Vermeersch (ruben) wrote :
Changed in notification-daemon:
status: Needs Info → Unconfirmed
Andrew Conkling (andrewski) wrote :

On 5/13/07, Andrew Conkling <email address hidden> wrote:
>
> In the meantime, it might be worth mentioning some specifics on my system:
> thinking of things that use libnotify, I'm running Pidgin with the libnotify
> plugin, Rhythmbox with song change notifications on, and the ZeroConf
> Service Discovery applet. I'm using Darkilouche 0.2.2 as my GTK+ theme.
>

OK, here's my log, running for a day or two, with the details above.

Andrew Conkling (andrewski) wrote :

Attachments apparently don't come by email. Here's the log for real.

Brian Fallik (bfallik) wrote :

I've experienced exactly the same problem. I'd noticed that my computer was running very sluggishly and it felt like a memory issue. CPU usage was normal, yet all of X seemed painfully slow.

After inspecting g-s-m I saw notification-applet was using ~60Megs, which seemed a bit extreme. Further, using this python script to create notifications:
  http://trac.galago-project.org/wiki/PythonNotificationsExample
I was able to arbitrarily increase n-a's memory usage.

After killing n-a, my computer instantly became more responsive and when dbus restarted the daemon, it's memory usage was around 8M.

Is there anything else I can provide to help with this bug?

shacharr (shacharr) wrote :

http://trac.galago-project.org/changeset/2971

Maybe this changeset will help?

The relevant bug report ( http://trac.galago-project.org/ticket/105 ) talks about a memory leak fixed.

Brian Fallik (bfallik) wrote :

Could be. That's in 0.3.7 (gutsy); eft is at 0.3.6.

On 9/12/07, shacharr <email address hidden> wrote:
> http://trac.galago-project.org/changeset/2971
>
> Maybe this changeset will help?
>
> The relevant bug report ( http://trac.galago-project.org/ticket/105 )
> talks about a memory leak fixed.
>
> --
> notification-daemon using 237MB of memory
> https://bugs.launchpad.net/bugs/67129
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Brian Fallik (bfallik) wrote :

Is there an easy way to test 0.3.7 on Feisty? Download n-d and build
the source? Backport Gutsy's? Etc?

I can also just wait for Gutsy.

On 9/13/07, Brian Fallik <email address hidden> wrote:
> Could be. That's in 0.3.7 (gutsy); eft is at 0.3.6.
>
> On 9/12/07, shacharr <email address hidden> wrote:
> > http://trac.galago-project.org/changeset/2971
> >
> > Maybe this changeset will help?
> >
> > The relevant bug report ( http://trac.galago-project.org/ticket/105 )
> > talks about a memory leak fixed.
> >
> > --
> > notification-daemon using 237MB of memory
> > https://bugs.launchpad.net/bugs/67129
> > You received this bug notification because you are a direct subscriber
> > of the bug.
> >
>

Brian Fallik (bfallik) wrote :

Having upgraded to Gutsy I can verify this bug is still preset. Any
ideas? I'd be willing to look into this further but would probably
need some guidance.

On 9/18/07, Brian Fallik <email address hidden> wrote:
> Is there an easy way to test 0.3.7 on Feisty? Download n-d and build
> the source? Backport Gutsy's? Etc?
>
> I can also just wait for Gutsy.
>
> On 9/13/07, Brian Fallik <email address hidden> wrote:
> > Could be. That's in 0.3.7 (gutsy); eft is at 0.3.6.
> >
> > On 9/12/07, shacharr <email address hidden> wrote:
> > > http://trac.galago-project.org/changeset/2971
> > >
> > > Maybe this changeset will help?
> > >
> > > The relevant bug report ( http://trac.galago-project.org/ticket/105 )
> > > talks about a memory leak fixed.
> > >
> > > --
> > > notification-daemon using 237MB of memory
> > > https://bugs.launchpad.net/bugs/67129
> > > You received this bug notification because you are a direct subscriber
> > > of the bug.
> > >
> >
>

Matti Lindell (mlind) wrote :

Seeing this also in Hardy, notification-daemon 0.3.7-1ubuntu11.

Sebastien Bacher (seb128) wrote :

the valgrind log lists some leaks but since the corresponding debug packages are not install it lacks the detailed required to work on the issue

Brian Fallik (bfallik) wrote :

I was recently able to reproduce the symptom from the comment I posted
on 2007-07-27 using n-d trunk, so I don't believe it's fixed
upstream. Using valgrind I tried to identify the leak but was unable.

Anything I can do to help further?

On Tue, Apr 15, 2008 at 9:27 AM, Sebastien Bacher <email address hidden> wrote:
> the valgrind log lists some leaks but since the corresponding debug
> packages are not install it lacks the detailed required to work on the
> issue
>
>
>
> --
> notification-daemon using 237MB of memory
> https://bugs.launchpad.net/bugs/67129
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Matti Lindell (mlind) wrote :

valgrind log when liferea and rhythmbox both are shooting new notification bubbles for about 10minutes. I installed most of the -dbgsym packages required for more detailed log.

Sebastien Bacher (seb128) wrote :

The new log is better, the --num-callers= used seems limited though, using a higher value would be nice, the ubuntulooks debug symbols seems to not be installed either, could you get a new log after changing those?

I have the same problem running under Xubuntu (ie. xfce4). I'll show you tomorrow Sebastien.

Changed in notification-daemon:
milestone: none → ubuntu-8.04.1
status: New → In Progress

 notification-daemon (0.3.7-1ubuntu12) intrepid; urgency=low
 .
   * debian/patches/01_ubuntu_theme.patch:
     - Fixed memory leak reported in lp: #67129
     - Testing has shown significant improvement but there are
        inconclusive indicators that another much smaller leak may exist.
   * debian/copyright: Updated to make lintian happy.

Changed in notification-daemon:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package notification-daemon - 0.3.7-1ubuntu12

---------------
notification-daemon (0.3.7-1ubuntu12) intrepid; urgency=low

  * debian/patches/01_ubuntu_theme.patch:
    - Fixed memory leak reported in lp: #67129
    - Testing has shown significant improvement but there are
       inconclusive indicators that another much smaller leak may exist.
  * debian/copyright: Updated to make lintian happy.

 -- <email address hidden> (Cody A.W. Somerville) Fri, 23 May 2008 14:43:59 +0200

Changed in notification-daemon:
status: Fix Committed → Fix Released
Changed in notification-daemon:
importance: Undecided → Medium
status: New → Confirmed
Michael Vogt (mvo) on 2008-05-23
description: updated
Michael Vogt (mvo) on 2008-05-23
description: updated
Michael Vogt (mvo) wrote :

I did another hardy-proposed upload that fixes another leak, the numbers should be even better now.

Steve Langasek (vorlon) wrote :

Accepted into -proposed, please test and give feedback here

Changed in notification-daemon:
status: Confirmed → Fix Committed
Brian Fallik (bfallik) wrote :

Ok, the update in proposed seems to behave much better. I enabled -proposed as described here:
  https://wiki.ubuntu.com/Testing/EnableProposed

Using the prior version, 0.3.7-1ubuntu11, I repeated the steps described in the initial bug description.
 total 32164K
...
 total 57896K
After upgrade to 0.3.7-1ubuntu11.2 and killing the existing n-d process, I got:
 total 32164K
...
 total 33916K

Much better!

Alexander Jones (alex-weej) wrote :

Oops, my bad. :( Thanks for fixing.

Steve Beattie (sbeattie) wrote :

I've reproduced the bug in the version of notification-daemon included in the Hardy 8.04 release, and have verified that the package in Hardy-proposed definitely improves the memory usage of it -- doing (in bash):

  $ for ((i = 1; i <= 1000; i++)) ; do notify-send -i /usr/share/icons/Human/48x48/places/distributor-logo.png "Message $i" "This is message $i" ; done

caused the -proposed version to use about an additional 7.5M of memory versus 57M for the version released in 8.04 (ia32 versions, the amd64 version in -proposed increases by about 10M). There is still likely more more memory leaks, as the memory usage appears to grow without bound if the for-loop is repeated multiple times, and it would be nice to address those, but the -proposed package is a significant enough improvement to mark this fix as verified.

I don't make extensive use of the notification-daemon, but I noticed no regressions despite the heavy use I was giving it in for loops, plus the occasional application usage.

Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in notification-daemon:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.