Closed Bug 1775837 Opened 3 years ago Closed 7 months ago

Intermittent dom/ipc/tests/browser_crash_oopiframe.js | single tracking bug

Categories

(Core :: DOM: Content Processes, defect, P3)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: jmaher, Unassigned)

References

Details

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

Attachments

(1 file, 1 obsolete file)

No description provided.

Additional information about this bug failures and frequency patterns can be found by running: ./mach test-info failure-report --bug 1775837

Severity: -- → S3

There have been 30 total failures in the last 7 days, recent failure log.
Affected platforms are:

  • linux1804-64-qr
  • linux1804-64-shippable-qr
  • windows10-32-2004-qr
  • windows10-64-2004-ccov-qr
  • windows10-64-2004-qr
  • windows7-32-qr
[task 2022-11-11T12:13:12.215Z] 12:13:12     INFO - TEST-PASS | dom/ipc/tests/browser_crash_oopiframe.js | The iframe is now pointing at about:framecrashed - 
[task 2022-11-11T12:13:12.216Z] 12:13:12     INFO - Buffered messages finished
[task 2022-11-11T12:13:12.217Z] 12:13:12     INFO - TEST-UNEXPECTED-FAIL | dom/ipc/tests/browser_crash_oopiframe.js | Uncaught exception in test - at chrome://mochitests/content/browser/dom/ipc/tests/browser_crash_oopiframe.js:110 - TypeError: can't access property "ready", content.document.l10n is null
[task 2022-11-11T12:13:12.218Z] 12:13:12     INFO - Stack trace:
[task 2022-11-11T12:13:12.219Z] 12:13:12     INFO - @chrome://mochitests/content/browser/dom/ipc/tests/browser_crash_oopiframe.js:110:7
[task 2022-11-11T12:13:12.220Z] 12:13:12     INFO - execute@resource://specialpowers/SpecialPowersSandbox.jsm:142:12
[task 2022-11-11T12:13:12.221Z] 12:13:12     INFO - _spawnTask@resource://specialpowers/SpecialPowersChild.jsm:1636:15
[task 2022-11-11T12:13:12.222Z] 12:13:12     INFO - receiveMessage@resource://specialpowers/SpecialPowersChild.jsm:294:21
[task 2022-11-11T12:13:12.223Z] 12:13:12     INFO - Leaving test bound test_crashframe
[task 2022-11-11T12:13:12.225Z] 12:13:12     INFO - Entering test bound test_nominidump
[task 2022-11-11T12:13:12.228Z] 12:13:12     INFO - Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”." {file: "http://example.com/" line: 0}]
[task 2022-11-11T12:13:12.235Z] 12:13:12     INFO - Console message: [JavaScript Warning: "Partitioned cookie or storage access was provided to “http://example.com/” because it is loaded in the third-party context and dynamic state partitioning is enabled."]
[task 2022-11-11T12:13:12.349Z] 12:13:12     INFO - GECKO(654) | Crash cleaned up
[task 2022-11-11T12:13:12.355Z] 12:13:12     INFO - TEST-PASS | dom/ipc/tests/browser_crash_oopiframe.js | notification shown for browser with no minidump - 
Flags: needinfo?(hsingh)
Whiteboard: [stockwell needswork:owner]

This test started to fail frequently approximately last Friday. Please check what should be done.

Flags: needinfo?(hsingh) → needinfo?(aiunusov)

The specific failure is:
[task 2022-12-19T13:38:12.451Z] 13:38:12 INFO - TEST-UNEXPECTED-FAIL | dom/ipc/tests/browser_crash_oopiframe.js | Uncaught exception in test - at chrome://mochitests/content/browser/dom/ipc/tests/browser_crash_oopiframe.js:110 - TypeError: can't access property "ready", content.document.l10n is null

It looks like maybe it started happening frequently on 2022-12-06, but the failures look the same as in the log from comment 24, back on 2022-11-13.

Bug 1443925 landed on 2022-12-02, and changed BasePrincipal::IsL10nAllowed, which, after being called from Document::DocumentSupportsL10n, is the function used to control the visibility of the l10n property on Document. Nika, do you think your principal changes could have caused this function to return false more often somehow?

Flags: needinfo?(nika)

I don't see how that would be the case, the changes I made shouldn't have impacted the behaviour of this function.

Looking at the logic here, it surprised me a bit that this was working at all with about:framecrashed, as the l10n attribute is guarded to allow it for error pages (https://searchfox.org/mozilla-central/rev/57527d50ef5d3df412caa5d99536f0709399be6f/caps/BasePrincipal.cpp#707-710), but nsContentUtils::IsErrorPage returns false for about:framecrashed (https://searchfox.org/mozilla-central/rev/57527d50ef5d3df412caa5d99536f0709399be6f/dom/base/nsContentUtils.cpp#1882-1883). That being said, I don't think that check is failing, because the error is that "content.document.l10n is null", not undefined, suggesting that the attribute is present, but null. This could be because the subject principal in this case is probably the system principal, however.

It looks like the l10n attribute is only initialized lazily when the first localization link element is inserted into the document (https://searchfox.org/mozilla-central/rev/57527d50ef5d3df412caa5d99536f0709399be6f/dom/base/Document.cpp#4376-4385), so perhaps the race here is that we're not waiting for the error frame to finish loading, and are managing to catch it before any localization link is inserted into the document. This would require catching the attribute very quickly, as the file is quite small: https://searchfox.org/mozilla-central/rev/57527d50ef5d3df412caa5d99536f0709399be6f/browser/base/content/aboutFrameCrashed.html#16-18. The initialization could also have failed due to AllowsL10n() failing, as it uses the node principal rather than the subject principal (which DocumentSupportsL10n uses).

This test perhaps either needs to have some additional waiting to ensure that the document has actually loaded before trying to access the l10n property, or needs to have the permissions checks updated to be more reliable.

Flags: needinfo?(nika)
Whiteboard: [stockwell disable-recommended] → [stockwell needswork:owner]

Update:

There have been 57 failures within the last 7 days:

  • 22 failures on Linux 18.04 x64 WebRender opt/debug
  • 5 failures on Linux 18.04 x64 WebRender Shippable opt
  • 4 failures on OS X 10.15 WebRender Shippable opt
  • 1 failure on Windows 10 x86 2004 WebRender debug
  • 13 failures on Windows 10 x64 2004 WebRender debug
  • 10 failures on Windows 7 WebRender opt
  • 2 failures on Windows 7 WebRender Shippable opt

Recent failure log: https://treeherder.mozilla.org/logviewer?job_id=400769247&repo=mozilla-central&lineNumber=9301

[task 2022-12-26T17:41:02.575Z] 17:41:02     INFO - TEST-PASS | dom/ipc/tests/browser_crash_oopiframe.js | The iframe is now pointing at about:framecrashed - 
[task 2022-12-26T17:41:02.576Z] 17:41:02     INFO - Buffered messages finished
[task 2022-12-26T17:41:02.578Z] 17:41:02     INFO - TEST-UNEXPECTED-FAIL | dom/ipc/tests/browser_crash_oopiframe.js | Uncaught exception in test - at chrome://mochitests/content/browser/dom/ipc/tests/browser_crash_oopiframe.js:110 - TypeError: can't access property "ready", content.document.l10n is null
[task 2022-12-26T17:41:02.582Z] 17:41:02     INFO - Stack trace:
[task 2022-12-26T17:41:02.583Z] 17:41:02     INFO - @chrome://mochitests/content/browser/dom/ipc/tests/browser_crash_oopiframe.js:110:7
[task 2022-12-26T17:41:02.584Z] 17:41:02     INFO - execute@resource://specialpowers/SpecialPowersSandbox.sys.mjs:138:12
[task 2022-12-26T17:41:02.585Z] 17:41:02     INFO - _spawnTask@resource://specialpowers/SpecialPowersChild.sys.mjs:1607:15
[task 2022-12-26T17:41:02.587Z] 17:41:02     INFO - receiveMessage@resource://specialpowers/SpecialPowersChild.sys.mjs:265:21
[task 2022-12-26T17:41:02.588Z] 17:41:02     INFO - Leaving test bound test_crashframe
[task 2022-12-26T17:41:02.591Z] 17:41:02     INFO - Entering test bound test_nominidump
[task 2022-12-26T17:41:02.593Z] 17:41:02     INFO - Console message: [JavaScript Warning: "Unknown category for SetEventRecordingEnabled: page_load"]
[task 2022-12-26T17:41:02.640Z] 17:41:02     INFO - GECKO(16898) | Crash cleaned up
[task 2022-12-26T17:41:02.787Z] 17:41:02     INFO - Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”." {file: "http://example.com/" line: 0}]
[task 2022-12-26T17:41:02.787Z] 17:41:02     INFO - Console message: [JavaScript Warning: "Partitioned cookie or storage access was provided to “http://example.com/” because it is loaded in the third-party context and dynamic state partitioning is enabled."]
[task 2022-12-26T17:41:02.816Z] 17:41:02     INFO - GECKO(16898) | console.error:
[task 2022-12-26T17:41:02.821Z] 17:41:02     INFO - GECKO(16898) |   remote browser crashed while on about:blank
[task 2022-12-26T17:41:02.824Z] 17:41:02     INFO - TEST-PASS | dom/ipc/tests/browser_crash_oopiframe.js | notification shown for browser with no minidump 
Whiteboard: [stockwell disable-recommended] → [stockwell needswork:owner][stockwell disable-recommended]
Whiteboard: [stockwell needswork:owner][stockwell disable-recommended] → [stockwell needswork:owner]

Possible solutions:

  1. wait somehow until document.l10n is not null https://searchfox.org/mozilla-central/source/dom/ipc/tests/browser_crash_oopiframe.js#107
  2. I guess we can also create mDocumentL10n in a lazy way in Document::GetL10n(), https://searchfox.org/mozilla-central/source/dom/base/Document.cpp#4355
Flags: needinfo?(aiunusov)
Whiteboard: [stockwell disable-recommended] → [stockwell needswork:owner]
Whiteboard: [stockwell disable-recommended]
Assignee: nobody → imoraru
Status: NEW → ASSIGNED

Made a patch to disable browser_crash_oopiframe.js on windows and linux to reduce the number of oranges on trees. If this lands, please remember to enable the test again when making a fix for the issue TEST-UNEXPECTED-FAIL | dom/ipc/tests/browser_crash_oopiframe.js | Uncaught exception in test - at chrome://mochitests/content/browser/dom/ipc/tests/browser_crash_oopiframe.js:110 - TypeError: can't access property "ready", content.document.l10n is null.
Thank you!

Pushed by imoraru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ec43cb440d88 disable browser_crash_oopiframe.js on windows and linux for frequent failures. r=#intermittent-reviewers
Assignee: imoraru → nobody
Status: ASSIGNED → NEW
Keywords: leave-open
Whiteboard: [stockwell disabled][stockwell needswork:owner]
Attachment #9383462 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 9 months ago7 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: