Closed Bug 1696323 Opened 4 years ago Closed 4 years ago

Categories

(Toolkit :: Password Manager, defect, P3)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Fission Milestone M8
Tracking Status
firefox-esr78 --- unaffected
firefox86 --- unaffected
firefox87 --- unaffected
firefox88 --- wontfix
firefox89 --- wontfix
firefox90 --- fixed

People

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

References

(Blocks 1 open bug, Regression)

Details

(Keywords: intermittent-failure, regression)

Attachments

(1 file)

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


[task 2021-03-04T04:49:16.461Z] 04:49:16     INFO - TEST-START | http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html
[task 2021-03-04T04:49:16.638Z] 04:49:16     INFO - GECKO(7378) | [Child 8144, Main Thread] WARNING: Extra shutdown CC: 'i < NORMAL_SHUTDOWN_COLLECTIONS', file /builds/worker/checkouts/gecko/xpcom/base/nsCycleCollector.cpp:3365
[task 2021-03-04T04:49:16.666Z] 04:49:16     INFO - GECKO(7378) | [Child 8144, Main Thread] WARNING: NS_ENSURE_TRUE(Preferences::InitStaticMembers()) failed: file /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp:4377
[task 2021-03-04T04:49:17.587Z] 04:49:17     INFO - GECKO(7378) | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmpHuBhq9.mozrunner/runtests_leaks_tab_pid8246.log
[task 2021-03-04T04:49:17.588Z] 04:49:17     INFO - GECKO(7378) | [8246, Main Thread] WARNING: XPCOM_MEM_BLOAT_LOG is set, disabling native allocations.: file /builds/worker/checkouts/gecko/tools/profiler/core/platform.cpp:251
[task 2021-03-04T04:49:17.647Z] 04:49:17     INFO - GECKO(7378) | [Child 8246, Main Thread] WARNING: could not set real-time limit in CubebUtils::InitLibrary: file /builds/worker/checkouts/gecko/dom/media/CubebUtils.cpp:619
[task 2021-03-04T04:49:17.850Z] 04:49:17     INFO - GECKO(7378) | MEMORY STAT | vsize 2557MB | residentFast 149MB | heapAllocated 8MB
[task 2021-03-04T04:49:17.866Z] 04:49:17     INFO - TEST-OK | http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html | took 1405ms
[task 2021-03-04T04:49:18.873Z] 04:49:18     INFO - GECKO(7378) | console.warn: LoginRecipes: "getRecipes: falling back to a synchronous message for:" "http://mochi.test:8888"
[task 2021-03-04T04:49:18.882Z] 04:49:18    ERROR - TEST-UNEXPECTED-FAIL | SimpleTest | this test already called finish!
[task 2021-03-04T04:49:18.903Z] 04:49:18    ERROR - addAssertionCount should only be called by a cross origin test
[task 2021-03-04T04:49:18.904Z] 04:49:18     INFO - GECKO(7378) | [Parent 7378, Main Thread] WARNING: Received `load` event on unbridged BrowserParent!: file /builds/worker/checkouts/gecko/dom/ipc/BrowserParent.cpp:4021
[task 2021-03-04T04:49:18.906Z] 04:49:18     INFO - GECKO(7378) | [Parent 7378, Main Thread] WARNING: Received `load` event on unbridged BrowserParent!: file /builds/worker/checkouts/gecko/dom/ipc/BrowserParent.cpp:4021
[task 2021-03-04T04:49:18.911Z] 04:49:18     INFO - GECKO(7378) | [Child 8169, Main Thread] WARNING: SendNotifyIMEFocus got rejected.: file /builds/worker/checkouts/gecko/widget/PuppetWidget.cpp:773
[task 2021-03-04T04:49:18.927Z] 04:49:18     INFO - TEST-UNEXP```

The high failure rate appeared once Bug 1682517 has landed. - it is currently permafailing on tier 2 on mozilla-central.

Retriggers/Backfills custom range: https://treeherder.mozilla.org/jobs?repo=autoland&searchStr=linux%2C18.04%2Cx64%2Cdebug%2Cmochitests%2Cwith%2Ccross-origin%2Cand%2Cfission%2Cenabled%2Ctest-linux1804-64%2Fdebug-mochitest-plain-fis-xorig-e10s%2C8&tochange=3ab3618ceed9b970b893b55b6a06ef5aab92db6f&fromchange=34803577fc5d8befb40bcf07e42d73219c5203ca&group_state=expanded

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

[task 2021-03-06T10:17:56.473Z] 10:17:56 INFO - TEST-START | http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html
[task 2021-03-06T10:17:56.654Z] 10:17:56 INFO - GECKO(7352) | [Child 8122, Main Thread] WARNING: Extra shutdown CC: 'i < NORMAL_SHUTDOWN_COLLECTIONS', file /builds/worker/checkouts/gecko/xpcom/base/nsCycleCollector.cpp:3365
[task 2021-03-06T10:17:56.674Z] 10:17:56 INFO - GECKO(7352) | [Child 8122, Main Thread] WARNING: NS_ENSURE_TRUE(Preferences::InitStaticMembers()) failed: file /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp:4377
[task 2021-03-06T10:17:57.620Z] 10:17:57 INFO - GECKO(7352) | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmpgh_C2N.mozrunner/runtests_leaks_tab_pid8224.log
[task 2021-03-06T10:17:57.621Z] 10:17:57 INFO - GECKO(7352) | [8224, Main Thread] WARNING: XPCOM_MEM_BLOAT_LOG is set, disabling native allocations.: file /builds/worker/checkouts/gecko/tools/profiler/core/platform.cpp:251
[task 2021-03-06T10:17:57.696Z] 10:17:57 INFO - GECKO(7352) | [Child 8224, Main Thread] WARNING: could not set real-time limit in CubebUtils::InitLibrary: file /builds/worker/checkouts/gecko/dom/media/CubebUtils.cpp:619
[task 2021-03-06T10:17:57.887Z] 10:17:57 INFO - GECKO(7352) | MEMORY STAT | vsize 2558MB | residentFast 148MB | heapAllocated 8MB
[task 2021-03-06T10:17:57.902Z] 10:17:57 INFO - TEST-OK | http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html | took 1436ms
[task 2021-03-06T10:17:58.906Z] 10:17:58 INFO - GECKO(7352) | console.warn: LoginRecipes: "getRecipes: falling back to a synchronous message for:" "http://mochi.test:8888"
[task 2021-03-06T10:17:58.922Z] 10:17:58 ERROR - TEST-UNEXPECTED-FAIL | SimpleTest | this test already called finish!
[task 2021-03-06T10:17:58.924Z] 10:17:58 INFO - TEST-UNEXPECTED-ERROR | http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html | called finish() multiple times
[task 2021-03-06T10:17:58.924Z] 10:17:58 INFO - TEST-INFO

Tom, could you take a look at this?
Thank you.

Flags: needinfo?(shes050117)
Regressed by: 1682517
Summary: Intermittent [fission][tier2] http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html | called finish() multiple times → High frequency [fission][tier2] http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html | called finish() multiple times
Has Regression Range: --- → yes

If I execute ./mach test toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html --headless --enable-fission --enable-xorigin-tests, I couldn't reproduce this issue. However, if I execute ./mach test toolkit/components/passwordmgr/test/mochitest/ --headless --enable-fission --enable-xorigin-tests, I could reproduce the issue.
Such that, I suspect that something is not cleaned properly between tests.

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

I can also reproduce this failure with ./mach test toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html --headless --enable-fission --enable-xorigin-tests --verify. So, that probably means that it's something related to the iframe.

Looking into the test and adding some logs, I found this onfocus was called twice and thus caused this issue. So, it looks like that something in nsFocusManager is wrong.

Hi Henri, can you take a look here? Tom will not be able to get to this.

Flags: needinfo?(shes050117) → needinfo?(hsivonen)

I'll take a look.

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

(In reply to Tom Tung [:tt, :ttung] from comment #3)

If I execute ./mach test toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html --headless --enable-fission --enable-xorigin-tests, I couldn't reproduce this issue. However, if I execute ./mach test toolkit/components/passwordmgr/test/mochitest/ --headless --enable-fission --enable-xorigin-tests, I could reproduce the issue.
Such that, I suspect that something is not cleaned properly between tests.

The minimal test sequence for repro is:

[test_formless_submit_navigation_negative.html]
skip-if = toolkit == 'android' && debug # bug 1397615
[test_input_events_for_identical_values.html]

Frustratingly, I can't get this to repro in rr even with both the rr chaos mode and the Gecko chaos mode.

The second call to finish happens with this C++ stack:

nsFocusManager::Focus(nsPIDOMWindowOuter*, mozilla::dom::Element*, unsigned int, bool, bool, bool, bool, unsigned long, mozilla::Maybe<nsFocusManager::BlurredElementInfo> const&) (/opt/Projects/gecko/dom/base/nsFocusManager.cpp:2601)
nsFocusManager::WindowRaised(mozIDOMWindowProxy*, unsigned long) (/opt/Projects/gecko/dom/base/nsFocusManager.cpp:776)
nsWebBrowser::FocusActivate(unsigned long) (/opt/Projects/gecko/toolkit/components/browser/nsWebBrowser.cpp:0)
mozilla::dom::BrowserChild::RecvActivate(unsigned long) (/opt/Projects/gecko/dom/ipc/BrowserChild.cpp:1411)

The first call is what is wanted: From

synthesizeKey(aKey = ""VK_TAB"", aEvent = "[object Object]", aWindow = "undefined") ["http://mochi.test:8888/tests/SimpleTest/EventUtils.js":1307:10]

Etc.

Possibly relevant:

2:34.26 TEST_END: OK
2:35.60 GECKO(495674) [Parent 495674, Main Thread] WARNING: Received load event on unbridged BrowserParent!: file /opt/Projects/gecko/dom/ipc/BrowserParent.cpp:4016
2:35.60 GECKO(495674) [Parent 495674, Main Thread] WARNING: Received load event on unbridged BrowserParent!: file /opt/Projects/gecko/dom/ipc/BrowserParent.cpp:4016
2:35.66 GECKO(495674) ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
2:35.76 TEST_START: http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html
2:36.01 GECKO(495674) [Parent 495674, Main Thread] WARNING: WebProgress Ignored: no longer current window global: file /opt/Projects/gecko/dom/ipc/BrowserParent.cpp:2881

Severity: S4 → S3
Fission Milestone: --- → M8
Priority: P5 → P3

Something refocuses the test iframe so that it blurs and immediately refocuses. With that, it makes sense why this is xorigin only.

Summary: High frequency [fission][tier2] http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html | called finish() multiple times → High frequency [fission][tier2][xorigin] http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html | called finish() multiple times

(In reply to Henri Sivonen (:hsivonen) from comment #17)

Something refocuses the test iframe so that it blurs and immediately refocuses. With that, it makes sense why this is xorigin only.

By selective logging (fortunately, the test is stable enough that it's possible to write conditions based on the action id; dumping everything changes the timing too much), it looks like this is a matter of calling WebIDL focus() on the iframe in the process that contains the xorigin iframe element.

Instead of that action blurring the iframe and immediately restoring focus to it, we should probably detect that situation and make it a no-op.

Minimized test case: Compare outer.html with outer-cross-origin.html by clicking the input field in the iframe to focus it.
https://hsivonen.com/test/moz/iframe-focus/

Summary: High frequency [fission][tier2][xorigin] http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html | called finish() multiple times → Permanent [fission][tier2][xorigin] http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html | called finish() multiple times

Sigh. Now the very first test in this test directory permafails: test_autocomplete_autofill_related_realms_no_dupes.html

(In reply to Henri Sivonen (:hsivonen) from comment #27)

Now the very first test in this test directory permafails: test_autocomplete_autofill_related_realms_no_dupes.html

Pernosco says that when this fails, the early return that my patch added never gets executed. That's a bit curious as far as causality goes.

I see the test_autocomplete_autofill_related_realms_no_dupes.html failure locally even without my patch.

I don't see the log from comment 1 running that test at all. I also don't see an annotation to disable it. I'm not sure what I'm missing.

(In reply to Henri Sivonen (:hsivonen) from comment #32)

Try run without patch to get the same config as with the patch:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b474354916577bf06fd742264a1760c22b682859

With patch:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c14b78ec967c627621fc5097d24793e54d381d45

Looks like the other failure is there regardless of this patch.

Pushed by hsivonen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/12893215ed66 Return early when attempting to focus a remote iframe whose BrowsingContext is already the focused one. r=edgar
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/28736 for changes under testing/web-platform/tests

Backed out for OS X build bustages on BrowserBridgeChild.cpp.

Push with failures

Failure log

Backout link

Flags: needinfo?(hsivonen)
Upstream PR was closed without merging
Pushed by hsivonen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5c4c4c9aa022 Return early when attempting to focus a remote iframe whose BrowsingContext is already the focused one. r=edgar
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

Regressions: 1708632

(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #40)

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

I expect us not to uplift tier 2 test fixes to beta.

Flags: needinfo?(hsivonen)
Upstream PR merged by moz-wptsync-bot
Regressions: 1709125
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: