Open Bug 1619836 Opened 7 months ago Updated 6 months ago

High Frequency devtools/client/shared/test/browser_layoutHelpers_getBoxQuads2.js | C-div quad x position is as expected. - 80 == 130 -

Categories

(DevTools :: General, defect, P5)

defect

Tracking

(Not tracked)

People

(Reporter: intermittent-bug-filer, Assigned: bradwerth)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: intermittent-failure, leave-open)

Attachments

(4 files)

Filed by: rmaries [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=291548834&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/IPzzeanoQISXs2ASqkbgBg/runs/0/artifacts/public/logs/live_backing.log
Reftest URL: https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/IPzzeanoQISXs2ASqkbgBg/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1


[task 2020-03-04T02:32:09.563Z] 02:32:09 INFO - TEST-START | devtools/client/shared/test/browser_layoutHelpers_getBoxQuads2.js
[task 2020-03-04T02:32:09.728Z] 02:32:09 INFO - TEST-INFO | started process screencapture
[task 2020-03-04T02:32:09.950Z] 02:32:09 INFO - TEST-INFO | screencapture: exit 0
[task 2020-03-04T02:32:09.950Z] 02:32:09 INFO - Buffered messages logged at 02:32:09
[task 2020-03-04T02:32:09.951Z] 02:32:09 INFO - Entering test bound
[task 2020-03-04T02:32:09.951Z] 02:32:09 INFO - Adding a new tab with URL: http://example.com/browser/devtools/client/shared/test/doc_layoutHelpers_getBoxQuads2-a.html
[task 2020-03-04T02:32:09.952Z] 02:32:09 INFO - Tab added and finished loading
[task 2020-03-04T02:32:09.954Z] 02:32:09 INFO - Running tests
[task 2020-03-04T02:32:09.954Z] 02:32:09 INFO - Document is offset 0, 4440 from window.
[task 2020-03-04T02:32:09.954Z] 02:32:09 INFO - Checking C-div.
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - Buffered messages finished
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - TEST-UNEXPECTED-FAIL | devtools/client/shared/test/browser_layoutHelpers_getBoxQuads2.js | C-div quad x position is as expected. - 80 == 130 -
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - Stack trace:
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - resource://testing-common/content-task.js line 110 > eval:null:38
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - TEST-UNEXPECTED-FAIL | devtools/client/shared/test/browser_layoutHelpers_getBoxQuads2.js | C-div quad y position is as expected. - 180 == 230 -
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - Stack trace:
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - resource://testing-common/content-task.js line 110 > eval:null:43
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - Checking E-div.
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - TEST-UNEXPECTED-FAIL | devtools/client/shared/test/browser_layoutHelpers_getBoxQuads2.js | E-div quad x position is as expected. - 380 == 430 -
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - Stack trace:
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - resource://testing-common/content-task.js line 110 > eval:null:38
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - TEST-UNEXPECTED-FAIL | devtools/client/shared/test/browser_layoutHelpers_getBoxQuads2.js | E-div quad y position is as expected. - 210 == 260 -
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - Stack trace:
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - resource://testing-common/content-task.js line 110 > eval:null:43
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - Leaving test bound
[task 2020-03-04T02:32:09.955Z] 02:32:09 INFO - TEST-PASS | devtools/client/shared/test/browser_layoutHelpers_getBoxQuads2.js | The main process DevToolsServer has no pending connection when the test ends -

Brad, could you take a look?

Flags: needinfo?(bwerth)
Regressed by: 1593756
Duplicate of this bug: 1619849

This has started having a high frequency, possibly starting with Bug 1593756 as Razvan mentioned.
Closed the other bug created as duplicate.

Summary: Intermittent TV tier 2 devtools/client/shared/test/browser_layoutHelpers_getBoxQuads2.js | C-div quad x position is as expected. - 80 == 130 - → High Frequency devtools/client/shared/test/browser_layoutHelpers_getBoxQuads2.js | C-div quad x position is as expected. - 80 == 130 -

This test was just added to test a new API. I don't want to rollback the API so I'll have to disable this test while I figure it out. I'll push a patch that does so, and keep this bug open.

Assignee: nobody → bwerth
Flags: needinfo?(bwerth)
Keywords: leave-open
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d8b8a1c04574
Part 1: Disable intermittent test of new getBoxQuadsFromWindow API. r=emilio

I think the issue is that GetBoxQuadsFromWindowOrigin needs to use the parent app units per dev pixel after transforming quads by the ChildToParent matrix. PresShell::ScrollFrameRectIntoView seems to show the correct math. The challenge is that the call from the content process has no way to get this information. Perhaps the paired calls to GetBoxQuadsFromWindowOrigin will need to be augmented by an additional call to send this information to the content process.

Or the issue is that the scaling factor is wrong: it's not considering AppUnitsPerCSSPixel, and that's clearly wrong.

Depends on D65412

Attachment #9130912 - Attachment description: Bug 1619836 Part 2: Make the test browser_layoutHelpers_getBoxQuads2.js more informative. → Bug 1619836 Part 2: Make the test browser_layoutHelpers_getBoxQuads2.js more informative and forgiving.

(In reply to Brad Werth [:bradwerth] from comment #7)

I think the issue is that GetBoxQuadsFromWindowOrigin needs to use the parent app units per dev pixel after transforming quads by the ChildToParent matrix. PresShell::ScrollFrameRectIntoView seems to show the correct math. The challenge is that the call from the content process has no way to get this information. Perhaps the paired calls to GetBoxQuadsFromWindowOrigin will need to be augmented by an additional call to send this information to the content process.

I don't quite understand why the test intermittently fails if it's caused by the units inconsistency? My guess is that the transform matrix hasn't arrived to the OOP iframe's process. We probably need to use waitUntilApzState before processing the test.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #14)

I don't quite understand why the test intermittently fails if it's caused by the units inconsistency? My guess is that the transform matrix hasn't arrived to the OOP iframe's process. We probably need to use waitUntilApzState before processing the test.

I'm not sure if it is intermittent -- it might have been perma-fail on some platforms. The math seems wrong given that it doesn't consider AppUnitsPerCSSPixel, and only uses AppUnitsPerDevPixel. https://phabricator.services.mozilla.com/D65412 addresses that mistake in the original implementation. The try run at https://treeherder.mozilla.org/#/jobs?repo=try&revision=f1b01caada7edd0f4a1a64b43b700aaa4237a46c doesn't show any failures, and I've triggered the macOS job multiple times there.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #18)

It's definitely intermittent.

Okay, I'll update the patch to add a call to waitUntilApzStable and make a new repeated try run on macOS.

Attachment #9130913 - Attachment description: Bug 1619836 Part 3: Change GetBoxQuadsFromWindowOrigin to include necessary factor of AppUnitsPerCSSPixel(). → Bug 1619836 Part 2: Change GetBoxQuadsFromWindowOrigin to include necessary factor of AppUnitsPerCSSPixel().
Attachment #9130912 - Attachment description: Bug 1619836 Part 2: Make the test browser_layoutHelpers_getBoxQuads2.js more informative and forgiving. → Bug 1619836 Part 3: Make the test browser_layoutHelpers_getBoxQuads2.js more informative and forgiving.

Brad, I'd suggest to open a new browser window with enabling fission just like this test, so that we don't need to care about the (intermittent) failure and when we switch to use the new API all places in devtools, we can test it in non fission browser.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #22)

Brad, I'd suggest to open a new browser window with enabling fission just like this test, so that we don't need to care about the (intermittent) failure and when we switch to use the new API all places in devtools, we can test it in non fission browser.

I'll attempt to make that change to the test. With the most recent patches, we no longer have intermittents because the call to waitUntilApzStable seems to work. What we have is very consistent precision errors on macOS above our tolerance level of 1 pixel. I'll attempt to recreate those problems locally so I can inspect the transforms.

Per conversation with Hiro, the test has been made to force a Fission window. The API is designed for a Fission environment, and the precision errors on macOS do not occur in a Fission window.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=16afcbb2868aea7503645b21ee57f68862f826ec

Blocks: 1624653
Blocks: 1624659
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0f8f03c49e42
Part 2: Change GetBoxQuadsFromWindowOrigin to include necessary factor of AppUnitsPerCSSPixel(). r=hiro
https://hg.mozilla.org/integration/autoland/rev/42e2ca98079f
Part 3: Make the test browser_layoutHelpers_getBoxQuads2.js more informative and forgiving. r=hiro
https://hg.mozilla.org/integration/autoland/rev/ca9276ce741d
Part 4: Re-enable the test. r=hiro
You need to log in before you can comment on or make changes to this bug.