Open Bug 1260372 Opened 8 years ago Updated 2 years ago

Inline event handlers of XUL nodes leak the node

Categories

(Core :: XUL, defect)

45 Branch
x86_64
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: crackevil, Unassigned)

Details

(Keywords: memory-leak, Whiteboard: btpp-backlog)

Attachments

(1 file)

7.39 MB, application/x-7z-compressed
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:45.0) Gecko/20100101 Firefox/45.0
Build ID: 20160315153207

Steps to reproduce:

open any XUL based addons or just Firefox itself components using XUL(like browser console).
then close the window except for the main window of Firefox.



Actual results:

You can see a lot of orphan XUL in ccdump output and more and more, it eats lots of memory


Expected results:

xul nodes of a window should be collected after the window closed.
the result would be different if all the XUL nodes has no INLINE event handler.
It's found that all leaked XUL nodes are having INLINE event handler, but rewrite the code making the handler available via "addEventListener", the problem disappeared.
The XUL I checked are listbox, tabbox, checkbox, button.
The ways treating INLINE event handlers and handlers via "addEventListener" should be the same.
Severity: normal → critical
Component: Untriaged → General
Keywords: mlk, topmlk
OS: Unspecified → Windows 7
Priority: -- → P3
Hardware: Unspecified → x86_64
leak code in XUL file:
<button onclick="xxxx">
no matter what's "xxxx" is, closure or not, are all leaks
Can you save and attach a memory log from about:memory.
Flags: needinfo?(crackevil)
Attached file case.7z
leaked XUL objects are "FragmentOrElement (XUL)" in ccdump list.
I guess if it's relative with https://bugzilla.mozilla.org/show_bug.cgi?id=1224577
Flags: needinfo?(crackevil)
Can you provide the add-on you're using to test?
Component: General → Untriaged
Flags: needinfo?(crackevil)
Keywords: topmlk
Priority: P3 → --
Product: Firefox → Core
There are 4 addons at this moment,
ccdump  https://addons.mozilla.org/en-US/firefox/addon/cycle-collector-analyzer/
adblockplus   https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/
videodownloader  https://addons.mozilla.org/en-US/firefox/addon/video-downloadhelper/
pocket(readitlater)  readitlater version not Firefox version

At this point, it's not only addons leaks XUL objects, but also Firefox parts like "browser console".
Flags: needinfo?(crackevil)
Honza, can you recommend someone who can investigate this further and/or put it in the right component?
Flags: needinfo?(odvarko)
Note that I am not working on ccdump for quite a while so, results it provides don't have to be accurate and I wouldn't base analysis on it. Can you reproduce the problem using different tool for memory leak hunting?

See list of alternatives: https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Leak-hunting_strategies_and_tips

Honza
Flags: needinfo?(odvarko) → needinfo?(crackevil)
No longer blocks: LeakyAddons, ZombieCompartments
Severity: critical → minor
Flags: needinfo?(crackevil)
Component: Untriaged → XUL
Whiteboard: btpp-backlog
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: