Open Bug 1840733 Opened 2 years ago Updated 2 years ago

WPT test failures (maybe crashes?) with "Document unloaded; maybe test navigated the top-level-browsing context"

Categories

(Testing :: web-platform-tests, defect)

Default
defect

Tracking

(Not tracked)

People

(Reporter: dholbert, Unassigned, NeedInfo)

References

Details

I ran across a WPT failure with this mysterious bit of logging attributed to the failing test:

Document unloaded; maybe test navigated the top-level-browsing context

I did a quick bugzilla search and it looks like we have 5 bugs that have ever mentioned this string (in their quoted snippet of the log), and they were all filed in the last 3 weeks (the first was filed 21 days ago)
bug 1837132
bug 1838009
bug 1838311
bug 1838571
bug 1840722

Given the sudden appearance of these handful of bugs with a common log string, I suspect there's some common root-cause involved here.

The logged string (Document unloaded [etc]) itself isn't new; it was added to our harness in 2019 in bug 1519862 and lives here in the tree:
https://searchfox.org/mozilla-central/rev/926b6c9fc7d84b603f501448c31d489473862bca/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py#869

The bug that added this string was about crashes, so maybe this string is an indication that we might've crashed? (In which case: this is probably a Gecko bug.)

We had a similar failure for our wdspec test jobs (see bug 1816538) which I have recently fixed on bug 1838381. The underlying reason was (or still is) a change in how the very first page is loaded after Firefox starts up. Sometimes there is a delay between loading the initial about:blank and the actual target page - in wpt it's about:blank as well - so that there was an overlap with the first navigation of the test. Given that wpt is using Marionette as well, I wonder if that might be related. After my fix we never saw this failure again, whereby the changed behavior in Gecko is still there.

Daniel, is that failure still visible on autoland and mozilla-central or is it gone as well?

Flags: needinfo?(dholbert)

(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #1)

Daniel, is that failure still visible on autoland and mozilla-central or is it gone as well?

The failure that prompted me to file this bug was in bug 1840722 , which was an intermittent filed for the following log from an autoland run earlier today (June 27th):
https://treeherder.mozilla.org/logviewer?job_id=420839062&repo=autoland&lineNumber=4040

So this is distinct from the thing that you fixed in bug 1838381, I guess.

Flags: needinfo?(dholbert)

Ah ok. So I had a look at the logs and the following makes me wonder why Marionette gets enabled twice and its JSWindowActors are already registered:

https://treeherder.mozilla.org/logviewer?job_id=420839062&repo=autoland&lineNumber=4006-4020

It's very likely that this could still be related but hard to tell without having a log that has the trace logs (preference remote.log.level = Trace) enabled.

The severity field is not set for this bug.
:jgraham, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(james)
You need to log in before you can comment on or make changes to this bug.