Closed Bug 1805139 Opened 2 years ago Closed 2 years ago

DEBUG Crashes due to late rebuildDatabase

Categories

(Toolkit :: Add-ons Manager, defect, P5)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jstutte, Unassigned)

References

(Blocks 1 open bug)

Details

In some reports of bug 1754104 we crash with:

[task 2022-12-09T00:11:24.773Z] 00:11:24     INFO - GECKO(1767) | pref_SetPref: Attempt to write pref extensions.pendingOperations after XPCOMShutdownThreads started.
[task 2022-12-09T00:11:24.773Z] 00:11:24     INFO - GECKO(1767) | 0 rebuildDatabase(aRebuildOnError = "true") ["resource://gre/modules/addons/XPIDatabase.jsm":2009:21]
[task 2022-12-09T00:11:24.773Z] 00:11:24     INFO - GECKO(1767) |     this = [object Object]
[task 2022-12-09T00:11:24.774Z] 00:11:24     INFO - GECKO(1767) | 1 timeRebuildDatabase/<() ["resource://gre/modules/addons/XPIDatabase.jsm":1974:18]
[task 2022-12-09T00:11:24.774Z] 00:11:24     INFO - GECKO(1767) | 2 recordTiming(name = ""XPIDB_rebuildUnreadableDB_MS"", task = [function]) ["resource://gre/modules/AddonManager.jsm":3864:19]
[task 2022-12-09T00:11:24.775Z] 00:11:24     INFO - GECKO(1767) |     this = [object Object]
[task 2022-12-09T00:11:24.775Z] 00:11:24     INFO - GECKO(1767) | 3 timeRebuildDatabase(timerName = ""XPIDB_rebuildUnreadableDB_MS"", rebuildOnError = "true") ["resource://gre/modules/addons/XPIDatabase.jsm":1973:29]
[task 2022-12-09T00:11:24.775Z] 00:11:24     INFO - GECKO(1767) |     this = [object Object]
[task 2022-12-09T00:11:24.776Z] 00:11:24     INFO - GECKO(1767) | 4 asyncLoadDB/this._dbPromise<() ["resource://gre/modules/addons/XPIDatabase.jsm":1959:13]
[task 2022-12-09T00:11:24.776Z] 00:11:24     INFO - GECKO(1767) | 5 InterpretGeneratorResume(gen = "[object Object]", val = "AbortError: IOUtils: Shutting down and refusing additional I/O tasks", kind = ""throw"") ["self-hosted":1957:33]
[task 2022-12-09T00:11:24.777Z] 00:11:24     INFO - GECKO(1767) | 6 AsyncFunctionThrow(val = "AbortError: IOUtils: Shutting down and refusing additional I/O tasks") ["self-hosted":949:27]
[task 2022-12-09T00:11:24.777Z] 00:11:24     INFO - GECKO(1767) |     this = [object Object]
[task 2022-12-09T00:11:24.778Z] 00:11:24     INFO - GECKO(1767) | Assertion failure: false (Late preference writes should be avoided.), at /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp:1770

XPIProvider observes quitApplicationGranted but it seems we run (or wait for) an asyncLoadDB after XPCOMShutdownThreads started.

I assume we need to do some more XPIProvider._closing check in the right places?

Blocks: 1754104

BTW, there seems to be some mechanism to write out stacks on late writes but I was not able to see where those arrive? Bug 1064480 added this, AFAICS.

Severity: -- → S4
Priority: -- → P5
Depends on: 1799421

The last two weeks since bug 1799421 was fixed none of these arrived, AFAICS.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.