[MTBF] memory leak at Homescreen after running MTBF for a while

RESOLVED FIXED in Firefox OS v2.2

Status

Firefox OS
Stability
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Alison Shiue, Assigned: ting)

Tracking

unspecified
2.2 S14 (12june)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(b2g-v2.2 fixed, b2g-master unaffected)

Details

Attachments

(2 attachments)

(Reporter)

Description

2 years ago
After running MTBF about 20 hours, we found that memory Homescreen allocated increase from 54 MB to 98MB.

Here are logs for refer: 
https://drive.google.com/a/mozilla.com/folderview?id=0B_lQ-lNDWe2ofjhWZU9RczBnekVOWVk4SnhHeXhjWFZDQ1pYQTlJZWpoMjRBQ1ZZQkpVRDA&usp=sharing

Build info:
Build ID 20150524162504
Gaia Revision de5942bd99b801d4d04b676f1e70a77e93115d95
Gaia Date 2015-05-22 19:38:55
Gecko Revision https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/1bd024f4e171
Gecko Version 37.0
Device Name hammerhead
Firmware(Release) 5.1
Firmware(Incremental)  eng.cltbld.20150524.201333
Firmware Date Sun May 24 20:13:50 EDT 2015
Bootloader HHZ12f
(Reporter)

Updated

2 years ago
QA Whiteboard: [COM=MTBF-Nexus5L]

Comment 1

2 years ago
Ting, can you help on this case?
Flags: needinfo?(janus926)
Can we get memory reports before and after the test? Please use argument "-m" to GC/CC to get the report.
Flags: needinfo?(janus926) → needinfo?(ashiue)
(Reporter)

Comment 3

2 years ago
OK, I will get memory report via -m argument after the test finished.
About getting report before test, I would try to get them from next run.
Flags: needinfo?(ashiue)

Updated

2 years ago
status-b2g-v2.2: --- → affected
(Reporter)

Comment 4

2 years ago
Here are logs from MTBF local run (running about 24 hours):  
https://drive.google.com/open?id=0B_lQ-lNDWe2ofjFkcW4tMUNXa3huQndqam9GdXg5REl0amVrY0ZzQzZzTXVOUURWVHJuRkE&authuser=1

We also got homescreen memory info per minute after mtbf testing finished and we killed all running processes which launched via MTBF testing.
Created attachment 8612698 [details]
gc-edges.9939.census

This is the sorted list of the output from census.py [1] of Homescreen's gc edges after running MTBF 24 hours.

There're plenty of shapes and SpecialPowers instances. I'm figuring out how are they instantiated.

[1] https://github.com/amccreight/heapgraph/blob/master/g/census.py
Created attachment 8612756 [details] [diff] [review]
patch v1 (b2g37)

The troublesome code does not exist on master, so only patch for v2.2.

Alison, can we setup some devices to make sure the issue goes away?
Flags: needinfo?(ashiue)
Attachment #8612756 - Flags: review?(dburns)
status-b2g-master: --- → unaffected
Clear NI since I have passed Alison a device with the patch included. Will check on Monday.
Flags: needinfo?(ashiue)
Attachment #8612756 - Flags: review?(dburns) → review+
Below are the logs of local run with patch in comment #6.
Before run:
https://drive.google.com/drive/#folders/0B_lQ-lNDWe2ofjhWZU9RczBnekVOWVk4SnhHeXhjWFZDQ1pYQTlJZWpoMjRBQ1ZZQkpVRDA/0B_lQ-lNDWe2ofkZhdnBuMHZnU1FQRXdmQUhlc3VKTERZTEtjQnFYaE1walhjSlB3ME5TY3c/0B_lQ-lNDWe2ofkRWN1BZLTgzZUI1QTNfVGk2NkZxazNhVTZxbkdFYUNkOS1mYk9pc3o2QUU

After 7 hours run:
https://drive.google.com/drive/#folders/0B_lQ-lNDWe2ofjhWZU9RczBnekVOWVk4SnhHeXhjWFZDQ1pYQTlJZWpoMjRBQ1ZZQkpVRDA/0B_lQ-lNDWe2ofkZhdnBuMHZnU1FQRXdmQUhlc3VKTERZTEtjQnFYaE1walhjSlB3ME5TY3c/0B_lQ-lNDWe2ofjJhY19aX29RcjllOFgxVnZVWVdxRklRb1BzVGR1WWhIc2tsbkxucE9pcVU
After 7 hours running, we found that the memory of Homescreen doesn't grow significantly. The memory usage of Homescreen is fluctuated.
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=bd10a7ee2d60
Comment on attachment 8612756 [details] [diff] [review]
patch v1 (b2g37)

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 1048833
User impact if declined: possible leak from running marionette
Testing completed: marionette unit test
Risk to taking this patch (and alternatives if risky): low
String or UUID changes made by this patch: none
Attachment #8612756 - Flags: approval-mozilla-b2g37?

Updated

2 years ago
Attachment #8612756 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
Sheriff, the bug does not exist on master, so patch for b2g37 only, thanks.
Keywords: checkin-needed
Assignee: nobody → janus926
Status: NEW → ASSIGNED
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/066d969aebac
status-b2g-v2.2: affected → fixed
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S14 (12june)
You need to log in before you can comment on or make changes to this bug.