Memory leaks

Bug #43096 reported by Bruce Cowan
14
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

It appears that there might be memory leaks in update-manager, as it shouldn't use 62MiB, which it does on my computer just now. It was 90MiB earlier.

Michael Vogt (mvo)
Changed in update-manager:
assignee: nobody → mvo
status: Unconfirmed → Confirmed
Revision history for this message
Bruce Cowan (bruce89-deactivatedaccount) wrote : Valgrind log.

I am not sure if this helps, but here is a valgrind log - leak summary:
==18147== LEAK SUMMARY:
==18147== definitely lost: 47,816 bytes in 137 blocks.
==18147== indirectly lost: 7,400 bytes in 353 blocks.
==18147== possibly lost: 903,048 bytes in 303 blocks.
==18147== still reachable: 40,206,205 bytes in 81,338 blocks.
==18147== suppressed: 0 bytes in 0 blocks.

Revision history for this message
John Dong (jdong) wrote :

I don't think valgrind is of much use for update-manager, a python app. valgrind will likely find memory leaks in Python itself, which isn't what we're looking at.

Revision history for this message
Bruce Cowan (bruce89-deactivatedaccount) wrote :

Sorry, I didn't realise that it wouldn't help.

Revision history for this message
Michael Vogt (mvo) wrote :

This should be fixed with the latest python-apt upload.

Changed in update-manager:
status: Confirmed → Fix Released
Revision history for this message
Bruce Cowan (bruce89-deactivatedaccount) wrote :

It doesn't seem to have helped much, update-manager still uses 65MiB of memory when cold started. After installing updates, memory usage is 110MiB.

Changed in update-manager:
status: Fix Released → Unconfirmed
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for this additioanl information and the additioanl testing.

The upload of update-manager_0.44.17 should have fixed it now. Please test the fix (once its available in the archive) and reopen the bug if this is still a issue.

Thanks,
 Michael

Changed in update-manager:
status: Unconfirmed → Fix Released
Revision history for this message
Bruce Cowan (bruce89-deactivatedaccount) wrote :

Running update-manager and after installing something, running top yields this:

VIRT=190m RES=67m SHR=21m.

This seems as if update-manger itself is only using 21MiB. I have been measuring memory usage with system-monitor in the past, which isn't good for this as it doesn't display the memory usage of the application, but the usage of it and all the libaries it needs to run (AFAIK).

All together, 67MiB seems quite high for total usage, is this due to Python?

It also seems as if the bug which causes the memory usage to increase a lot after packages are installed is gone.

Revision history for this message
Michael Vogt (mvo) wrote :

Its good to hear that the memory leak is fixed for you.

You can find out more about the real use with the pmap utility (give it the pid of update-manager as argument). You will see that most is shared libraries and some mmap()ed of the package cache.

But yeah, there is always room for improvement :)

Revision history for this message
Bruce Cowan (bruce89-deactivatedaccount) wrote :

I just did this (pmap) and found this line (fairly near the top):

0000000000623000 29988K rw--- [ anon ]

That is a large amount of memory being used, but I am not sure if it indicates anything useful.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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