Intermittent browser_bug461710.js | leaked 2 window(s) until shutdown [url = chrome://browser/content/browser.xul][url = about:blank]

RESOLVED FIXED in Firefox 55

Status

()

Toolkit
Places
P1
normal
RESOLVED FIXED
2 years ago
5 months ago

People

(Reporter: RyanVM, Assigned: mak)

Tracking

(Blocks: 1 bug, {intermittent-failure, mlk})

unspecified
mozilla56
intermittent-failure, mlk
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox-esr52 wontfix, firefox54 wontfix, firefox55 fixed, firefox56 fixed)

Details

(Whiteboard: [stockwell fixed:logic][fxsearch])

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
https://treeherder.mozilla.org/logviewer.html#?job_id=25442237&repo=mozilla-inbound

16:44:11  WARNING -  TEST-UNEXPECTED-FAIL | toolkit/components/places/tests/browser/browser_bug461710.js | leaked 2 window(s) until shutdown [url = chrome://browser/content/browser.xul]
16:44:11  WARNING -  TEST-UNEXPECTED-FAIL | toolkit/components/places/tests/browser/browser_bug461710.js | leaked 2 window(s) until shutdown [url = about:blank]
16:44:11     INFO -  TEST-INFO | toolkit/components/places/tests/browser/browser_bug461710.js | windows(s) leaked: [pid = 3632] [serial = 82], [pid = 3632] [serial = 83], [pid = 3632] [serial = 96], [pid = 3632] [serial = 95]

Comment 1

a year ago
Bulk assigning P3 to all open intermittent bugs without a priority set in Firefox components per bug 1298978.
Priority: -- → P3

Comment 2

9 months ago
16 failures in 812 pushes (0.02 failures/push) were associated with this bug in the last 7 days.  
Repository breakdown:
* autoland: 8
* mozilla-inbound: 4
* mozilla-central: 2
* graphics: 2

Platform breakdown:
* linux32: 9
* linux64: 7

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-02-20&endday=2017-02-26&tree=all

Comment 3

9 months ago
I hope this is similar to bug 1332783.
Assignee: nobody → gbrown

Comment 4

9 months ago
21 failures in 783 pushes (0.027 failures/push) were associated with this bug in the last 7 days.  
Repository breakdown:
* autoland: 10
* mozilla-inbound: 4
* try: 3
* mozilla-central: 2
* oak: 1
* graphics: 1

Platform breakdown:
* linux32: 11
* linux64: 10

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-02-27&endday=2017-03-05&tree=all

Comment 5

8 months ago
8 failures in 790 pushes (0.01 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* mozilla-inbound: 2
* mozilla-aurora: 2
* graphics: 2
* mozilla-central: 1
* autoland: 1

Platform breakdown:
* linux64: 7
* linux32: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-03-06&endday=2017-03-12&tree=all

Comment 6

8 months ago
(In reply to Geoff Brown [:gbrown] from comment #3)
> I hope this is similar to bug 1332783.

Actually, it seems different and I'm not making progress...will leave this for someone else.
Assignee: gbrown → nobody

Comment 7

8 months ago
22 failures in 777 pushes (0.028 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* autoland: 9
* mozilla-inbound: 8
* try: 2
* mozilla-aurora: 2
* mozilla-central: 1

Platform breakdown:
* linux64: 13
* linux32: 9

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-03-13&endday=2017-03-19&tree=all

Comment 8

8 months ago
17 failures in 898 pushes (0.019 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* autoland: 7
* try: 4
* mozilla-inbound: 3
* mozilla-central: 2
* mozilla-aurora: 1

Platform breakdown:
* linux64: 12
* linux32: 5

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-03-20&endday=2017-03-26&tree=all

Comment 9

8 months ago
23 failures in 845 pushes (0.027 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* mozilla-aurora: 7
* autoland: 6
* mozilla-inbound: 5
* try: 3
* mozilla-central: 1
* graphics: 1

Platform breakdown:
* linux32: 13
* linux64: 10

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-03-27&endday=2017-04-02&tree=all

Comment 10

7 months ago
12 failures in 867 pushes (0.014 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* autoland: 4
* try: 3
* oak: 2
* mozilla-aurora: 2
* mozilla-inbound: 1

Platform breakdown:
* linux64: 8
* linux32: 4

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-04-03&endday=2017-04-09&tree=all

Comment 11

7 months ago
8 failures in 894 pushes (0.009 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* autoland: 7
* mozilla-central: 1

Platform breakdown:
* linux32: 7
* linux64: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-04-10&endday=2017-04-16&tree=all

Comment 12

7 months ago
10 failures in 817 pushes (0.012 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* autoland: 8
* mozilla-inbound: 1
* mozilla-aurora: 1

Platform breakdown:
* linux32: 9
* linux64: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-04-17&endday=2017-04-23&tree=all

Comment 13

7 months ago
19 failures in 883 pushes (0.022 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* autoland: 9
* mozilla-inbound: 4
* try: 2
* mozilla-central: 2
* mozilla-beta: 1
* graphics: 1

Platform breakdown:
* linux32: 11
* linux64: 8

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-04-24&endday=2017-04-30&tree=all

Comment 14

6 months ago
16 failures in 770 pushes (0.021 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* mozilla-inbound: 6
* try: 2
* oak: 2
* mozilla-central: 2
* mozilla-beta: 2
* autoland: 2

Platform breakdown:
* linux32: 13
* linux64: 3

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-05-01&endday=2017-05-07&tree=all

Comment 15

6 months ago
25 failures in 879 pushes (0.028 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* mozilla-inbound: 9
* autoland: 7
* try: 4
* mozilla-central: 4
* mozilla-beta: 1

Platform breakdown:
* linux32: 18
* linux64: 7

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-05-08&endday=2017-05-14&tree=all

Comment 16

6 months ago
17 failures in 777 pushes (0.022 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* mozilla-inbound: 7
* autoland: 5
* try: 3
* mozilla-central: 1
* graphics: 1

Platform breakdown:
* linux32: 9
* linux64: 6
* osx-10-10: 2

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-05-15&endday=2017-05-21&tree=all

Comment 17

6 months ago
27 failures in 891 pushes (0.03 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* autoland: 13
* try: 5
* mozilla-inbound: 5
* mozilla-central: 3
* graphics: 1

Platform breakdown:
* linux32: 23
* linux64: 4

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-05-22&endday=2017-05-28&tree=all

Comment 18

6 months ago
25 failures in 820 pushes (0.03 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* autoland: 15
* mozilla-inbound: 4
* try: 3
* mozilla-central: 3

Platform breakdown:
* linux32: 19
* linux64: 5
* windows7-32-vm: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-05-29&endday=2017-06-04&tree=all

Comment 19

5 months ago
34 failures in 864 pushes (0.039 failures/push) were associated with this bug in the last 7 days. 

This is the #46 most frequent failure this week.  

** This failure happened more than 30 times this week! Resolving this bug is a high priority. **

** Try to resolve this bug as soon as possible. If unresolved for 2 weeks, the affected test(s) may be disabled. ** 

Repository breakdown:
* mozilla-inbound: 12
* autoland: 11
* try: 5
* mozilla-central: 4
* mozilla-esr52: 1
* cedar: 1

Platform breakdown:
* linux64: 22
* linux32: 8
* osx-10-10: 3
* windows7-32-vm: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-06-05&endday=2017-06-11&tree=all

Comment 20

5 months ago
33 failures in 814 pushes (0.041 failures/push) were associated with this bug in the last 7 days.   

** This failure happened more than 30 times this week! Resolving this bug is a high priority. **

** Try to resolve this bug as soon as possible. If unresolved for 2 weeks, the affected test(s) may be disabled. ** 

Repository breakdown:
* autoland: 16
* mozilla-inbound: 9
* try: 3
* mozilla-central: 3
* mozilla-beta: 2

Platform breakdown:
* linux64: 21
* linux32: 12

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-06-12&endday=2017-06-18&tree=all
This has been consistently failing 20+ times/week for many weeks, the last 2 weeks 30+ times.  As this is a leak we only detect that on debug, and this looks to be a mix of e10s/non-e10s.  We typically run this test every 5th push, so the failure rate should be much higher if we did run this every push.

::mak, I see you are the triage owner for the toolkit:places component, can you help find someone to look into this sometime in the next 2 weeks and come to a resolution (fix, reduced frequency, disabled)?
Flags: needinfo?(mak77)
Whiteboard: [stockwell needswork]
(Assignee)

Comment 22

5 months ago
This is likely due to the usage of a private browsing window, similarly to other leaks in the past (comment 3), it's likely we somehow create a cycle there, but it may not be trivial to find that. Especially finding the underlying code in PB that may create this cycle could be very expensive.

We could try some things on Try to keep references to windows as short as possible and see if that helps, for example now each test object keeps a reference to a window.
It may help or not, I don't have further ideas and it sounds hard to reproduce this.

I could eventually try to do some test pushes on Try and see in the next days.
Priority: P3 → P1
Whiteboard: [stockwell needswork] → [stockwell needswork][fxsearch]
(Assignee)

Comment 23

5 months ago
Doing some tests, but no promises, this is hard to reproduce.
One thought I had is that this test runs after browser_bug399606.js, that is another intermittent... So I'll try to cleanup both and see what happens.

We could also just disable this test on linux as an alternative, since it's where it happens more often.
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Flags: needinfo?(mak77)
thanks ::mak!
Comment hidden (mozreview-request)
(Assignee)

Comment 26

5 months ago
I may be on to something:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4d46e9f4b538ae2b93a11118f2745e3ca07f41d1

Comment 27

5 months ago
mozreview-review
Comment on attachment 8880177 [details]
Bug 1263378 - Intermittent leaks from browser_bug461710.js.

https://reviewboard.mozilla.org/r/151540/#review156784

Looks reasonable, but I'm worried about the browserLoaded symantics as mentioned below.

::: testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm:265
(Diff revision 1)
>     *
>     * @return {Promise}
>     * @resolves When a load event is triggered for the browser.
>     */
>    browserLoaded(browser, includeSubFrames=false, wantLoad=null) {
> +    // Passing a url as second argument is a common mistake we shoudl prevent.

typo: should

::: toolkit/components/places/tests/browser/browser_bug399606.js:44
(Diff revision 1)
> -      let uri = URIs.shift();
> -      loadCount = 0;
> -      gBrowser.addEventListener("DOMContentLoaded", handleLoad, true);
> -      gBrowser.loadURI(uri);
> +    gBrowser.loadURI(uri);
> -    } else {
> -      confirm_results();
> +    await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, uri);
> +    await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, uri);

browserLoaded just waits for the browser to load, so I don't think this is actually loading three times, I think it is just adding listeners three times (and somehow manages to resolve, which is strange).
Attachment #8880177 - Flags: review?(standard8)
(Assignee)

Comment 28

5 months ago
(In reply to Mark Banner (:standard8) from comment #27)
> browserLoaded just waits for the browser to load, so I don't think this is
> actually loading three times, I think it is just adding listeners three
> times (and somehow manages to resolve, which is strange).

hm, but each time the previous load completed, since we await.
From what I see browserLoaded waits for a load event from content (forwarded through "browser-test-utils:loadEvent"), so I don't see why it shouldn't work.
I start a load, wait for the load event, when I get it I register for another load event, and so on.
I don't think this code may register 3 events for the same load, but maybe I'm missing something :(

From my local testing it works as expected, I see the tab reloading thrice, and then being closed.

Do you have an alternative in mind?
Flags: needinfo?(standard8)
(In reply to Marco Bonardo [::mak] from comment #28)
> (In reply to Mark Banner (:standard8) from comment #27)
> > browserLoaded just waits for the browser to load, so I don't think this is
> > actually loading three times, I think it is just adding listeners three
> > times (and somehow manages to resolve, which is strange).
> 
> hm, but each time the previous load completed, since we await.
> From what I see browserLoaded waits for a load event from content (forwarded
> through "browser-test-utils:loadEvent"), so I don't see why it shouldn't
> work.
> I start a load, wait for the load event, when I get it I register for
> another load event, and so on.
> I don't think this code may register 3 events for the same load, but maybe
> I'm missing something :(
> 
> From my local testing it works as expected, I see the tab reloading thrice,
> and then being closed.

Ok, so I totally missed the fact that the html files are reloading themselves. Makes sense now...
Flags: needinfo?(standard8)

Comment 30

5 months ago
mozreview-review
Comment on attachment 8880177 [details]
Bug 1263378 - Intermittent leaks from browser_bug461710.js.

https://reviewboard.mozilla.org/r/151540/#review156818

Looks good now! r=Standard8 with the nits addressed.

::: testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm:267
(Diff revision 1)
>     * @resolves When a load event is triggered for the browser.
>     */
>    browserLoaded(browser, includeSubFrames=false, wantLoad=null) {
> +    // Passing a url as second argument is a common mistake we shoudl prevent.
> +    if (includeSubFrames && typeof includeSubFrames != "boolean")
> +      throw("The second argument to browserLoaded should be a boolean.");

nit: please include braces as per the general style in the rest of the file.
Attachment #8880177 - Flags: review+
Comment hidden (mozreview-request)

Comment 32

5 months ago
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s 32e6e30110e1 -d 6304c0ecb59d: rebasing 403505:32e6e30110e1 "Bug 1263378 - Intermittent leaks from browser_bug461710.js. r=standard8" (tip)
merging testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
merging uriloader/exthandler/tests/mochitest/browser_web_protocol_handlers.js
warning: conflicts while merging uriloader/exthandler/tests/mochitest/browser_web_protocol_handlers.js! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Comment hidden (mozreview-request)

Comment 34

5 months ago
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/903dc6eaad3f
Intermittent leaks from browser_bug461710.js. r=standard8
(Assignee)

Comment 35

5 months ago
let's hope this sticks, potentially it may fix more than one intermittent since 5 tests were misusing browserLoaded.
(Assignee)

Updated

5 months ago
Blocks: 1335700
(Assignee)

Updated

5 months ago
Blocks: 1372802
(Assignee)

Updated

5 months ago
Blocks: 1359227

Comment 36

5 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/903dc6eaad3f
Status: ASSIGNED → RESOLVED
Last Resolved: 5 months ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
(Reporter)

Comment 37

5 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/a5e2cade2728
status-firefox55: --- → fixed
Flags: in-testsuite+
(Reporter)

Updated

5 months ago
status-firefox54: --- → wontfix
status-firefox-esr52: --- → wontfix

Comment 38

5 months ago
26 failures in 892 pushes (0.029 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* mozilla-inbound: 9
* autoland: 9
* try: 5
* mozilla-central: 2
* mozilla-beta: 1

Platform breakdown:
* linux32: 16
* linux64: 10

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-06-19&endday=2017-06-25&tree=all

Comment 39

5 months ago
1 failures in 718 pushes (0.001 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* try: 1

Platform breakdown:
* linux64: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1263378&startday=2017-06-26&endday=2017-07-02&tree=all

Updated

5 months ago
Whiteboard: [stockwell needswork][fxsearch] → [stockwell fixed][fxsearch]
Whiteboard: [stockwell fixed][fxsearch] → [stockwell fixed:logic][fxsearch]
You need to log in before you can comment on or make changes to this bug.