Closed Bug 1725756 Opened 3 years ago Closed 2 years ago

High frequency browser/base/content/test/general/browser_minimize.js | Docshell should be active when starting the test -

Categories

(Firefox :: General, defect, P5)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1775725

People

(Reporter: intermittent-bug-filer, Unassigned)

References

Details

(Keywords: intermittent-failure, Whiteboard: [retriggered][stockwell disabled])

Attachments

(1 file)

Filed by: cbrindusan [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=348420064&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/CGHtlGvXSzO60b5HwXQ6KA/runs/0/artifacts/public/logs/live_backing.log


[task 2021-08-14T07:40:39.996Z] 07:40:39     INFO - TEST-START | browser/base/content/test/general/browser_minimize.js
[task 2021-08-14T07:40:39.997Z] 07:40:39     INFO - TEST-INFO | started process screencapture
[task 2021-08-14T07:40:40.110Z] 07:40:40     INFO - TEST-INFO | screencapture: exit 0
[task 2021-08-14T07:40:40.110Z] 07:40:40     INFO - Buffered messages logged at 07:40:39
[task 2021-08-14T07:40:40.111Z] 07:40:40     INFO - Entering test bound 
[task 2021-08-14T07:40:40.111Z] 07:40:40     INFO - Buffered messages finished
[task 2021-08-14T07:40:40.111Z] 07:40:40     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_minimize.js | Docshell should be active when starting the test - 

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Navigation' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: General → DOM: Navigation
Product: Firefox → Core

Update:
There have been 55 failures within the last 7 days, all on OS X 11 WebRender Shippable opt.
Recent failure log: https://treeherder.mozilla.org/logviewer?job_id=372488365&repo=autoland&lineNumber=2682

[task 2022-03-27T10:42:07.688Z] 10:42:07     INFO - TEST-START | browser/base/content/test/general/browser_minimize.js
[task 2022-03-27T10:42:07.690Z] 10:42:07     INFO - TEST-INFO | started process screencapture
[task 2022-03-27T10:42:07.823Z] 10:42:07     INFO - TEST-INFO | screencapture: exit 0
[task 2022-03-27T10:42:07.823Z] 10:42:07     INFO - Buffered messages logged at 10:42:07
[task 2022-03-27T10:42:07.823Z] 10:42:07     INFO - Entering test bound 
[task 2022-03-27T10:42:07.823Z] 10:42:07     INFO - Buffered messages finished
[task 2022-03-27T10:42:07.823Z] 10:42:07     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_minimize.js | Docshell should be active when starting the test - 
[task 2022-03-27T10:42:07.824Z] 10:42:07     INFO - Stack trace:
[task 2022-03-27T10:42:07.824Z] 10:42:07     INFO - chrome://mochikit/content/browser-test.js:test_ok:1394
[task 2022-03-27T10:42:07.824Z] 10:42:07     INFO - chrome://mochitests/content/browser/browser/base/content/test/general/browser_minimize.js:null:12
[task 2022-03-27T10:42:07.824Z] 10:42:07     INFO - chrome://mochikit/content/browser-test.js:handleTask:989
[task 2022-03-27T10:42:07.824Z] 10:42:07     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1061
[task 2022-03-27T10:42:07.824Z] 10:42:07     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1189
[task 2022-03-27T10:42:07.824Z] 10:42:07     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:978
[task 2022-03-27T10:42:07.824Z] 10:42:07     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1041
[task 2022-03-27T10:42:07.824Z] 10:42:07     INFO - Calling window.minimize
[task 2022-03-27T10:42:08.268Z] 10:42:08     INFO - TEST-PASS | browser/base/content/test/general/browser_minimize.js | Docshell should be Inactive - 
[task 2022-03-27T10:42:08.268Z] 10:42:08     INFO - Calling window.restore
[task 2022-03-27T10:42:08.850Z] 10:42:08     INFO - TEST-PASS | browser/base/content/test/general/browser_minimize.js | Docshell should be active again - 
[task 2022-03-27T10:42:08.850Z] 10:42:08     INFO - Leaving test bound 
[task 2022-03-27T10:42:08.851Z] 10:42:08     INFO - GECKO(2922) | MEMORY STAT | vsize 419161MB | residentFast 649MB | heapAllocated 190MB
[task 2022-03-27T10:42:08.852Z] 10:42:08     INFO - TEST-OK | browser/base/content/test/general/browser_minimize.js | took 1164ms
[task 2022-03-27T10:42:08.857Z] 10:42:08     INFO - checking window state
[task 2022-03-27T10:42:08.860Z] 10:42:08     INFO - TEST-START | browser/base/content/test/general/browser_modifiedclick_inherit_principal.js
Whiteboard: [stockwell needswork:owner]

Hi Tsai! Can you please take a look at this? Maybe you could help us assign it to someone.
Thank you!

Flags: needinfo?(htsai)

Hi Florian,
Your footprint was displayed in the latest log so I guess this may be at your wheelhouse. Care to take a look at this? Thank you.

Component: DOM: Navigation → General
Flags: needinfo?(htsai) → needinfo?(florian)
Product: Core → Firefox

Retriggers - only 2 are green.

Summary: Intermittent browser/base/content/test/general/browser_minimize.js | Docshell should be active when starting the test - → High frequency browser/base/content/test/general/browser_minimize.js | Docshell should be active when starting the test -

Nika can you take a look at this or pass on to someone else? I'm not sure why the browser would be randomly inactive at the start of the test.

Flags: needinfo?(dtownsend) → needinfo?(nika)

(In reply to Hsin-Yi Tsai [:hsinyi] from comment #36)

Care to take a look at this? Thank you.

The failure only happens on the M1 / OSX 11 jobs. I tried to reproduce locally but couldn't. I tried to reproduce on try with the profiler enabled but that also failed (the generate-profile-macosx64-shippable/opt jobs failed, and they are needed to produce shippable builds on which we can run tests).

Flags: needinfo?(florian)

Docshell active status is managed by frontend and widget code. I'm guessing that something from a previous test ended up making the docshell inactive, and it wasn't re-activated before this test was run.

If you want to find out where the browser is becoming inactive, you could add some logs to https://searchfox.org/mozilla-central/rev/26a1b0fce12e6dd495a954c542bb1e7bd6e0d548/docshell/base/BrowsingContext.cpp#2666 in the parent process which log out the BC's ID and the new ExplicitActive status, then in the test before checking log out the ID of the BrowsingContext which is being checked. Looking back through the log you may be able to find when the BC is being set to inactive.

If this invariant should be preserved before every single browser test, it might also be possible to add a check in waitForWindowsState to make sure that the active tab's docshell is active before starting the next test. You'll probably want to do it after waitForFocus (https://searchfox.org/mozilla-central/rev/26a1b0fce12e6dd495a954c542bb1e7bd6e0d548/testing/mochitest/browser-test.js#1134) to make sure the window is raised. This might tell you more accurately when the invariant is being broken which could help narrow down the issue.

I unfortunately don't know much at all about the logic which decides when the docshell should be active or not (that is almost entirely controlled by frontend code), so I don't know why this would be happening and why it would specifically happen on macos.

Flags: needinfo?(nika)
Assignee: nobody → apavel
Status: NEW → ASSIGNED
Assignee: apavel → nobody
Status: ASSIGNED → NEW
Keywords: leave-open
Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/19002529dd58
disable browser_minimize.js on mac opt r=aryx DONTBUILD
Whiteboard: [retriggered][stockwell disable-recommended] → [retriggered][stockwell disabled]
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: