mochitest-plain: test_bug419527.xhtml (and test_bug375314.html) intermittently leaks 300 kB, after using |document.addBinding()|

VERIFIED FIXED in mozilla1.9.2a1

Status

()

defect
VERIFIED FIXED
11 years ago
7 years ago

People

(Reporter: sgautherie, Assigned: smaug)

Tracking

(Depends on 1 bug, {intermittent-failure, memory-leak})

Trunk
mozilla1.9.2a1
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(status1.9.1 .2-fixed)

Details

()

Attachments

(3 attachments, 1 obsolete attachment)

This has been around for a long time (= months, maybe more):
now that we have +/- fixed all the persistent leaks,
it's time to look into the intermittent ones.

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.1/1234576995.1234582226.32611.gz
WINNT 5.2 mozilla-1.9.1 unit test on 2009/02/13 18:03:15
TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 286918 bytes during test execution

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1234559348.1234564505.23529.gz
Win2k3 comm-central dep unit test on 2009/02/13 13:09:08
TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 300926 bytes during test execution (threshold set at 200 bytes)

I have also seen it 1+ time(s) on my local Windows (1.9.2 trunk) SeaMonkey,
so I do not think this is 1.9.1 branch only.
Flags: wanted1.9.1?
Posted file FF 3.1 leak log
Summary: [Windows only ?] Intermittent 300 kB leak → [Windows] Intermittent 300 kB Mochitest leak
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.1/1234886030.1234891435.18115.gz
OS X 10.5.2 mozilla-1.9.1 unit test on 2009/02/17 07:53:50
TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 282028 bytes during test execution
OS: Windows Server 2003 → All
Summary: [Windows] Intermittent 300 kB Mochitest leak → Intermittent 300 kB Mochitest leak
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1237122489.1237127518.10338.gz
Win2k3 comm-central dep unit test on 2009/03/15 06:08:09
TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 302122 bytes during test execution (threshold set at 200 bytes)
Whiteboard: [orange]
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1237211043.1237216067.1406.gz
Win2k3 comm-central dep unit test on 2009/03/16 06:44:03
TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 301258 bytes during test execution (threshold set at 200 bytes)
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1237625825.1237630879.6362.gz
Win2k3 comm-central dep unit test on 2009/03/21 01:57:05
Blocks: 484876
Duplicate of this bug: 484876
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1238097894.1238103672.30312.gz&fulltext=1
TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 294888 bytes during test execution
WINNT 5.2 mozilla-central unit test
No longer blocks: 484876
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1238206377.1238215021.10447.gz
WINNT 5.2 mozilla-1.9.1 unit test on 2009/03/27 19:12:57
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1238327427.1238335402.18630.gz
WINNT 5.2 mozilla-central unit test on 2009/03/29 04:50:27
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1238518265.1238526202.13122.gz
Linux mozilla-central unit test on 2009/03/31 09:51:05
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1238804157.1238809612.16867.gz
WINNT 5.2 mozilla-1.9.1 unit test on 2009/04/03 17:15:57
Summary: Intermittent 300 kB Mochitest leak → mochitest-plain: intermittent 300 kB leak
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1238879554.1238888556.8551.gz
Linux mozilla-central unit test on 2009/04/04 14:12:34
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1238879547.1238886792.5323.gz
WINNT 5.2 mozilla-central unit test on 2009/04/04 14:12:27
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1239150119.1239160009.4642.gz
Linux mozilla-central unit test on 2009/04/07 17:21:59
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1239364208.1239369412.32001.gz
OS X 10.5.2 mozilla-1.9.1 unit test on 2009/04/10 04:50:08
mochitest-plain
Two more failures of this type, for a total of three so far today (and it's only 2pm):

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1239376197.1239383806.6723.gz
WINNT 5.2 mozilla-1.9.1 unit test on 2009/04/10 08:09:57

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1239392803.1239398340.27444.gz
WINNT 5.2 mozilla-1.9.1 unit test on 2009/04/10 12:46:43
TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 294552 bytes during test execution
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1239819085.1239832721.28613.gz&fulltext=1
WINNT 5.2 mozilla-central unit test on 2009/04/15 11:11:25
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1240267078.1240273455.1752.gz
OS X 10.5.2 mozilla-central unit test on 2009/04/20 15:37:58
Summary: mochitest-plain: intermittent 300 kB leak → mochitest-plain: intermittent 300 kB leak including one nsXMLDocument and a bunch of nsHTML*Element
Summary: mochitest-plain: intermittent 300 kB leak including one nsXMLDocument and a bunch of nsHTML*Element → mochitest-plain: intermittent 300 kB leak including one nsXMLDocument and a bunch of nsHTML*Element (17 nsGenericElement)
We just hit a cluster of 4 of these, but the leak looks just like the others reported here.

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1240594539.1240603566.21826.gz
WINNT 5.2 mozilla-central unit test on 2009/04/24 10:35:39

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1240594539.1240599884.16639.gz
OS X 10.5.2 mozilla-central unit test on 2009/04/24 10:35:39  

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1240598603.1240604371.22881.gz
OS X 10.5.2 mozilla-central unit test on 2009/04/24 11:43:23  

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1240599833.1240605196.23988.gz
OS X 10.5.2 mozilla-central unit test on 2009/04/24 12:03:53  


This would be easier to debug if the leak-checking stuff also set the environment variables needed for and checked the output of leak-gauge.pl, since then we'd know what page was leaking.
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1241032302.1241039426.10817.gz
OS X 10.5.2 mozilla-1.9.1 unit test on 2009/04/29 12:11:42
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1242074648.1242083254.1227.gz
OS X 10.5.2 mozilla-central unit test on 2009/05/11 13:44:08
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1242074648.1242081983.32217.gz
WINNT 5.2 mozilla-central unit test on 2009/05/11 13:44:08
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1242081848.1242087063.5796.gz
OS X 10.5.2 mozilla-central unit test on 2009/05/11 15:44:08
Another:
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1242425944.1242432291.19500.gz

These seem to be happening pretty frequently right now.
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1242428692.1242435159.24531.gz
Linux mozilla-central unit test on 2009/05/15 16:04:52
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1242429504.1242436502.26800.gz
WINNT 5.2 mozilla-central unit test on 2009/05/15 16:18:24
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1242426611.1242433653.21967.gz
WINNT 5.2 mozilla-central unit test on 2009/05/15 15:30:11
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1242975494.1242980636.3420.gz
WINNT 5.2 mozilla-1.9.1 unit test on 2009/05/21 23:58:14
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1243007477.1243012055.3030.gz
OS X 10.5.2 mozilla-central unit test on 2009/05/22 08:51:17
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1242996699.1243001825.10343.gz
OS X 10.5.2 mozilla-central unit test on 2009/05/22 05:51:39
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1243033391.1243037694.23299.gz
OS X 10.5.2 mozilla-central unit test on 2009/05/22 16:03:11
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1243071226.1243076332.16908.gz
WINNT 5.2 mozilla-central unit test on 2009/05/23 02:33:46
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1243358881.1243363339.21069.gz
Linux mozilla-central unit test on 2009/05/26 10:28:01
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1244052328.1244056733.21528.gz
WINNT 5.2 comm-central unit test on 2009/06/03 11:05:28
Blocks: 419527
Whiteboard: [orange] → [See comment 48] [orange]
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1244661360.1244665730.30247.gz
WINNT 5.2 comm-central unit test on 2009/06/10 12:16:00
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1244718934.1244726530.9072.gz&fulltext=1
WINNT 5.2 mozilla-central unit test on 2009/06/11 04:15:34

Same as comment 48:
http://localhost:8888/tests/content/base/test/test_bug419527.xhtml(#rangebinding)
Summary: mochitest-plain: intermittent 300 kB leak including one nsXMLDocument and a bunch of nsHTML*Element (17 nsGenericElement) → mochitest-plain: test_bug419527.xhtml intermittently leaks 300 kB including one nsXMLDocument and a bunch of nsHTML*Element (17 nsGenericElement)
Component: General → XBL
QA Contact: general → xbl
So I can't quite figure out why that test would leak intermittently...  I wonder whether doing the finish() async instead of from inside the ctor would help.

Well, that and we should fix the actual leak....
I wonder what has changed recently because this seems to happen pretty often nowadays. Bug 419527 landed long time ago.
Posted patch patch (obsolete) — Splinter Review
This seems to fix the leak at least locally.
I could commit this one and file a new bug to fix the leak.
Assignee: nobody → Olli.Pettay
Attachment #384416 - Flags: review?(bzbarsky)
Comment on attachment 384416 [details] [diff] [review]
patch

That sounds great if you can actually reproduce locally!  I've had absolutely no luck with that, unfortunately...

Add comments in the test pointing to the new bug you file as the explanation for the removeBinding call?
Attachment #384416 - Flags: review?(bzbarsky) → review+
Depends on: 499735
Please add a comment here if you still see this leak.
Otherwise I'll close this bug within next few days.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
(In reply to comment #18)
> This would be easier to debug if the leak-checking stuff also set the
> environment variables needed for and checked the output of leak-gauge.pl, since
> then we'd know what page was leaking.

I filed bug 500175.
Flags: in-testsuite+
Hardware: x86 → All
Whiteboard: [See comment 48] [orange] → [needs 1.9.1 landing] [orange]
Target Milestone: --- → mozilla1.9.2a1
Now, a different case of 300 kB leak, from another test:
{
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1245865067.1245866695.5712.gz&fulltext=1
WINNT 5.2 mozilla-central test mochitests on 2009/06/24 10:37:47

TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 306743 bytes during test execution (threshold set at 484 bytes)

http://localhost:8888/tests/content/base/test/test_bug375314.html
}

See:
http://mxr.mozilla.org/mozilla-central/source/content/base/test/test_bug375314.html?force=1
113     SimpleTest.finish();
171   document.addBinding(div, testURL);
Blocks: 375314
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [needs 1.9.1 landing] [orange] → [needs 1.9.1 landing: 1st patch] [orange]
Summary: mochitest-plain: test_bug419527.xhtml intermittently leaks 300 kB including one nsXMLDocument and a bunch of nsHTML*Element (17 nsGenericElement) → mochitest-plain: test_bug419527.xhtml (and others) intermittently leaks 300 kB, after using |document.addBinding()|
Summary: mochitest-plain: test_bug419527.xhtml (and others) intermittently leaks 300 kB, after using |document.addBinding()| → mochitest-plain: test_bug419527.xhtml (and test_bug375314.html) intermittently leaks 300 kB, after using |document.addBinding()|
Whiteboard: [needs 1.9.1 landing: 1st patch] [orange] → [needs 1.9.1 landing: 1st patch] [ToDo: comment 64] [orange]
This should fix it, hope somebody can check whether it does - I don't see a leak either way (could be due to outdated code base).
Attachment #385059 - Flags: review?(bzbarsky)
Attachment #385059 - Flags: review?(bzbarsky) → review+
Attachment #385059 - Attachment description: Patch for test_bug375314.html → Patch for test_bug375314.html [Checkin: Comment 66]
Attachment #384446 - Attachment description: with XXX comment → with XXX comment [Checkin: Comment 61]
Potentially, 2 other tests could trigger this leak:
test_bug296375.xul and test_bug398492.xul

We'll see.
Whiteboard: [needs 1.9.1 landing: 1st patch] [ToDo: comment 64] [orange] → [needs 1.9.1 landing: 2 patches] [ToDo: comment 64] [orange]
Whiteboard: [needs 1.9.1 landing: 2 patches] [ToDo: comment 64] [orange] → [needs 1.9.1 landing: 2 patches] [orange]
Haven't seen any more of this one in the last week, anyone else?
V.Fixed, confirming no new occurrences on FF 3.6 (Unit and Packaged) test boxes since comment 66.
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Flags: wanted1.9.1?
Resolution: --- → FIXED
Whiteboard: [needs 1.9.1 landing: 2 patches] [orange] → [needs 1.9.1.x landing: 2 patches] [orange]
Status: RESOLVED → VERIFIED
Just caught a leak that looks a bit like this bug:

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1246911367.1246917245.22724.gz
OS X 10.5.2 mozilla-central unit test on 2009/07/06 13:16:07

TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 338817 bytes during test execution
[snip]
TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 172 instances of nsGenericElement with size 28 bytes each (4816 bytes total)
[snip]
TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 1 instance of nsXMLDocument with size 612 bytes
TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 172 instances of nsXMLElement with size 32 bytes each (5504 bytes total)
[snip]

Is this the same bug? Or should I file a new bug on this?
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1246914480.1246919880.20305.gz
WINNT 5.2 mozilla-1.9.1 unit test on 2009/07/06 14:08:00
(Unrelated to comment 70 -- this bug is still known-broken on 1.9.1)
(In reply to comment #70)
> Just caught a leak that looks a bit like this bug:

I noticed it too (recently)...

> Is this the same bug? Or should I file a new bug on this?

Please, file a separate bug as that one is in mochitest-browser-chrome. Thanks.
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1248763230.1248772233.29151.gz
OS X 10.5.2 mozilla-1.9.1 unit test on 2009/07/27 23:40:30
TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 282956 bytes during test execution
Keywords: checkin-needed
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5-Unittest/1248771250.1248773935.15330.gz
Linux mozilla-1.9.1 test mochitests on 2009/07/28 01:54:10
TEST-UNEXPECTED-FAIL | runtests-leaks | leaked 294804 bytes during test execution
Attachment #384446 - Attachment description: with XXX comment [Checkin: Comment 61] → with XXX comment [Checkin: Comment 61 & 75]
Attachment #385059 - Attachment description: Patch for test_bug375314.html [Checkin: Comment 66] → Patch for test_bug375314.html [Checkin: Comment 66 & 75]
Serge, could you help us verify this in Fx3.5.2?
(In reply to comment #76)
> Serge, could you help us verify this in Fx3.5.2?

No: see bug 450450 comment 22.
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.