Something has a memory leak

Bug #1364368 reported by Colin Ian King
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qtubuntu-sensors
New
Undecided
Unassigned
maliit-framework (Ubuntu)
New
Undecided
Unassigned

Bug Description

I've tracked memory utilisation of maliit-server over a 12 hour period and can see that the heap is growing at about 1700 bytes a second. One can see this by strac'ing the process and seeing glib's malloc performing 4K mprotects every ~2.4 seconds and the occasional 1MB mmap2 to anonymous memory (aka heap) every 600-620 seconds.

[pid 2708] 12:48:57 mprotect(0xa01fa000, 4096, PROT_READ|PROT_WRITE) = 0
[pid 2708] 12:48:59 mprotect(0xa01fb000, 4096, PROT_READ|PROT_WRITE) = 0
[pid 2708] 12:49:02 mprotect(0xa01fc000, 4096, PROT_READ|PROT_WRITE) = 0
[pid 2708] 12:49:04 mprotect(0xa01fd000, 4096, PROT_READ|PROT_WRITE) = 0
[pid 2708] 12:49:07 mprotect(0xa01fe000, 4096, PROT_READ|PROT_WRITE) = 0
[pid 2708] 12:49:09 mprotect(0xa01ff000, 4096, PROT_READ|PROT_WRITE) = 0
[pid 2708] 12:49:11 mmap2(0xa0200000, 1048576, PROT_NONE, MAP_PRIVATE|MAP_ANONY
MOUS|MAP_NORESERVE, -1, 0) = 0xa0200000
[pid 2708] 12:49:11 mprotect(0xa0200000, 135168, PROT_READ|PROT_WRITE) = 0

Over a period of 1 day this will leak 140MB.

Revision history for this message
Colin Ian King (colin-king) wrote :

To show the heap growth, run:

smemstat -p $(pidof maliit-server) 10

..and one sees ~1640 bytes per second heap growth.

Changed in ubuntu-keyboard:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Michael Sheldon (michael-sheldon)
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

This appears to occur in all graphical applications running on the phone (but not on the desktop). Running "smemstat -p $(pidof unity8-dash) 10" provides the same symptoms. So presumably this is a result of an issue somewhere lower down in the stack. I haven't been able to figure out what specifically, so I'll add any projects that seems plausible and their respective developers can remove/invalidate them as appropriate.

summary: - maliit-server has a memory leak
+ Something has a memory leak
no longer affects: mir
no longer affects: qtmir
no longer affects: ubuntu-keyboard
no longer affects: qtubuntu
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Are you sure this is not bug 1206146?

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

There's also already bug #1364404 "qmlscene is leaking ~1.7K per second on an idle application on the phone".

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

Other bug subscribers

Remote bug watches

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