Large memory leak in nm-applet

Bug #930491 reported by Harm van Bakel on 2012-02-11
This bug affects 36 people
Affects Status Importance Assigned to Milestone
network-manager-applet (Ubuntu)
Mathieu Trudel-Lapierre
Mathieu Trudel-Lapierre

Bug Description

In an up-to-date precise install, memory usage by nm-applet climbs rapidly to hundreds of Mb within an hour after it's started. Valgrind log attached.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: network-manager-gnome
ProcVersionSignature: Ubuntu 3.2.0-15.24-generic 3.2.5
Uname: Linux 3.2.0-15-generic x86_64
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
Date: Fri Feb 10 19:23:00 2012
 auto lo
 iface lo inet loopback
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120201.1)
 default via dev wlan0 proto static dev wlan0 scope link metric 1000 dev wlan0 proto kernel scope link src metric 2
 PATH=(custom, user)
SourcePackage: network-manager-applet
UpgradeStatus: No upgrade log present (probably fresh install)
 ribeira f828a6c2-179f-41ab-acdd-bf27da31c6d5 802-11-wireless 1328916417 Fri 10 Feb 2012 06:26:57 PM EST yes no /org/freedesktop/NetworkManager/Settings/0
 wlan0 802-11-wireless connected /org/freedesktop/NetworkManager/Devices/1
 eth0 802-3-ethernet unavailable /org/freedesktop/NetworkManager/Devices/0
 running connected enabled enabled enabled enabled disabled

Harm van Bakel (hvbakel) wrote :
Harm van Bakel (hvbakel) wrote :

The size of the memory leak appears to be proportional to the number of available wireless networks. At a location with only a few networks, memory usage by nm-applet barely increases. At home, with about 60+ detected access points, memory increases at a rate of 2-3 Mb per minute. I have experienced this problem since the first released nm-applet version in Natty.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager-applet (Ubuntu):
status: New → Confirmed

On Precise 64 bit, updated today but on kernel 3.2.0-14-generic

I can see this bug when using a wifi dongle (Netgear WG111v3, default drivers) on my desktop PC.

3 wifi connections visible, after one hour, top shows nm-applet res use increasing from 16Mb to 25Mb.

Rebooting and using just wired connection, res remains stable at 16Mb

Graham Lucking (lucking) wrote :

I have the same problem. The top command shows nm-applet starting below 2% memory usage of 1GB memory and slowly rising over time. I have recorded nm-applet memory usage at plus 26% of 1GB of RAM.

At plus 9% memory usage the network app indicator menu becomes unresponsive. It is not possible to disconnect either the wired or wireless connection, or disable networking or wireless. Clicking on these lines in the menu has no effect. It is still possible to disconnect using the slider options in the System Settings Network utility but once switched off by using that utility wired or wireless connections cannot be switched back on using the network app-indicator menu but only by the System Settings Netwrok utility.

Furthermore, if the menu is left open it blinks out of existence and then re-appears and does this frequently but not rapidly.

Harm van Bakel (hvbakel) wrote :

I also previously filed a memory-leak bug report against nm-applet in natty (, which I think got incorrectly marked as a duplicate of #779754 (though it shares some characteristics). In the comments of #780602 there is a pretty detailed analysis of several memory leaks by 'jkl102001', which might still be relevant here.

Doug McMahon (mc3man) wrote :

This appears to be something quite new here where with the current network-manager & network-manager-gnome packages am seeing about 80MB/hr
Downgrading all installed in bulk and things return to normal -




Upgrading back in order the big leak didn't restart until network-manager-gnome was upgraded, then downgrading just network-manager-gnome has again restored things back to normal

Sutram (sutram) wrote :

I have the same issue with the latest version of network manager. I am running an updated 12.04 i386 version of Xubuntu.

Jane Atkinson (irihapeti) wrote :

Asus EeePC 900, 1GB RAM, up-to-date install of precise

nm-applet was using 6.4 MB of memory at initial boot.

Five hours later, that had increased to 49.1 MB, 6.1% of total.

There are about 18 or so WiFi access points visible.

So far, I've not noticed any unresponsive behaviour in the applet.

C de-Avillez (hggdh2) wrote :

Marking High. bug 931207 also has a valgrind log.

Changed in network-manager-applet (Ubuntu):
importance: Undecided → High

I've got 1.6 GB worth of memory usage on my precise install. It's the highest usage process on my system.


Before going to bed, open a terminal and "killall -9 nm-applet" (your computer will stay connected to the network)
When you next need to switch networks: "nm-applet &"

If I leave my computer idling for more than 24 hours, it gets so unresponsive I can't even open a terminal to resuscitate it.

Andy Whitcroft (apw) wrote :

Am seeing this on both 32bit and 64bit installs.

David Gómez (dabisu) wrote :

471Mb and growing...

Doug McMahon (mc3man) wrote :

Those affected should upgrade network-manager-gnome to and after a log out/in recheck usage/increase

Here I currently have 20 available networks, previously that would have caused a steady 1MiB+ per min increase, currently it's now remaining static, no increase of any concern

Harm van Bakel (hvbakel) wrote :

Things definitely improved with the new network-manager-gnome package, but a smaller leak still remains. I'm now seeing an increase of ~1Mb every 6-8 minutes, compared to several Mb/min.

Steve Langasek (vorlon) wrote :

Marking this critical; my machine took minutes to swap gnome-screensaver back in because nm-applet was gobbling up all the RAM. This makes systems quite unusable very quickly.

I'm happy to try to debug this in realtime if you need help reproducing it, Mathieu.

Changed in network-manager-applet (Ubuntu):
importance: High → Critical
Changed in network-manager-applet (Ubuntu Precise):
milestone: none → ubuntu-12.04-beta-1
tags: added: rls-mgr-p-tracking
Harm van Bakel (hvbakel) wrote :

New valgrind log attached for network-manager-gnome

I think I largely got this under control and I'm just about to upload a fix for it to precise, pending another bug to receive a Feature Freeze exception (or repacking with just the leak fixes if that takes too long).

I've also put the same package as will be uploaded; in my PPA:

Changed in network-manager-applet (Ubuntu Precise):
status: Confirmed → In Progress
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Hernando Torque (htorque) wrote :

Mem usage stayed constant for almost two hours with Mathieu's PPA packages, so this leak seems fixed. Thanks! :-)

Hernando, thanks for confirming this; I'm uploading the fixes now.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package network-manager-applet -

network-manager-applet ( precise; urgency=low

  * debian/patches/lp829673_gconf_hide_applet.patch: allow toggling the applet
    visibility. (LP: #829673)
  * debian/patches/nm-applet-use-indicator.patch: completely replace the old
    wireless menu item creation code overriding NMNetworkMenuItem objects to
    rewrite it more simply with GtkImageMenuItems. This should really take care
    of the memory leaks. (LP: #930491)
 -- Mathieu Trudel-Lapierre <email address hidden> Mon, 20 Feb 2012 13:58:49 -0500

Changed in network-manager-applet (Ubuntu Precise):
status: In Progress → Fix Released
Marcin Sochacki (wanted) wrote :

I'm seeing a similar issue in Ubuntu 11.04 (Natty), however I don't know how to confirm whether this is the same bug or a different one. After about 2 weeks since startup nm-applet has grown to VSZ = 640 MB, RSS = 170 MB. This is a laptop and I'm using suspend a lot.

wanted 1462 0.0 8.3 642292 170408 ? SLl Mar15 11:35 nm-applet --sm-disable

Maybe the patch could be backported to Natty?

Shivam Sharma (shivams-cool) wrote :

In 2015, on Linux Mint 17.1 (based on Ubuntu 14.04), the issue is still there. 700MB and still growing.

Slavko (eslavko) wrote :

Ubuntu 14.04 64 bit and leak is still present. 700Mb after 3 hours...

Slavko (eslavko) wrote :

I tried to kill and relaunch with
killall nm-applet
nm-applet &

It's works. The memory is released and applet running but after few seconds I got this in my terminal:

(nm-applet:32662): nm-applet-WARNING **: Could not find ShellVersion property on org.gnome.Shell after 5 tries

And machine doesn't have wireless adapter.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers