Closed Bug 2082546 Opened 1 month ago Closed 1 month ago

Crash in [@ mozilla.appservices.fxaclient.InternalException: at mozilla.appservices.fxaclient.Fxa_clientKt.uniffiCheckCallStatus(fxa_client.kt:46)]

Categories

(Firefox for Android :: Accounts and Sync, defect)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox158 --- unaffected
firefox159 --- unaffected
firefox160 + fixed

People

(Reporter: dmeehan, Unassigned)

References

Details

(Keywords: crash)

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/8a9ab539-1cb3-42dc-9891-26d580261015

Top 10 frames:

0  mozilla.appservices.fxaclient.Fxa_clientKt  uniffiCheckCallStatus  fxa_client.kt:46
1  mozilla.appservices.fxaclient.Fxa_clientKt  access$uniffiCheckCallStatus  fxa_client.kt:1
2  mozilla.appservices.fxaclient.FirefoxAccount  processEvent  fxa_client.kt:127
3  mozilla.appservices.fxaclient.FxaClient  processEvent  FxaClient.kt:6
4  mozilla.components.service.fxa.manager.FxaAccountManager  processQueue  FxaAccountManager.kt:374
5  mozilla.components.service.fxa.manager.FxaAccountManager$beginAuthentication$2  invokeSuspend  FxaAccountManager.kt:53
6  kotlin.coroutines.jvm.internal.BaseContinuationImpl  resumeWith  ContinuationImpl.kt:8
7  kotlinx.coroutines.DispatchedTask  run  DispatchedTask.kt:120
8  java.util.concurrent.ThreadPoolExecutor  runWorker  ThreadPoolExecutor.java:1167
9  java.util.concurrent.ThreadPoolExecutor$Worker  run  ThreadPoolExecutor.java:641

Creating this for tracking purposes, but a fix will come in the next AS bump
https://github.com/mozilla/application-services/pull/7658

Crash report: https://crash-stats.mozilla.org/report/index/d4739542-93c0-4cc3-9d0c-65f590261015

Reports with a different stack in the same spike: https://crash-stats.mozilla.org/report/index/1d6ae062-dead-4d04-b543-0b3230261015

Top 10 frames:

0  mozilla.appservices.fxaclient.Fxa_clientKt  uniffiCheckCallStatus  toolkit/components/uniffi-bindgen-gecko-js/android/components/fxaclient/android/src/main/java/mozilla/appservices/fxaclient/fxa_client.kt
1  mozilla.appservices.fxaclient.Fxa_clientKt  access$uniffiCheckCallStatus  toolkit/components/uniffi-bindgen-gecko-js/android/components/fxaclient/android/src/main/java/mozilla/appservices/fxaclient/fxa_client.kt
2  mozilla.appservices.fxaclient.FirefoxAccount  processEvent  toolkit/components/uniffi-bindgen-gecko-js/android/components/fxaclient/android/src/main/java/mozilla/appservices/fxaclient/fxa_client.kt
3  mozilla.appservices.fxaclient.FxaClient  processEvent  mozilla/appservices/fxaclient/FxaClient.kt
4  mozilla.components.service.fxa.manager.FxaAccountManager  processQueue  mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/manager/FxaAccountManager.kt
5  mozilla.components.service.fxa.manager.FxaAccountManager$beginAuthentication$2  invokeSuspend  mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/manager/FxaAccountManager.kt
6  kotlin.coroutines.jvm.internal.BaseContinuationImpl  resumeWith
7  kotlinx.coroutines.DispatchedTask  run
8  java.util.concurrent.ThreadPoolExecutor  runWorker
9  java.util.concurrent.ThreadPoolExecutor$Worker  run

