Intermittent dt fission leakcheck | tab 370625 bytes leaked (APZEventState, ActiveElementManager, AsyncFreeSnowWhite, BackstagePass, BrowserChild, ...)
Categories
(DevTools :: General, defect, P5)
Tracking
(firefox78 fixed)
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: intermittent-bug-filer, Assigned: ochameau)
References
(Regression)
Details
(Keywords: intermittent-failure, regression)
Attachments
(1 file)
Filed by: rmaries [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=301235060&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/ApPYKrUUT8yXdzgMWC5ZSA/runs/0/artifacts/public/logs/live_backing.log
[task 2020-05-07T16:05:00.248Z] 16:05:00 INFO - TEST-START | browser/base/content/test/general/browser_windowactivation.js
[task 2020-05-07T16:05:22.527Z] 16:05:22 INFO - TEST-INFO | leakcheck | tab leaked 5 xpc::CompartmentPrivate
[task 2020-05-07T16:05:22.527Z] 16:05:22 INFO - TEST-UNEXPECTED-FAIL | leakcheck | tab 370625 bytes leaked (APZEventState, ActiveElementManager, AsyncFreeSnowWhite, BackstagePass, BrowserChild, ...)
[task 2020-05-07T16:05:22.528Z] 16:05:22 INFO -
[task 2020-05-07T16:05:22.528Z] 16:05:22 INFO - leakcheck | Processing leak log file c:\users\task_1588865779\appdata\local\temp\tmp5iskn2.mozrunner\runtests_leaks_tab_pid7256.log
[task 2020-05-07T16:05:22.528Z] 16:05:22 INFO -
[task 2020-05-07T16:05:22.528Z] 16:05:22 INFO - == BloatView: ALL (cumulative) LEAK AND BLOAT STATISTICS, tab process 7256
[task 2020-05-07T16:05:22.528Z] 16:05:22 INFO -
[task 2020-05-07T16:05:22.528Z] 16:05:22 INFO - |<----------------Class--------------->|<-----Bytes------>|<----Objects---->|
[task 2020-05-07T16:05:22.528Z] 16:05:22 INFO - | | Per-Inst Leaked| Total Rem|
[task 2020-05-07T16:05:22.528Z] 16:05:22 INFO - 0 |TOTAL | 40 0| 439454 0|
[task 2020-05-07T16:05:22.528Z] 16:05:22 INFO -
[task 2020-05-07T16:05:22.528Z] 16:05:22 INFO - nsTraceRefcnt::DumpStatistics: 1100 entries
[task 2020-05-07T16:05:22.529Z] 16:05:22 INFO - TEST-PASS | leakcheck | tab no leaks detected!
[task 2020-05-07T16:05:22.529Z] 16:05:22 INFO - leakcheck | Processing leak log file c:\users\task_1588865779\appdata\local\temp\tmp5iskn2.mozrunner\runtests_leaks_tab_pid7548.log
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
![]() |
||
Comment 5•5 years ago
|
||
The Linux devtools failures start with devtools.browsertoolbox.fission getting set to true in bug 1637012.
Comment 6•5 years ago
|
||
This is quite surprising because:
- the change from Bug 1637012 is a noop on Nightly (the pref is already true there)
- the test modified in Bug 1637012 is not running in the suite that fails here (I checked several devtools failures from https://treeherder.mozilla.org/intermittent-failures.html#/bugdetails?startday=2020-05-12&endday=2020-05-19&tree=trunk&bug=1636192 )
Are you sure they are related?
![]() |
||
Comment 7•5 years ago
|
||
Sorry. https://hg.mozilla.org/mozilla-central/pushloghtml?changeset=59d4ec4ce296162c447f1cfe83abb4be3c0c3333 is the changelog. Any idea what started it?
Comment 8•5 years ago
|
||
Did a few retriggers on autoland https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=dt4%2Cfis&tochange=8662bbb6d68de0d0e1bd64a313eb0588c1fd55a5&fromchange=c1dc821824959b7cee0ac800e79651b464eb1f85&selectedTaskRun=F91jIRITQaaiTN0k_ldrzQ-0
If it's a permafail then Bug 1620966 would be the regressing bug. (https://hg.mozilla.org/integration/autoland/rev/2b7abe98c721313c13553a43309755d233c53cbe)
![]() |
||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
Isn't it a duplicated of bug 1607569, which was already close to be a permafail.
I also see bug 1607569's patch in the changelog of comment 7.
Comment 10•5 years ago
|
||
The tree herder link in comment 8 makes it look like this failure wasn't happening until your patch landed. I did a few retriggers, and they were green before your patch and orange after.
It looks like the leaking process was created during the test devtools/client/webconsole/test/browser/browser_jsterm_evaluation_context_selector_targets_update.js
I looked at one failure log in bug bug 1607569,, and it was being created during
devtools/client/webconsole/test/browser/browser_console_clear_closed_tab.js
That said, it does look like there are a bunch of other failures getting bundled in here. A lot of them are in mochitest-plain-e10s-5, which is neither devtools nor Fission.
Comment 11•5 years ago
|
||
At least in one log I looked at, the mochitest-plain-e10s-5 leak was happening with a content process created while running the tests in dom/security/test/general/
![]() |
||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 12•5 years ago
|
||
Thanks for the help Andrew, I was able to repro it locally thanks to your hint.
It looks like my patch is introducing an exception in these two tests leading to leak reports, but without making the test to fail.
We can probably enhance our exception detection while running tests...
I'll have a look at that tomorrow!
Assignee | ||
Comment 13•5 years ago
|
||
(In reply to Alexandre Poirot [:ochameau] from comment #12)
It looks like my patch is introducing an exception in these two tests leading to leak reports, but without making the test to fail.
Scratch that. I no longer reproduce this exception. The test seems to be running fine.
The leak is related to the page reload when running devtools/client/webconsole/test/browser/browser_console_clear_closed_tab.js.
We should probably leak somethin on page reload in the context of the browser console, but it is hard to guess what.
I tracked the calls to Services.console.registerListener/unregisterListener and it looks correct.
I tried the DMD script (mochitest doesn't accept --mode=scan, so I'm running without), I got the cc-edges logs, but I don't know where to start.
There is no particular address of leaked object/window in mochitest logs.
Assignee | ||
Comment 14•5 years ago
|
||
(In reply to Alexandre Poirot [:ochameau] from comment #13)
Scratch that. I no longer reproduce this exception. The test seems to be running fine.
The leak is related to the page reload when running devtools/client/webconsole/test/browser/browser_console_clear_closed_tab.js.
We should probably leak somethin on page reload in the context of the browser console, but it is hard to guess what.
s/page reload/tab closing/
i.e. this one line
Assignee | ||
Comment 15•5 years ago
|
||
Ok. I think I found it.
We are not trying to do much cleanup when DevTools code is running and the content process is meant to be destroyed.
We just assume that the whole process will be destroyed and do nothing.
If I start listening to "xpcom-shutdown" and destroy DevTools listeners (including the various console related ones: Services.console and Services.obs.addObserver(console-api-log-event)), the leak goes away (locally at least).
I'm not sure bug 1620966 changed anything around this. This leak was probably around for a while!
Assignee | ||
Comment 16•5 years ago
|
||
Before this patch, we were not trying to cleanup anything when the process
was known to be in process of destruction. We assumed that everything would
be cleaned up anyway.
But mochitest is actually asserting that nothing is leaked on process shutdown,
and we are easily leaking many thing when not destroying the target actor!
Assignee | ||
Comment 17•5 years ago
|
||
Comment 18•5 years ago
|
||
(In reply to Alexandre Poirot [:ochameau] from comment #15)
If I start listening to "xpcom-shutdown" and destroy DevTools listeners (including the various console related ones: Services.console and Services.obs.addObserver(console-api-log-event)), the leak goes away (locally at least).
The problem with this is that if this DevTools stuff is holding references to web pages then it means we may be leaking pages until shutdown, which is bad. So your proposed fix would only be hiding leaks from the leak checker, not fixing them. The leak here is a window and a document.
That said, we have a different checker for leaked windows and documents in browser mochitests, and I thought devtools mochitests used that, so I'm not sure why it wouldn't be detected with that. I'll try to figure out what window is leaking.
Assignee | ||
Comment 19•5 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #18)
(In reply to Alexandre Poirot [:ochameau] from comment #15)
If I start listening to "xpcom-shutdown" and destroy DevTools listeners (including the various console related ones: Services.console and Services.obs.addObserver(console-api-log-event)), the leak goes away (locally at least).
The problem with this is that if this DevTools stuff is holding references to web pages then it means we may be leaking pages until shutdown, which is bad. So your proposed fix would only be hiding leaks from the leak checker, not fixing them. The leak here is a window and a document.
Let me rephrase.
DevTools cleans things up when it closes itself! When DevTools closes, we go through all processes and try to cleanup all our stuff everywhere.
(We might have bugs in this process, but I haven't identified a bug in this here. And we really meant to clean everything.)
But while it is opened, if one content process shuts down, DevTools doesn't try to cleanup anything, it just let the process be destroyed and assume everything will be cleaned up. Is that really an issue to leak something when we know the process is in process of shutting down?
To be slightly more concrete about what I identified here. We were destroying all DevTools "Targets actors" for all content processes, all but the one related to the closed tab, which is closed in middle of the test, while DevTools are opened. All others were explicitely destroyed by DevTools code when we are closing the Browser Console.
"Target actors" are the topmost class in DevTools backend, which holds everything alive.
Comment hidden (Intermittent Failures Robot) |
Comment 21•5 years ago
|
||
Assignee | ||
Comment 22•5 years ago
|
||
(In reply to Alexandre Poirot [:ochameau] from comment #17)
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b5a7386ad50bfe04c6ae2843bee87ce86d6e66f9
Looking at this try run, while I fixed a leak locally, it doesn't seem to address the leak happening on try.
I pushed this first patch and I'll keep watching this bug.
Comment 23•5 years ago
|
||
Backed out for xpcshell crashes on test_xpcshell_debugging.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/8038b21a4d0b1aab5719f83104701e6d2580764a
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=303586015&repo=autoland&lineNumber=4985
Comment 24•5 years ago
|
||
Comment 25•5 years ago
|
||
bugherder |
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Updated•5 years ago
|
Description
•