Intermittent toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js | leaked 1 window(s) until shutdown [url = about:blank]
Categories
(WebExtensions :: General, defect, P5)
Tracking
(firefox-esr60 unaffected, firefox-esr68 fixed, firefox69 wontfix, firefox70 fixed, firefox71 fixed)
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox-esr68 | --- | fixed |
firefox69 | --- | wontfix |
firefox70 | --- | fixed |
firefox71 | --- | fixed |
People
(Reporter: intermittent-bug-filer, Assigned: robwu)
References
(Depends on 1 open bug)
Details
(Keywords: intermittent-failure, Whiteboard: [TV-bf pass:fail][stockwell needwork:owner])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment hidden (Intermittent Failures Robot) |
Comment 6•6 years ago
|
||
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Updated•6 years ago
|
Updated•6 years ago
|
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment 56•5 years ago
|
||
There are 21 total failures in the last 7 days: https://treeherder.mozilla.org/intermittent-failures.html#/bugdetails?startday=2019-08-20&endday=2019-08-27&tree=trunk&bug=1474041
Recent failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=263517127&repo=autoland&lineNumber=39668
Jim, could you assign this to someone?
Comment 57•5 years ago
|
||
Appears to have recently regressed. Rob, did we change anything in theme code recently? We did some work for the color extension but looks that was in the extension vs. apis. Wondering if there's anything else we can think of that might have caused this to regress.
Comment hidden (Intermittent Failures Robot) |
Comment 59•5 years ago
|
||
Hi Jim, looks like Rob did not reply, can you please try someone else?
There are 25 total failures in the last 7 days and 63 in the last 30 on windows10-64-qr, windows10-64, linux64, linux64-ccov debug builds
Recent failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=265591786&repo=autoland&lineNumber=39948
[task 2019-09-08T11:43:26.780Z] 11:43:26 INFO - TEST-START | toolkit/components/extensions/test/browser/browser_ext_themes_warnings.js
[task 2019-09-08T11:43:26.799Z] 11:43:26 INFO - GECKO(9684) | monitorConsole | [0] did not match {"message":"Warning: attempting to write 6776 bytes to preference extensions.webextensions.uuids. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file. This preference will not be sent to any content processes.","errorMessage":null,"cssSelectors":null,"sourceName":null,"sourceLine":null,"lineNumber":null,"columnNumber":null,"category":null,"windowID":null,"isScriptError":false,"isConsoleEvent":false,"isWarning":false,"isException":false,"isStrict":false}
[task 2019-09-08T11:43:26.829Z] 11:43:26 INFO - GECKO(9684) | 1567943006825 addons.webextension.{c7673a66-fcf6-4ae4-b927-9756cf27d9b1} WARN Unrecognized theme property found: colors.such_property
[task 2019-09-08T11:43:26.855Z] 11:43:26 INFO - GECKO(9684) | monitorConsole | [0] matched {"message":"1567943006825\taddons.webextension.{c7673a66-fcf6-4ae4-b927-9756cf27d9b1}\tWARN\tUnrecognized theme property found: colors.such_property","errorMessage":null,"cssSelectors":null,"sourceName":null,"sourceLine":null,"lineNumber":null,"columnNumber":null,"category":null,"windowID":null,"isScriptError":false,"isConsoleEvent":false,"isWarning":false,"isException":false,"isStrict":false}
[task 2019-09-08T11:43:26.904Z] 11:43:26 INFO - GECKO(9684) | monitorConsole | [0] did not match {"message":"Warning: attempting to write 6856 bytes to preference extensions.webextensions.uuids. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file. This preference will not be sent to any content processes.","errorMessage":null,"cssSelectors":null,"sourceName":null,"sourceLine":null,"lineNumber":null,"columnNumber":null,"category":null,"windowID":null,"isScriptError":false,"isConsoleEvent":false,"isWarning":false,"isException":false,"isStrict":false}
[task 2019-09-08T11:43:26.923Z] 11:43:26 INFO - GECKO(9684) | 1567943006915 addons.webextension.{735a3580-47b6-486c-9e6f-71fee5331f01} WARN Unrecognized theme property found: images.such_property
[task 2019-09-08T11:43:37.949Z] 11:43:37 INFO - GECKO(9684) | [Parent 6300, Main Thread] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file z:/build/build/src/xpcom/base/nsTraceRefcnt.cpp, line 198
[task 2019-09-08T11:43:37.949Z] 11:43:37 INFO - GECKO(9684) | [Parent 6300, Main Thread] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file z:/build/build/src/xpcom/base/nsTraceRefcnt.cpp, line 198
[task 2019-09-08T11:43:37.949Z] 11:43:37 INFO - GECKO(9684) | nsStringStats
[task 2019-09-08T11:43:37.949Z] 11:43:37 INFO - GECKO(9684) | => mAllocCount: 288486
[task 2019-09-08T11:43:37.949Z] 11:43:37 INFO - GECKO(9684) | => mReallocCount: 2
[task 2019-09-08T11:43:37.949Z] 11:43:37 INFO - GECKO(9684) | => mFreeCount: 288486
[task 2019-09-08T11:43:37.950Z] 11:43:37 INFO - GECKO(9684) | => mShareCount: 350141
[task 2019-09-08T11:43:37.950Z] 11:43:37 INFO - GECKO(9684) | => mAdoptCount: 5811
[task 2019-09-08T11:43:37.950Z] 11:43:37 INFO - GECKO(9684) | => mAdoptFreeCount: 6249
[task 2019-09-08T11:43:37.950Z] 11:43:37 INFO - GECKO(9684) | => Process ID: 6300, Thread ID: 5352
[task 2019-09-08T11:43:38.016Z] 11:43:38 INFO - TEST-INFO | Main app process: exit 0
[task 2019-09-08T11:43:38.016Z] 11:43:38 ERROR - TEST-UNEXPECTED-FAIL | toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js | leaked 1 window(s) until shutdown [url = about:blank]
[task 2019-09-08T11:43:38.017Z] 11:43:38 ERROR - TEST-UNEXPECTED-FAIL | toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js | leaked 1 window(s) until shutdown [url = chrome://browser/content/browser.xhtml]
[task 2019-09-08T11:43:38.017Z] 11:43:38 INFO - TEST-INFO | toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js | windows(s) leaked: [pid = 6300] [serial = 63], [pid = 6300] [serial = 62]
[task 2019-09-08T11:43:38.018Z] 11:43:38 INFO - TEST-INFO | toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js | This test created 1 hidden window(s)
[task 2019-09-08T11:43:38.018Z] 11:43:38 INFO - TEST-INFO | toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js | This test created 1 hidden docshell(s)
[task 2019-09-08T11:43:38.019Z] 11:43:38 INFO - TEST-INFO | toolkit/components/extensions/test/browser/browser_ext_management_themes.js | This test created 1 hidden window(s)
[task 2019-09-08T11:43:38.019Z] 11:43:38 INFO - TEST-INFO | toolkit/components/extensions/test/browser/browser_ext_management_themes.js | This test created 1 hidden docshell(s)
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 62•5 years ago
|
||
I haven't forgotten, but I cannot reproduce this locally, and there is nothing special in the logs either (well I found and filed two bugs, but they are probably not causing this issue - bug 1579943, bug 1579832).
The most unusual thing is that the log from treeherder does not contain the stack trace from bug 1579943 , which could either mean that the stack trace was discarded from the post-processed log (as the log entry is generated at the completion of the test), or that the browser window was not removed, somehow.
The test logic is similar to browser_ext_themes_ntp_colors.js, which has not caused any reports on BMO. The only difference is that the test from this bug creates and closes a new browser window. But the logic seems correct and shouldn't be causing leaks.
I'm keeping the ni on myself to investigate this further if I'm idle.
Comment 63•5 years ago
|
||
Okay Rob, thank you.
Comment hidden (Intermittent Failures Robot) |
Comment 65•5 years ago
|
||
In the last 7 days there were 38 failures associated with this bug: https://treeherder.mozilla.org/intermittent-failures.html#/bugdetails?startday=2019-09-13&endday=2019-09-20&tree=all&bug=1474041
Recent failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=267612548&repo=autoland&lineNumber=38828
Occurs on linux64, linux64-ccov, macosx1014-64, windows10-64, windows10-64-ccov, windows10-64-qr debug build types.
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 67•5 years ago
|
||
I have taken another look, and although I can still not reproduce locally, I can see a potential code path for the issue to occur:
browser.windows.create
is called by the test - https://searchfox.org/mozilla-central/rev/e3fc8f8970491aef14d3212b2d052942f4d29818/toolkit/components/extensions/test/browser/browser_ext_themes_ntp_colors_perwindow.js#112- The implementation of
browser.windows.create
waits for the window to be ready: https://searchfox.org/mozilla-central/rev/e3fc8f8970491aef14d3212b2d052942f4d29818/browser/components/extensions/parent/ext-windows.js#355-360 - While waiting, the
browser.windows.onCreated
event may propagate down to the extension - https://searchfox.org/mozilla-central/rev/e3fc8f8970491aef14d3212b2d052942f4d29818/browser/components/extensions/parent/ext-windows.js#69 - The test resumes and somehow completes very quickly, before the window is considered ready.
- The extension closes the window, and the
browser.windows.create
call is still stuck, and the closure prevents the window object from being GC'd, which results in a memory leak.
I'm going to submit a patch that prevents this from happening. If the bug goes away, then I will file a follow-up bug to fix the leaky logic in the windows.create
implementation.
Assignee | ||
Comment 68•5 years ago
|
||
The browser.windows.onCreated event is triggered before
browser.windows.create returns. Waiting until browser.windows.create has
resolved may resolve the memory leak from bug 1474041.
Comment 69•5 years ago
|
||
Comment 70•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment 73•5 years ago
|
||
bugherder uplift |
Comment 74•5 years ago
|
||
bugherder uplift |
Assignee | ||
Updated•5 years ago
|
Description
•