Filed because this signature's crash volume spiked. 6 reports from 6 distinct installations on the nightly build of 2026-10-15 (buildid 20261015093624); none of the preceding 3 build-days had any, and no build in the 21 days before had any report of it. That is an appearance from zero over the loudest of the preceding build-days and of this signature's builds over the 21 days before (Clouseau's bar is 3x, and the Poisson excess of the day against that baseline is z = 3.83, bar 3.62). This signature is new on nightly: crash-stats has no report of it there before this build. Its first report anywhere is in build 20260506140522 (2026-05-06), 162 days earlier.

Clouseau analysis (automated -- nothing below was checked by a human; a claim it could not ground is deliberately absent):

Fenix nightly 160.0a1 build 20261015093624 throws an uncaught mozilla.appservices.fxaclient.InternalException from uniffiCheckCallStatus. That exception is UniFFI's wrapper for a panic inside the Rust fxa-client. It is thrown on two different calls: FirefoxAccount.processEvent (from FxaAccountManager.processQueue) and FirefoxAccount.getProfile (from SyncStoreSupport). All 6 nightly reports in the last 60 days come from this one build, from 6 installations. On release the signature stays at its usual trickle of about 1 to 3 reports a day. The only change in this build's pushlog that touches the Rust code behind both calls is the application-services bump 07d2cc0a1254 (bug 2082166, app-services ec31dc5b4a91 to 7afac3d5d04e). The suggested next step is for the application-services/FxA owners to check fxa-client changes in that range for a new panic (unwrap/expect/index) reachable from both get_profile and the state-machine process_event, and to read the panic message, which may be in the Breadcrumbs or JavaException annotation.

Suspected regressor (medium confidence): 07d2cc0a1254 (bug 2082166).

The diff changes only the pinned application-services build: ApplicationServices.kt VERSION goes from 160.20261014050201 to 160.20261014160830, and moz.yaml revision from ec31dc5b4a91 to 7afac3d5d04e. That swaps the Rust fxa-client library behind both crashing calls. InternalException is the UniFFI wrapper for a Rust panic, and in this build it fires on two unrelated entry points (processEvent and getProfile). That pattern fits a change in the shared Rust library better than a change in any one Kotlin caller. I could not read the app-services commits in that range, so the panicking change itself is not identified. Confidence is limited to medium for that reason.

Possible path to the crash:

Mechanism (inferred, high): the Rust fxa-client panics during an FFI call. UniFFI turns the panic into InternalException in uniffiCheckCallStatus. No caller catches it, so the parent process crashes.

Path (observed from the two stacks):

  1. Coroutine work either drains the account state machine (FxaAccountManager.processQueue) or fetches the profile (SyncStoreSupport calls FirefoxAccount.getProfile, inside handleFxaExceptions).
  2. That code calls the generated binding processEvent or getProfile.
  3. The Rust call returns a panic status, and uniffiCheckCallStatus throws InternalException. handleFxaExceptions does not handle this exception type, so it propagates and crashes the app.

Trigger (unknown): the account state or server response that reaches the panic can't be determined without the panic message.

Population (observed): 6 reports from 6 installations, all on nightly build 20261015093624, none on earlier nightly builds in a 60-day window. Release is at its normal baseline of 1 to 3 reports a day.

Checked:

  • All 6 nightly reports in the 60-day window are on build 20261015093624. (crashstats facets build_id, Fenix nightly, 60d)
  • The spike spans several Android versions (30, 36, 29, 35), so it is not one device or OS. (crashstats facets platform_version, Fenix nightly, 30d)
  • Two different Rust entry points crash in this build: generated processEvent (called from FxaAccountManager.processQueue) and generated getProfile (called from FirefoxAccount.getProfile / SyncStoreSupport). (brief stacks of reports d4739542-93c0-4cc3-9d0c-65f590261015 and 1d6ae062-dead-4d04-b543-0b3230261015)
  • 07d2cc0a1254 (in this build's pushlog) moves application-services from ec31dc5b4a91 (2026-10-14T05:02) to 7afac3d5d04e (2026-10-14T16:08). (mcp__patch__diff 07d2cc0a1254: ApplicationServices.kt and moz.yaml)
  • The previous app-services bump 9e71cc00bd25 (bug 2081627) landed 2026-10-14, so the earlier nightly ran ec31dc5b and the new suspect range is the half-day between the two app-services revisions. [derived] (mcp__history__file_history ApplicationServices.kt)
  • b6f22ac8997d changes only FxaAccountManager.beginAuthentication, which sends empty scopes when sync decoupling is enabled. It does not touch the getProfile path. (mcp__patch__diff b6f22ac8997d, FxaAccountManager.kt)
  • The panic message is not among the public report fields. The report carries Breadcrumbs, JavaException and ApplicationServicesVersion keys, and there is no minidump thread list. (mcp__crashstats__report d4739542-93c0-4cc3-9d0c-65f590261015)
  • Existing bug 2082546 (NEW, Firefox for Android :: Accounts and Sync) is filed on this signature, with no diagnosis recorded in the fields I could read. (bugzilla signature_bugs, bug 2082546)

Alternatives considered:

  • b6f22ac8997d (bug 2079834, empty OAuth scopes under sync decoupling) as the sole cause: disfavored. It can only affect the BeginOAuthFlow event, but the getProfile cluster crashes in the same build. The ordinary pipeline also noted that oauth_flow handles empty scopes. It could still contribute to the processEvent cluster, which is unresolved.
  • Hardware fault: disfavored. 6 distinct installations across 4 Android versions and two ABIs (x86_64 and arm64) all crash on the same build, with 0% bit-flip annotations.
  • FxA server-side change: disfavored. A server change would hit release too, but release shows no matching jump on 2026-10-15 (1 report on 10-14, in line with its baseline). This is not ruled out without release data for 10-15 onward.
  • Signature artefact or longstanding crash: disfavored. The signature has existed since 2026-05 on release, but nightly had zero reports in the 60 days before this build.

Worth checking first:

  • Which commit in application-services ec31dc5b4a91..7afac3d5d04e adds a panic in fxa-client reachable from get_profile and process_event: review that range's fxa-client and shared-crate changes (e.g. unwrap/expect on profile or state data).
  • What is the panic text: read the JavaException message or Breadcrumbs (protected) on the 6 reports, or reproduce with the 20261015 nightly signed in to an existing account.
  • Does the next nightly (with a newer or reverted app-services) clear it: facet build_id on the following builds.
  • Should callers stay crash-resistant: handleFxaExceptions and FxaAccountManager.processQueue let InternalException through; whether to catch and report it instead is a design choice for the Accounts and Sync owners.

Posted automatically by Clouseau, which analyses nightly crashes with an LLM. Nothing above was written or checked by a human.

Depends on: 2082647
No longer depends on: 2082405
No longer depends on: 2082647
Depends on: 2082711

Adding a new signature that should also be fixed by Bug 2082711.
I can resolve this once we see the volume drop in the next nightly build

Crash Signature: [@ mozilla.appservices.fxaclient.InternalException: at mozilla.appservices.fxaclient.Fxa_clientKt.uniffiCheckCallStatus(fxa_client.kt:46)] → [@ mozilla.appservices.fxaclient.InternalException: at mozilla.appservices.fxaclient.Fxa_clientKt.uniffiCheckCallStatus(fxa_client.kt:46)] [@ mozilla.appservices.relay.InternalException: at mozilla.appservices.relay.RelayKt.uniffiCheckCallStatus(relay.kt…

The bug is marked as tracked for firefox160 (nightly). However, the bug still isn't assigned.

:segun, could you please find an assignee for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.

For more information, please visit BugBot documentation.

Flags: needinfo?(sfamisa)

Not needed for now

Flags: needinfo?(sfamisa)

Confirmed as fixed by Bug 2082711

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
Duplicate of this bug: 2082687
Duplicate of this bug: 2082807
Duplicate of this bug: 2082335

Copying crash signatures from duplicate bugs.

Crash Signature: mozilla.appservices.relay.RelayKt.uniffiCheckCallStatus(relay.kt:46) ] → mozilla.appservices.relay.RelayKt.uniffiCheckCallStatus(relay.kt:46) ] [@ mozilla.appservices.relay.InternalException: at mozilla.appservices.relay.RelayKt.uniffiCheckCallStatus(relay.kt:40)]
You need to log in before you can comment on or make changes to this bug.