Closed Bug 1654377 Opened 4 years ago Closed 4 years ago

maybeReloadEngines has a race condition when removing engines.

Categories

(Firefox :: Search, defect, P1)

defect
Points:
3

Tracking

()

RESOLVED FIXED
Firefox 80
Iteration:
80.2 - July 13 - July 26
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox78 --- unaffected
firefox79 --- unaffected
firefox80 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

When I rewrote maybeReloadEngines in bug 1610293, one thing I changed was to additionally remove app-provided engines.

This went via the add-on manager to uninstall the WebExtension, and then remove the engine.

In bug 1653976, Thunderbird has shown there's an intermittent failure on test_reload_engines.js.

After debugging, the cause is seen to be that the engine-removed notification does not happen until after engines-reloaded is completed. This is an issue because as a result we might be incorrectly setting useDBForOrder when we don't want to.

We were slightly uncomfortable with this set-up when the patch landed but it seemed to work fine. I now think we should remove the engine from the search service, then remove it from the add-on manager and not assert if it is app-provided and missing from the list.

This avoids calling into removeEngine, and ensure we don't get potential issues with race conditions that might cause useDBForOrder to be set when we don't want it to be.

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

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9162a11a7128
In maybeReloadEngines remove search engines from the list before uninstalling the WebExtension. r=daleharvey
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 80
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: