Closed Bug 1671488 Opened 4 years ago Closed 4 years ago

Intermittent Windows Webrender docshell/test/browser/browser_tab_replace_while_loading.js | Uncaught exception received from previously timed out test

Categories

(Core :: DOM: Navigation, defect, P5)

defect

Tracking

()

RESOLVED INCOMPLETE
Tracking Status
firefox-esr78 --- unaffected
firefox81 --- unaffected
firefox82 --- unaffected
firefox83 --- wontfix
firefox84 --- fixed

People

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

References

(Regression)

Details

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

Attachments

(1 file)

Filed by: malexandru [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=318759305&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/WlNs5-iOQoiS-wmTfshHBQ/runs/0/artifacts/public/logs/live_backing.log


[task 2020-10-15T19:06:13.611Z] 19:06:13 INFO - TEST-START | docshell/test/browser/browser_tab_replace_while_loading.js
[task 2020-10-15T19:06:58.626Z] 19:06:58 INFO - TEST-INFO | started process screenshot
[task 2020-10-15T19:06:58.717Z] 19:06:58 INFO - TEST-INFO | screenshot: exit 0
[task 2020-10-15T19:06:58.718Z] 19:06:58 INFO - Buffered messages logged at 19:06:13
[task 2020-10-15T19:06:58.719Z] 19:06:58 INFO - Entering test bound test_window_open_about_blank
[task 2020-10-15T19:06:58.719Z] 19:06:58 INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "http://mochi.test:8888/browser/docshell/test/browser/file_open_about_blank.html" line: 0}]
[task 2020-10-15T19:06:58.719Z] 19:06:58 INFO - Opening about:blank using a click
[task 2020-10-15T19:06:58.720Z] 19:06:58 INFO - Waiting for the second tab to be opened
[task 2020-10-15T19:06:58.720Z] 19:06:58 INFO - Detaching tab
[task 2020-10-15T19:06:58.720Z] 19:06:58 INFO - Buffered messages logged at 19:06:14
[task 2020-10-15T19:06:58.720Z] 19:06:58 INFO - Asserting document is visible
[task 2020-10-15T19:06:58.721Z] 19:06:58 INFO - TEST-PASS | docshell/test/browser/browser_tab_replace_while_loading.js | Document should be visible - "visible" == "visible" -
[task 2020-10-15T19:06:58.721Z] 19:06:58 INFO - Leaving test bound test_window_open_about_blank
[task 2020-10-15T19:06:58.721Z] 19:06:58 INFO - Entering test bound test_detach_loading_page
[task 2020-10-15T19:06:58.721Z] 19:06:58 INFO - Buffered messages finished
[task 2020-10-15T19:06:58.721Z] 19:06:58 INFO - TEST-UNEXPECTED-FAIL | docshell/test/browser/browser_tab_replace_while_loading.js | Test timed out -
[task 2020-10-15T19:06:58.721Z] 19:06:58 INFO - GECKO(6752) | MEMORY STAT | vsize 2104343MB | vsizeMaxContiguous 66302653MB | residentFast 346MB | heapAllocated 82MB
[task 2020-10-15T19:06:58.721Z] 19:06:58 INFO - TEST-OK | docshell/test/browser/browser_tab_replace_while_loading.js | took 45052ms
[task 2020-10-15T19:06:58.722Z] 19:06:58 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-10-15T19:06:58.722Z] 19:06:58 INFO - TEST-UNEXPECTED-FAIL | docshell/test/browser/browser_tab_replace_while_loading.js | Found a tab after previous test timed out: http://mochi.test:8888/browser/docshell/test/browser/file_slow_load.sjs -
[task 2020-10-15T19:06:58.722Z] 19:06:58 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-10-15T19:06:58.722Z] 19:06:58 INFO - TEST-UNEXPECTED-FAIL | docshell/test/browser/browser_tab_replace_while_loading.js | Found a tab after previous test timed out: about:blank -
[task 2020-10-15T19:06:58.722Z] 19:06:58 INFO - checking window state
[task 2020-10-15T19:06:58.727Z] 19:06:58 INFO - TEST-START | docshell/test/browser/browser_tab_touch_events.js
[task 2020-10-15T19:06:59.039Z] 19:06:59 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-10-15T19:06:59.039Z] 19:06:59 INFO - Buffered messages logged at 19:06:58
[task 2020-10-15T19:06:59.039Z] 19:06:59 INFO - Entering test bound
[task 2020-10-15T19:06:59.039Z] 19:06:59 INFO - Buffered messages finished
[task 2020-10-15T19:06:59.040Z] 19:06:59 INFO - TEST-UNEXPECTED-FAIL | docshell/test/browser/browser_tab_replace_while_loading.js | Uncaught exception received from previously timed out test - at chrome://mochitests/content/browser/docshell/test/browser/browser_tab_replace_while_loading.js:58 - ReferenceError: info is not defined
[task 2020-10-15T19:06:59.040Z] 19:06:59 INFO - Stack trace:
[task 2020-10-15T19:06:59.040Z] 19:06:59 INFO - test_detach_loading_page@chrome://mochitests/content/browser/docshell/test/browser/browser_tab_replace_while_loading.js:58:3
[task 2020-10-15T19:06:59.042Z] 19:06:59 INFO - TEST-PASS | docshell/test/browser/browser_tab_touch_events.js | touchEventsOverride flag should be initially set to NONE - 2 == 2 -
[task 2020-10-15T19:06:59.042Z] 19:06:59 INFO - TEST-PASS | docshell/test/browser/browser_tab_touch_events.js | touchEventsOverride flag should be changed to DISABLED - 0 == 0 -
[task 2020-10-15T19:06:59.042Z] 19:06:59 INFO - TEST-PASS | docshell/test/browser/browser_tab_touch_events.js | touchEventsOverride flag should be passed on to frames. - 0 == 0 -
[task 2020-10-15T19:06:59.052Z] 19:06:59 INFO - TEST-PASS | docshell/test/browser/browser_tab_touch_events.js | Newly created frames should use the new touchEventsOverride flag - 0 == 0 -
[task 2020-10-15T19:06:59.062Z] 19:06:59 INFO - TEST-PASS | docshell/test/browser/browser_tab_touch_events.js | New touchEventsOverride flag should persist across reloads - 0 == 0 -
[task 2020-10-15T19:06:59.071Z] 19:06:59 INFO - Leaving test bound
[task 2020-10-15T19:06:59.132Z] 19:06:59 INFO - GECKO(6752) | MEMORY STAT | vsize 2104338MB | vsizeMaxContiguous 66302653MB | residentFast 348MB | heapAllocated 84MB
[task 2020-10-15T19:06:59.132Z] 19:06:59 INFO - TEST-OK | docshell/test/browser/browser_tab_touch_events.js | took 398ms
[task 2020-10-15T19:06:59.137Z] 19:06:59 INFO - checking window state
[task 2020-10-15T19:06:59.147Z] 19:06:59 INFO - TEST-START | docshell/test/browser/browser_timelineMarkers-01.js

Summary: Intermittent docshell/test/browser/browser_tab_replace_while_loading.js | Uncaught exception received from previously timed out test - at chrome://mochitests/content/browser/docshell/test/browser/browser_tab_replace_while_loading.js:58 - ReferenceError: i → Intermittent Windows Webrender docshell/test/browser/browser_tab_replace_while_loading.js | Uncaught exception received from previously timed out test
Flags: needinfo?(sefeng)
Keywords: regression
Regressed by: 1669239
Summary: Intermittent Windows Webrender docshell/test/browser/browser_tab_replace_while_loading.js | Uncaught exception received from previously timed out test → Intermittent docshell/test/browser/browser_tab_replace_while_loading.js | Uncaught exception received from previously timed out test - at chrome://mochitests/content/browser/docshell/test/browser/browser_tab_replace_while_loading.js:58 - ReferenceError: i
Has Regression Range: --- → yes
Summary: Intermittent docshell/test/browser/browser_tab_replace_while_loading.js | Uncaught exception received from previously timed out test - at chrome://mochitests/content/browser/docshell/test/browser/browser_tab_replace_while_loading.js:58 - ReferenceError: i → Intermittent Windows Webrender docshell/test/browser/browser_tab_replace_while_loading.js | Uncaught exception received from previously timed out test

Set release status flags based on info from the regressing bug 1669239

Depends on: 1671592
Whiteboard: [retriggered][stockwell needswork:owner]

I think the bug here is that when the scheduled tick that happens in the content process, it's possible that the top-level widget is already detached at here, so no paint happens. And because of the loss of this paint, MozLayerTreeReady isn't going to be dispatched, so the test timeouts.

Jim, you seem to know these code well, Can I get your opinions about this bug?

Flags: needinfo?(sefeng) → needinfo?(jmathies)

Emilio, would you have an opinion on this bug? Thanks

Flags: needinfo?(emilio)

(In reply to Sean Feng [:sefeng] from comment #6)

I think the bug here is that when the scheduled tick that happens in the content process, it's possible that the top-level widget is already detached at here, so no paint happens. And because of the loss of this paint, MozLayerTreeReady isn't going to be dispatched, so the test timeouts.

Why does MozLayerTreeReady not firing cause the test to timeout Sean? I'm confused. But if MozLayerTreeReady is an expectation from the call to RecvRenderLayers even if we detach the tab, that seems like a bug that could cause tab spinners.

Flags: needinfo?(emilio) → needinfo?(sefeng)

It timeouts because this call never returns https://searchfox.org/mozilla-central/rev/a147181ece866c1ecd176ac49f112785f960aac0/docshell/test/browser/browser_tab_replace_while_loading.js#52-55 because AsyncTabSwitcher doesn't think the tab switch has finished.

I don't get the second part. I don't see where we detach the tab....

Flags: needinfo?(sefeng) → needinfo?(emilio)

Oh, I think I get what you meant. I guess my intuition was we needed to somehow force a paint to be able tofire MozLayerTreeReady? However, I am not sure when the detach should/would happen, so I am not sure if this is a bug.

The code worked before because we always painted inside the Invalidate method, so the detach call there didn't really matter.

I am not sure if you know this, but I think I should check what the detach call means here. I wouldn't expect it detached the test tab...

Well, the test is moving tabs around in two windows / detaching a tab into a different window.

If the expectation from the tab switcher code is that Invalidate() / assigning renderLayers / etc always creates a MozLayerTreeReady notification, then we either need to fix the tab switcher code to not do that, or to guarantee that that happens, right?

I'm looking into some related code as part of bug 1635914 but I suspect it's going to be different enough that you could probably get to this faster than me... Do you have the cycles for this Sean?

Flags: needinfo?(emilio) → needinfo?(sefeng)

Yeah, I agree that is something we want to fix, and I do have cycles :)

What do you think of the next step that should be here?

Intuitively, I'd prefer guaranteeing MozLayerTreeReady to happen because that is the original behaviour. And changing the tab switcher code feels going to be a lot of works, as I probably need to use another event to let the tab switcher aware that it's ready to do the UI change. Although, I could look into the tab switcher code to see if I can fix it for sure.

Just getting your opinions before I blindly start looking into it, Emilio :)

Flags: needinfo?(sefeng) → needinfo?(emilio)

Intuitively, I'd prefer guaranteeing MozLayerTreeReady to happen because that is the original behaviour.

I agree this is the less risky/complicated approach... It'd probably be a bit of a lie though (the tab switcher would get a LayerTreeReady, but we haven't really painted!). But yeah, worth a try.

Flags: needinfo?(emilio)

In PuppetWidget::Invalidate, we could schedule a flush for the next
Tick. This scheduled flush is important to fire events like
MozLayerTreeReady.

However, one possible case is that the PuppetWidget got reattached to
a different DocumentViewer before the scheduled flush run. For instance,
it was originally attached to the content viewer for about:blank, and
then got reattached to the final url's content viewer. The issue is that
when the next Tick run, it couldn't do the paints because it didn't have
the widget (as it got attached to somewhere else).

This patch reschedules the flush at where we attach the PuppetWidget to
a different DocumentViewer if the scheduled flush hasn't run yet.

Assignee: nobody → sefeng
Status: NEW → ASSIGNED
Flags: needinfo?(jmathies)

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:sefeng, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(sefeng)

This appears to have gone away in early November. Do we know why? :)

Not exactly.

I guess that means something has magically happened around paint scheduling. The failure was at a low volume and quite sensitive to how paints were scheduled. Perhaps I don't need to land the patch then :)

So the last occurrence for the failure was at 2020-11-03. I guess I am not going to do any work now and I'll just leave the patch there and hopefully we don't need to land it.

Flags: needinfo?(sefeng)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: