Closed Bug 1685124 Opened 5 years ago Closed 5 years ago

Intermittent browser/modules/test/browser/browser_ProcessHangNotifications.js | A promise chain failed to handle a rejection: can't access property "isAppProvided", engine is null - stack: _updateURLBarPlaceholder@chrome://browser/content/browser.js:4138:

Categories

(Firefox :: Search, defect, P2)

defect
Points:
3

Tracking

()

RESOLVED FIXED
86 Branch
Iteration:
86.2 - Dec 28 - Jan 10
Tracking Status
firefox86 --- fixed

People

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

References

Details

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

Attachments

(1 file)

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


[task 2021-01-05T16:36:29.163Z] 16:36:29     INFO - TEST-START | browser/modules/test/browser/browser_ProcessHangNotifications.js
[task 2021-01-05T16:36:30.406Z] 16:36:30     INFO - TEST-PASS | browser/modules/test/browser/browser_ProcessHangNotifications.js | With no open windows, should have terminated script for script hang. - 
[task 2021-01-05T16:36:30.406Z] 16:36:30     INFO - TEST-PASS | browser/modules/test/browser/browser_ProcessHangNotifications.js | With no open windows, should have terminated global for add-on hang. - 
[task 2021-01-05T16:36:30.406Z] 16:36:30     INFO - Buffered messages finished
[task 2021-01-05T16:36:30.406Z] 16:36:30     INFO - TEST-UNEXPECTED-FAIL | browser/modules/test/browser/browser_ProcessHangNotifications.js | A promise chain failed to handle a rejection: can't access property "isAppProvided", engine is null - stack: _updateURLBarPlaceholder@chrome://browser/content/browser.js:4138:9
[task 2021-01-05T16:36:30.406Z] 16:36:30     INFO - _updateURLBarPlaceholderFromDefaultEngine@chrome://browser/content/browser.js:4114:10
[task 2021-01-05T16:36:30.406Z] 16:36:30     INFO - Rejection date: Tue Jan 05 2021 16:36:29 GMT+0000 (Greenwich Mean Time) - false == true - JS frame :: resource://testing-common/PromiseTestUtils.jsm :: assertNoUncaughtRejections :: line 282
[task 2021-01-05T16:36:30.406Z] 16:36:30     INFO - Stack trace:
[task 2021-01-05T16:36:30.406Z] 16:36:30     INFO - resource://testing-common/PromiseTestUtils.jsm:assertNoUncaughtRejections:282
[task 2021-01-05T16:36:30.406Z] 16:36:30     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1100
[task 2021-01-05T16:36:30.406Z] 16:36:30     INFO - Leaving test bound terminateNoWindows
[task 2021-01-05T16:36:30.406Z] 16:36:30     INFO - Entering test bound terminateClosedWindow
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - GECKO(1988) | [Parent 1988: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 0x1313a4400 == 14 [pid = 1988] [id = 62]
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - GECKO(1988) | [Parent 1988: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 27 (0x15cafc900) [pid = 1988] [serial = 127] [outer = 0x0]
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - GECKO(1988) | [Parent 1988: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 28 (0x1317be400) [pid = 1988] [serial = 128] [outer = 0x15cafc900]
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - GECKO(1988) | [Parent 1988, Main Thread] WARNING: NS_ENSURE_TRUE(uri) failed: file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1327
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - Console message: [JavaScript Error: "URL constructor: null is not a valid URL." {file: "resource:///modules/ProcessHangMonitor.jsm" line: 403}]
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - _recordTelemetryForReport@resource:///modules/ProcessHangMonitor.jsm:403:21
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - stopHang@resource:///modules/ProcessHangMonitor.jsm:163:14
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - stopAllHangs@resource:///modules/ProcessHangMonitor.jsm:343:12
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - updateWindows@resource:///modules/ProcessHangMonitor.jsm:478:12
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - reportHang@resource:///modules/ProcessHangMonitor.jsm:702:10
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - observe@resource:///modules/ProcessHangMonitor.jsm:258:14
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - terminateNoWindows/<@chrome://mochitests/content/browser/browser/modules/test/browser/browser_ProcessHangNotifications.js:435:18
[task 2021-01-05T16:36:30.409Z] 16:36:30     INFO - terminateNoWindows@chrome://mochitests/content/browser/browser/modules/test/browser/browser_ProcessHangNotifications.js:434:42```

Coincidence or not - bug 1680672 disabled the earlier executed browser_PermissionUI.js on debug platforms and the failures for this bug are all on debug.

Component: General → Search

Looks like browser_PartnerLinkAttribution.js might be having an unexpected side-effect. I'll see if I can track something down.

Assignee: nobody → standard8
Status: NEW → ASSIGNED

The order of events in the test are:

  1. Load an engines list specific to the test.
  2. Run tests
  3. Set the default engine back to the default for the engines list defined in the test.
  4. Run cleanup which involves reloading the main engines list.

The problem came from step 2 triggering a delayed save of the search settings (normal practice). During reloading the engines list, we were then loading the settings again - it would attempt to save any pending changes, but because we are inside _reloadEngines the save would be skipped.

As the save was skipped, it would still have one of the test engines as default, which then was set as default engine, only for it to be removed - so the default engine is defined but the engine is not in the engine list.

The _updateURLBarPlaceholderFromDefaultEngine and _updateURLBarPlaceholder code operates on the default engine, and then the name of that engine. So it would get an engine in _updateURLBarPlaceholderFromDefaultEngine, but then null when it tried to get it from the list via getEngineByName. Hence the failure in the test.

This would be helped slightly (and possibly hidden) if we had bug 1575649 which would clear the default engine when it was removed.

However, I think the fix for this bug needs to be that we ensure the settings are saved prior to the main body of _reloadEngines. In theory there's potential for a small dataloss there, but it would have to happen that the user triggers a change of search engine settings within a second prior to us reloading the engines - which generally only happens in this fashion on startup. A remotely triggered configuration update waits for the user to be idle for 5 minutes before it triggers the reload.

Iteration: --- → 86.2 - Dec 28 - Jan 10
Points: --- → 3
Priority: P5 → P2
Blocks: 1685535
Whiteboard: [retriggered][stockwell needswork:owner]
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c9a390a20847 Ensure search engine settings are saved before reloading engines. r=daleharvey
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: