Closed Bug 1863797 Opened 11 months ago Closed 10 months ago

Frequent dom/security/test/https-first/browser_schemeless.js - UrlbarView.selectedElement may become invalid

Categories

(Core :: DOM: Security, defect, P3)

defect

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox119 --- unaffected
firefox120 --- wontfix
firefox121 --- wontfix
firefox122 --- fixed

People

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

References

(Regression)

Details

(Keywords: intermittent-failure, intermittent-testcase, regression, Whiteboard: [domsecurity-intermittent][sng])

Attachments

(2 files, 1 obsolete file)

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


[task 2023-11-08T19:02:30.182Z] 19:02:30     INFO - TEST-PASS | dom/security/test/https-first/browser_schemeless.js | New tab test: Should not upgrade upgradeable website with explicit scheme - 
[task 2023-11-08T19:02:30.183Z] 19:02:30     INFO - Buffered messages logged at 18:47:56
[task 2023-11-08T19:02:30.183Z] 19:02:30     INFO - Waiting for the urlbar view to open
[task 2023-11-08T19:02:30.184Z] 19:02:30     INFO - Urlbar view opened
[task 2023-11-08T19:02:30.186Z] 19:02:30     INFO - Buffered messages logged at 18:48:56
[task 2023-11-08T19:02:30.187Z] 19:02:30     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 9
[task 2023-11-08T19:02:30.187Z] 19:02:30     INFO - Buffered messages logged at 18:50:26
[task 2023-11-08T19:02:30.188Z] 19:02:30     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 8
[task 2023-11-08T19:02:30.189Z] 19:02:30     INFO - Buffered messages logged at 18:51:59
[task 2023-11-08T19:02:30.190Z] 19:02:30     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 7
[task 2023-11-08T19:02:30.195Z] 19:02:30     INFO - Buffered messages logged at 18:53:29
[task 2023-11-08T19:02:30.196Z] 19:02:30     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 6
[task 2023-11-08T19:02:30.196Z] 19:02:30     INFO - Buffered messages logged at 18:54:59
[task 2023-11-08T19:02:30.197Z] 19:02:30     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 5
[task 2023-11-08T19:02:30.197Z] 19:02:30     INFO - Buffered messages logged at 18:56:29
[task 2023-11-08T19:02:30.198Z] 19:02:30     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 4
[task 2023-11-08T19:02:30.199Z] 19:02:30     INFO - Buffered messages logged at 18:57:59
[task 2023-11-08T19:02:30.199Z] 19:02:30     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 3
[task 2023-11-08T19:02:30.200Z] 19:02:30     INFO - Buffered messages logged at 18:59:29
[task 2023-11-08T19:02:30.201Z] 19:02:30     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 2
[task 2023-11-08T19:02:30.201Z] 19:02:30     INFO - Buffered messages logged at 19:00:59
[task 2023-11-08T19:02:30.202Z] 19:02:30     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 1
[task 2023-11-08T19:02:30.202Z] 19:02:30     INFO - Buffered messages finished
[task 2023-11-08T19:02:30.203Z] 19:02:30     INFO - TEST-UNEXPECTED-FAIL | dom/security/test/https-first/browser_schemeless.js | Test timed out - 
[task 2023-11-08T19:02:30.204Z] 19:02:30     INFO - GECKO(13927) | MEMORY STAT | vsize 20975781MB | residentFast 1446MB
[task 2023-11-08T19:02:30.205Z] 19:02:30     INFO - TEST-OK | dom/security/test/https-first/browser_schemeless.js | took 905016ms
[task 2023-11-08T19:02:30.206Z] 19:02:30     INFO - Not taking screenshot here: see the one that was previously logged
[task 2023-11-08T19:02:30.206Z] 19:02:30     INFO - TEST-UNEXPECTED-FAIL | dom/security/test/https-first/browser_schemeless.js | Found a tab after previous test timed out: about:about - 
[task 2023-11-08T19:02:30.207Z] 19:02:30     INFO - checking window state
[task 2023-11-08T19:02:30.208Z] 19:02:30     INFO - TEST-START | dom/security/test/https-first/browser_slow_download.js
Assignee: nobody → mjurgens
Status: NEW → ASSIGNED
Keywords: regression
Regressed by: 1812192

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

Update

There have been 55 total failures within the last 7 days:

  • 11 failures on Linux 18.04 x64 WebRender asan opt
  • 39 failures on Linux 18.04 x64 WebRender debug/opt
  • 5 failures on Linux 18.04 x64 WebRender Shippable opt

Recent failure log: https://treeherder.mozilla.org/logviewer?job_id=436773062&repo=autoland&lineNumber=57138

Whiteboard: [domsecurity-intermittent] → [domsecurity-intermittent][stockwell needswork:owner]

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

Summary: Intermittent dom/security/test/https-first/browser_schemeless.js | single tracking bug → Frequent dom/security/test/https-first/browser_schemeless.js | single tracking bug
Keywords: leave-open

This became frequent after the changes in Bug 1852442 - backfills here.

Flags: needinfo?(dharvey)
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b55181dd063c Disable browser_schemeless.js on linux for frequent failures. r=jmaher
Whiteboard: [domsecurity-intermittent][stockwell disable-recommended] → [domsecurity-intermittent][stockwell disabled]

Ok taking a look, almost every failure I can see in the log starts with

[task 2023-11-17T22:23:59.301Z] 22:23:59     INFO - TEST-PASS | dom/security/test/https-first/browser_schemeless.js | Main test: Should not upgrade upgradeable website without explicit scheme - 
[task 2023-11-17T22:23:59.301Z] 22:23:59     INFO - Waiting for the urlbar view to open
[task 2023-11-17T22:23:59.302Z] 22:23:59     INFO - Urlbar view opened
[task 2023-11-17T22:23:59.302Z] 22:23:59     INFO - Buffered messages logged at 22:10:26
[task 2023-11-17T22:23:59.303Z] 22:23:59     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 9
[task 2023-11-17T22:23:59.303Z] 22:23:59     INFO - Buffered messages logged at 22:11:58
[task 2023-11-17T22:23:59.304Z] 22:23:59     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 8

Which seems relevant

Flags: needinfo?(dharvey)
Assignee: mjurgens → mak
Severity: S4 → S3
Priority: P5 → P3
Summary: Frequent dom/security/test/https-first/browser_schemeless.js | single tracking bug → Frequent dom/security/test/https-first/browser_schemeless.js - UrlbarView.selectedElement may become invalid
Whiteboard: [domsecurity-intermittent][stockwell disabled] → [domsecurity-intermittent][stockwell disabled][sng]
Duplicate of this bug: 1868544

#selectedElement may end up pointing to disconnected nodes. And so the public
.selectedElement getter.
In the specific failure here, a first call to onQueryResults adds and selects a
heuristic result. Then a second call to onQueryResults brings a new heuristic
result that requires new content (not compatible with the previous one), so the
old heuristic is emptied out, and new DOM is generated.
Because the code in onQueryResults relies on .selectedElement, at the second
invokation it thinks the selection is still valid. In reality .selectedElement
at that time is pointing to a removed DOM node.
The patch changes the public getters, that is also what onQueryResults uses.

Plus some minor logging improvement, and removing unused #mainContainer property.

Attachment #9366877 - Attachment is obsolete: true
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/12f45306a093 Frequent failures in browser_schemeless.js due to UrlbarView.selectedElement removed from DOM. r=adw
Keywords: leave-open

I don't think this fix can be easily verified by QA due to requiring a very specific situation and timing. The added automated test should be sufficient.

Flags: qe-verify-
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
Whiteboard: [domsecurity-intermittent][stockwell disabled][sng] → [domsecurity-intermittent][sng]
Blocks: 1787020
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: