FS#11465 - Memory leak in NetworkManager

Attached to Project: Arch Linux
Opened by Victor Temistocles Nardes (vtn) - Saturday, 13 September 2008, 04:08 GMT
Last edited by Jan de Groot (JGC) - Saturday, 07 February 2009, 20:17 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Jan de Groot (JGC)
Architecture i686
Severity Medium
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

Hello,

I am using NetworkManager 0.6.6 (adapter is a Intel Pro Wireless 3945 working with iwl3945) and noticed that its memory usage rises to a huge amount of RAM after some time of wireless connection activity, like 400MB after some hours. Then the connection begins drop or get unstable.

I checked the web and found these two references with correction patches:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488604
http://bugs.gentoo.org/show_bug.cgi?id=234945

I have made changes to PKGBUILD downloaded from the ABS tree, tried the patch and the memory leak was gone.

Attached you will find the following files:

- NetworkManager-01.png: Screenshot of memory usage when I began working on this problem.
- NetworkManager-02.png: Screenshot of memory usage one hour later.
- fix-memleak.patch: Patch used.
- PKGBUILD: New version of the NetworkManager build script.

It seems like Networkmanager reorganized their trunk and there is not the patched file anymore, so it may be solved upstream. Nonetheless, this bug causes such a big problem with NM and is so easy to do a temporary fix that I though it was worth to report it.

* package version(s)

NetworkManager

* config and/or log files etc.

networkmanager-0.6.6-1

Steps to reproduce:

- Run NetworkManager.
- Check its memory usage.
- Use it to connect to a wireless connection.
- Begin surfing the web, downloading a torrent, etc.
- After one hour or so, check its memory usage.
This task depends upon

Closed by  Jan de Groot (JGC)
Saturday, 07 February 2009, 20:17 GMT
Reason for closing:  Fixed
Additional comments about closing:  Assuming fixed in 0.7.
Comment by Victor Temistocles Nardes (vtn) - Saturday, 13 September 2008, 04:10 GMT
Corrected PKGBUILD is now attached.
Comment by Roman Kyrylych (Romashka) - Sunday, 28 September 2008, 15:23 GMT
@ Jan: won't we use v0.7 when Gnome 2.24 hits Extra? (then fixing this is redundant?)
Comment by Vedant Kumar (vsk) - Wednesday, 08 October 2008, 00:59 GMT
Hello,

I believe that this is happening because you're torrenting (or at least, I assume so, because you have KTorrent on).
When you torrent, you create a lot a connections to other networks or computers, and there's generally a massive amount of data throughput (maybe explaining the memory usage). Some routers (I know mine, Linksys something something) store old connections and slow things down after a while - so that may be a factor.

I'm not sure, but this is my best guess about it.

See if you can reproduce this when you're not torrenting.
Comment by Vedant Kumar (vsk) - Wednesday, 08 October 2008, 01:01 GMT
* just a thought;

In the first screenshot, Ktorrent is off.
In the second, it's on, and your mem usage is through the roof.

Possible correlation?
Comment by Victor Temistocles Nardes (vtn) - Wednesday, 08 October 2008, 01:40 GMT
Please note that the problem was gone after I applied the patch. Look at the new screenshot. I have just taken it, after two days of continuous torrenting.
Comment by Victor Temistocles Nardes (vtn) - Wednesday, 08 October 2008, 01:42 GMT
Allow me to upload it with the extension ;)
Comment by Bart (n0rdik0) - Friday, 17 October 2008, 14:11 GMT
I have experienced this issue with NetworkManager in gentoo, *without* running any torrent program, just web browsing. Memory usage went up to almost 500Mb. I don't know if its still happening since I switched to wicd in Arch, but I believe that it's not related to torrent programs.
Comment by thecombjelly (thecombjelly) - Tuesday, 11 November 2008, 19:12 GMT
definitely not related to torrenting, i can connect to the internet and just let my computer idle and the memory usage grows without browsing, or downloading, or torrenting...
Comment by Jan de Groot (JGC) - Friday, 14 November 2008, 22:35 GMT
Please try networkmanager from testing. Note that somehow it doesn't take over your WEP/WPA passwords, but you can retrieve these from gnome-keyring by using seahorse.
Comment by Glenn Matthys (RedShift) - Thursday, 11 December 2008, 07:27 GMT
Can anyone confirm this is not happening anymore with networkmanager in testing? (This is an upstream bug anyway...)

Loading...