Last Comment Bug 820228 - memory leakage in mochitest while firing touch start event without a corresponding touch end event
: memory leakage in mochitest while firing touch start event without a correspo...
Status: NEW
[MemShrink:P3]
:
Product: Core
Classification: Components
Component: General (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-10 18:09 PST by Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz)
Modified: 2013-02-06 14:14 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
minimal test case to trigger memory leakage (978 bytes, text/html)
2012-12-10 18:09 PST, Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz)
no flags Details
BloatView of the test case (68.39 KB, text/plain)
2012-12-10 18:11 PST, Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz)
no flags Details

Description Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) 2012-12-10 18:09:47 PST
Created attachment 690662 [details]
minimal test case to trigger memory leakage

In mochitest, firing a touch start event using |synthsizeTouch| will cause memory leakage. Firing a corresponding touch end event will make this memory leakage disappear.
Comment 1 Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) 2012-12-10 18:11:55 PST
Created attachment 690663 [details]
BloatView of the test case
Comment 2 Andrew McCreight [:mccr8] 2012-12-11 17:21:35 PST
According to the CC log, this is being kept alive by an anonymous div with a missing reference:

0x12b23ca80 [FragmentOrElement (xhtml) div class='anonymous-div' ...]
    --[mAttrsAndChildren[i]]-> 0x12b23cb00 [nsGenericDOMDataNode]
    --[mNodeInfo]-> 0x1260a0098 [nsNodeInfo ([none]) #text]
    --[mOwnerManager]-> 0x11f0a4d40 [nsNodeInfoManager]
    --[mDocument]-> 0x11f0f1000 [nsDocument normal (xhtml) ...]
    --[mChildren[i]]-> 0x1299ecf80 [FragmentOrElement (xhtml) html ...]
    --[mAttrsAndChildren[i]]-> 0x129c54af0 [FragmentOrElement (xhtml) body ]
    --[mAttrsAndChildren[i]]-> 0x128b77d70 [FragmentOrElement (xhtml) a ...]
    --[[via hash] mListenerManager]-> 0x128ba0700 [nsEventListenerManager]
    --[mListeners[i]]-> 0x12b502c40 [nsJSEventListener handlerName=onclick]
    --[mHandler.Ptr()]-> 0x12b2f6d80 [CallbackFunction]
    --[mCallable]-> 0x1194909c0 [JS Object (Function - partial/<)]
    --[fun_callscope]-> 0x119490980 [JS Object (Call)]
    --[parent, **UNKNOWN SLOT 0**]-> 0x11944f060 [JS Object (Window)]
    --[xpc_GetJSPrivate(obj)]-> 0x11f92cf90 [XPCWrappedNative (Window)]
    --[mIdentity]-> 0x129632888 [nsGlobalWindow #12]

    Root 0x12b23ca80 is a ref counted object with 1 unknown edge(s).
    known edges:
       0x12b23cb00 [nsGenericDOMDataNode] --[GetParent()]-> 0x12b23ca80


where ... is http://mochi.test:8888/tests/browser/base/content/test/touchleak.html?autorun=1&closeWhenDone=1&logFile=%2FUsers%2Famccreight%2Fmz%2Fcent%2Fobj-dbg%2Fmochitest-plain.log&fileLevel=INFO&consoleLevel=INFO&failureFile=/Users/amccreight/mz/cent/obj-dbg/_tests/testing/mochitest/makefailures.json
Comment 3 Olli Pettay [:smaug] (TPAC) 2012-12-12 10:02:01 PST
I don't think this is too serious issue. We keep touches alive in presshell, but evict the old
touches ones we get the start of a new touch session.
Tests using DOMWindowUtils may do something hacky, like not dispatch touchend.
Comment 4 Andrew McCreight [:mccr8] 2013-01-29 10:16:51 PST
Olli, do you think this is WONTFIX then?
Comment 5 Olli Pettay [:smaug] (TPAC) 2013-01-29 11:47:59 PST
This should be fixed, but isn't anything critical, as far as I see.
Comment 6 Andrew McCreight [:mccr8] 2013-01-29 13:21:09 PST
Okay, we can retriage this at our next MemShrink meeting.

Note You need to log in before you can comment on or make changes to this bug.