Skip to content

Bug 2080456 - AsyncShutdown timeout crash in "RemoteSettingsExperimentLoader: disabling" when a recipe update hangs (e.g. offline) - #383

Closed
mrwiora wants to merge 1 commit into
mozilla-firefox:mainfrom
mrwiora:claude/bold-bohr-mlrcz8
Closed

mrwiora wants to merge 1 commit into
mozilla-firefox:mainfrom
mrwiora:claude/bold-bohr-mlrcz8

Conversation

@mrwiora

@mrwiora mrwiora commented Oct 10, 2026 •

Copy link
Copy Markdown

Firefox crashes currently in poorly configured offline environments (where packages are not rejected, but silently dropped). As this might happen more often than expected, I would like to bring in a fix.

Analysis: The shutdown blocker aborts the loader's AbortController and then awaits finishedUpdating(), which resolves only when the in-progress update finishes. Only some steps of #updateImpl() react to the abort: they are wrapped in #raceShutdown() (RemoteSettingsClient.get(), NimbusEnrollments.loadUnenrolledExperimentSlugsFromOtherProfiles()) or guarded by withUpdateLock() / #throwDuringShutdown(). The call to recordTargetingContext() at the start of #updateImpl() is awaited directly. It evaluates every targeting attribute (bookmarks, FxA/Sync state, add-ons, default browser, profile group, ...) and then awaits ClientID.getProfileGroupID(). If any of these does not settle, the update never finishes, finishedUpdating() never resolves, and the blocker hits the AsyncShutdown crash timeout.

On a profile that has never synced, there is no packaged dump for nimbus-desktop-experiments, so RemoteSettingsClient.get() goes to the network. Builds that do not yet wrap that call in #raceShutdown() hang there as well in an offline environment.

Proposed fix: Wrap recordTargetingContext() in #raceShutdown(), the same way the other interruptible steps of #updateImpl() are handled. Targeting context recording is telemetry only, so abandoning it at shutdown loses nothing persistent. An xpcshell test that follows the existing tests in toolkit/components/nimbus/test/unit/shutdown/ is included.

https://bugzilla.mozilla.org/show_bug.cgi?id=2080456


Lando: link
Bugzilla: bug 2080456

⚠️ This pull request has 3 warnings.
🚫 This pull request has 2 blockers.

…ttingsExperimentLoader. r?#nimbus-reviewers

The appShutdownConfirmed blocker waits for any in-progress update to finish,
but recordTargetingContext() could not be interrupted, so a hang there turned
into an AsyncShutdown timeout crash.

Claude-Session: https://claude.ai/code/session_0177zRiHaA8dyT6BqNxv4bo4
@firefoxci-taskcluster

Copy link
Copy Markdown
No Taskcluster jobs started for this pull request

The allowPullRequests configuration for this repository (in .taskcluster.yml on the default branch) does not allow starting tasks for this pull request.

@lando-web
lando-web Bot requested a review from a team October 10, 2026 15:21
@github-actions

Copy link
Copy Markdown
Contributor

(Automated Close) Please do not file pull requests here, see https://firefox-source-docs.mozilla.org/contributing/how_to_submit_a_patch.html

@github-actions github-actions Bot closed this Oct 10, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants