Open Bug 1808168 Opened 2 years ago Updated 6 months ago

RemoteSettingsWorker error: Error: Can't import when we've started shutting down

Categories

(Firefox :: Remote Settings Client, defect)

defect

Tracking

()

People

(Reporter: whimboo, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Several tests in CI that are using Marionette as underlying harness showing the following failure during shutdown which is causing task timeouts due to a lot of restarts of Firefox (bug 1589796):

https://treeherder.mozilla.org/logviewer?job_id=400022129&repo=try&lineNumber=58642-58660

task 2022-12-18T14:32:32.823Z] 14:32:32     INFO - 1671373952821	Marionette	DEBUG	Marionette stopped listening
[task 2022-12-18T14:32:32.860Z] 14:32:32     INFO - console.error: (new TypeError("NetworkError: Network request failed", "resource://services-settings/Utils.jsm", 230))
[task 2022-12-18T14:32:40.260Z] 14:32:40     INFO - console.error: "Failed to import bookmarks from chrome://browser/content/default-bookmarks.html: Error: places.sqlite#1: cannot execute operation Bookmarks.jsm: insertBookmarkTree, the connection is already closing"
[task 2022-12-18T14:32:42.135Z] 14:32:42     INFO - JavaScript error: resource://gre/modules/AsyncShutdown.jsm, line 718: Error: Phase "IOUtils: waiting for profileBeforeChange IO to complete" is finished, it is too late to register completion condition "JSON store: writing data for 'shieldpreferenceexperiments'"
[task 2022-12-18T14:32:42.875Z] 14:32:42     INFO - WARNING: At least one completion condition is taking too long to complete. Conditions: [{"name":"Places Connection shutdown","state":{"PlacesShutdownProgress":5},"filename":"/builds/worker/checkouts/gecko/toolkit/components/places/Database.cpp","lineNumber":470,"stack":""},{"name":"Remote Settings profile-before-change","state":"Remaining: 5 callbacks (importJSONDump-main-anti-tracking-url-decoration-1, importJSONDump-main-hijack-blocklists-2, importJSONDump-main-doh-providers-3, importJSONDump-main-search-telemetry-v2-4, importJSONDump-main-search-config-5).","filename":"resource://services-settings/RemoteSettingsWorker.jsm","lineNumber":203,"stack":["resource://services-settings/RemoteSettingsWorker.jsm:null:203","resource://services-settings/RemoteSettingsClient.jsm:_importJSONDump:938","resource://services-settings/RemoteSettingsClient.jsm:get/this._importingPromise<:443","resource://services-settings/RemoteSettingsClient.jsm:get:458"]}] Barrier: profile-before-change
[task 2022-12-18T14:32:57.496Z] 14:32:57     INFO - console.log: "RemoteSettingsWorker error: Error: Can't import when we've started shutting down."
[task 2022-12-18T14:32:57.497Z] 14:32:57     INFO - console.error: (new RemoteSettingsWorkerError("Error: Can't import when we've started shutting down.", "resource://services-settings/RemoteSettingsWorker.jsm", 48))
[task 2022-12-18T14:32:58.247Z] 14:32:58     INFO - JavaScript error: resource://activity-stream/lib/PlacesFeed.jsm, line 187: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsINavBookmarksService.addObserver]
[task 2022-12-18T14:32:58.248Z] 14:32:58     INFO - JavaScript error: resource://gre/modules/ExtensionSettingsStore.jsm, line 122: Error: The ExtensionSettingsStore was accessed before the initialize promise resolved.
[task 2022-12-18T14:32:59.933Z] 14:32:59     INFO - console.log: "RemoteSettingsWorker error: Error: Can't import when we've started shutting down."
[task 2022-12-18T14:32:59.934Z] 14:32:59     INFO - console.error: (new RemoteSettingsWorkerError("Error: Can't import when we've started shutting down.", "resource://services-settings/RemoteSettingsWorker.jsm", 48))
[task 2022-12-18T14:32:59.936Z] 14:32:59     INFO - console.log: "RemoteSettingsWorker error: Error: Can't import when we've started shutting down."
[task 2022-12-18T14:32:59.937Z] 14:32:59     INFO - console.log: "RemoteSettingsWorker error: Error: Can't import when we've started shutting down."
[task 2022-12-18T14:32:59.938Z] 14:32:59     INFO - console.error: (new RemoteSettingsWorkerError("Error: Can't import when we've started shutting down.", "resource://services-settings/RemoteSettingsWorker.jsm", 48))
[task 2022-12-18T14:32:59.939Z] 14:32:59     INFO - console.error: (new RemoteSettingsWorkerError("Error: Can't import when we've started shutting down.", "resource://services-settings/RemoteSettingsWorker.jsm", 48))
[task 2022-12-18T14:32:59.939Z] 14:32:59     INFO - console.log: "RemoteSettingsWorker error: Error: Can't import when we've started shutting down."
[task 2022-12-18T14:32:59.940Z] 14:32:59     INFO - console.error: (new Error("IndexedDB: main/doh-config getLastModified() IndexedDB:  execute() The application is shutting down", "resource://services-settings/IDBHelpers.jsm", 18))
[task 2022-12-18T14:32:59.945Z] 14:32:59     INFO - console.error: (new RemoteSettingsWorkerError("Error: Can't import when we've started shutting down.", "resource://services-settings/RemoteSettingsWorker.jsm", 48))

This is also adding a good amount of delay for each and every shutdown. But not sure if this is related to RemoteSettings. A related bug for the Places entry has been filed as bug 1806358.

(In reply to Marco Bonardo [:mak] (OoO until Jan 2 - Slack ping for urgency) from bug 1806358 comment #5)

And yes, I suggest filing a bug for the RemoteSettings asyncshutdown timeouts, it's likely RemoteSettings is starting up during shutdown, while it could probably avoid doing any work (nsIAppStartup.isInOrBeyondShutdownPhase() can be used to avoid doing late init work)

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(mathieu)
See Also: → 1890278
You need to log in before you can comment on or make changes to this bug.