Closed Bug 2043803 Opened 2 months ago Closed 2 months ago

pref_SetPref: Attempt to write pref media.gmp-manager.buildID after XPCOMShutdownThreads started.

Categories

(Toolkit :: Add-ons Manager, defect)

defect

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox153 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

Details

(Whiteboard: [addons-jira])

Attachments

(1 file)

Past the end of toolkit/mozapps/extensions/test/xpcshell/test_gmpProvider.js, the test crashed. E.g. the following part of a test log from a Windows debug build:

pref_SetPref: Attempt to write pref media.gmp-manager.buildID after XPCOMShutdownThreads started.
0 setString(aKey = ""media.gmp-manager.buildID"", aVal = ""20260529200249"") ["resource://gre/modules/GMPUtils.sys.mjs":256:20]
    this = [object Object]
1 _versionchangeOccurred() ["resource://gre/modules/GMPInstallManager.sys.mjs":553:14]
    this = [object Object]
2 simpleCheckAndInstall() ["resource://gre/modules/GMPInstallManager.sys.mjs":567:14]
    this = [object Object]
3 checkForUpdates/<() ["resource://gre/modules/addons/GMPProvider.sys.mjs":570:27]
4 notify("[xpconnect wrapped nsITimer @ 0x18612d90 (native @ 0x18603f30)]") ["resource://gre/modules/Timer.sys.mjs":66:16]
    this = [object Object]
[15556] Assertion failure: false (Late preference writes should be avoided.), at checkouts\\gecko\\modules\\libpref\\Preferences.cpp:1910

Judging by the stack trace, looks like it is a timer scheduled during a preference change observer for KEY_EME_ENABLED (media.eme.enabled), through a call to this.checkForUpdates(GMP_CHECK_DELAY); at GMPProvider.sys.mjs:544.
The GMP_CHECK_DELAY here is ten whole seconds! The logic was originally introduced in bug 1145694.

The test_globalEmeDisabled test task in test_gmpProvider.js (source) toggles the preference. If the test takes about 10 seconds after that, then it is possible to trigger the assertion.

There is a code path that schedules a 10-second timer before the GMP
update check is triggered (for details, see bug 2043803). That can
potentially result in update checks being kicked off past shutdown,
which is undesirable, so skip it if we are past shutdown.

See Also: → 1651230
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
QA Whiteboard: [qa-triage-done-c154/b153]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: