Closed Bug 2082807 Opened 1 month ago Closed 1 month ago

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

Categories

(Application Services :: General, defect)

defect

Tracking

(firefox158 affected, firefox159 affected, firefox160 affected)

RESOLVED DUPLICATE of bug 2082546
Tracking Status
firefox158 --- affected
firefox159 --- affected
firefox160 --- affected

People

(Reporter: clouseau-bot, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: crash)

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/ecfbe00c-4139-4cb0-8bf6-ad65d0261016

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  getProfile  toolkit/components/uniffi-bindgen-gecko-js/android/components/fxaclient/android/src/main/java/mozilla/appservices/fxaclient/fxa_client.kt
3  mozilla.appservices.fxaclient.FxaClient  getProfile  mozilla/appservices/fxaclient/FxaClient.kt
4  mozilla.components.service.fxa.FirefoxAccount$getProfile$2$2  invokeSuspend  mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/FirefoxAccount.kt
5  mozilla.components.service.fxa.FirefoxAccount$getProfile$2$2  invoke  mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/FirefoxAccount.kt
6  mozilla.components.service.fxa.UtilsKt  handleFxaExceptions  mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/Utils.kt
7  mozilla.components.service.fxa.UtilsKt  handleFxaExceptions  mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/Utils.kt
8  mozilla.components.service.fxa.FirefoxAccount$getProfile$2  invokeSuspend  mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/FirefoxAccount.kt
9  kotlin.coroutines.jvm.internal.BaseContinuationImpl  resumeWith

Filed because this signature's crash volume spiked. 13 reports from 10 distinct installations on the nightly build of 2026-10-14 (buildid 20261014080135); the preceding 3 build-days had 0, 1, 1 reports, and the loudest of its 22 earlier builds in the 21 days before had 3. That is 4.3x 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.64, bar 3.62). Over the last week the rate reads the same way: 22 distinct installations in the last 7 days (25 reports), against 6.15 expected from this signature's own rate over the preceding 23 days — 3.58x, normalised for the channel's daily installation count. This signature is not new: its first report is in build 20250421163656 (2025-04-21), 541 days before this build.

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

Fenix crashes when a Rust panic, or an unknown call status, comes back from FxaClient.getProfile(). The UniFFI binding turns it into mozilla.appservices.fxaclient.InternalException, which is not a subclass of FxaException, so handleFxaExceptions in android-components never catches it and the exception reaches the coroutine's uncaught-exception path. The rise is not specific to nightly: release 158.0 climbed from about 5 reports a day on 2026-10-11 to 15 on 2026-10-14 and 29 on 2026-10-15, the same day nightly 160.0a1 jumped to 13. The Rust get_profile path has not changed since June 2026. That points to something outside this nightly build, most plausibly the FxA profile or OAuth server response, or account state, rather than any changeset in the pushlog window. Next steps: read the protected JavaException panic messages on the spiking reports to find the panicking Rust statement, and check with the FxA server team for deployments around 2026-10-09 to 2026-10-15. Catching InternalException around getProfile would stop the crash, but it would also hide the panic.

Possible path to the crash:

Mechanism (observed): uniffiCheckCallStatus in the generated fxa_client.kt throws InternalException when the Rust call status is a panic (it carries the panic message, or "Rust panic" if none), or when the status code is unknown. This is the same template as the sibling bindings, e.g. ads_client.kt and autofill.kt.

Path (observed, with an inferred final step):

  1. FirefoxAccount.getProfile runs inner.getProfile(ignoreCache) inside handleFxaExceptions(logger, "getProfile", { null }) on Dispatchers.IO (observed).
  2. handleFxaExceptions only catches FxaException (observed). InternalException is not one, so it passes through without even reaching the shouldPropagate() triage.
  3. The exception escapes the IO coroutine of FirefoxAccount's SupervisorJob scope and crashes the app process (inferred, high).

Trigger (inferred, low-medium): the Rust side of get_profile (self.internal.lock().get_profile(...), then access-token fetch, profile HTTP fetch and state persistence) panics. The panicking statement is unknown. Release 158.0 and nightly 160.0a1 spiked on the same day while this code has not changed since 2026-06-25. That suggests a server-side change in the FxA profile or OAuth responses, or a shared account-state condition, which old and new builds hit alike.

Checked:

  • The daily rise is cross-channel: release 158.0 had 5 reports on 2026-10-11, 6 on 10-12, 5 on 10-13, 15 on 10-14, 29 on 10-15 and 8 on 10-16, while nightly 160.0a1 jumped to 13 on 2026-10-15. (facets field=version by_day all_channels days=10)
  • handleFxaExceptions catches only FxaException; anything else, including InternalException, propagates. (mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/Utils.kt@3273685a4dab:20-49)
  • FirefoxAccount.getProfile wraps inner.getProfile(ignoreCache) in handleFxaExceptions with a null default, on a Dispatchers.IO scope backed by a SupervisorJob. (mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/FirefoxAccount.kt@3273685a4dab:30-31,104-109)
  • shouldPropagate() lists only FxaException subtypes, and FxaException is a typealias for mozilla.appservices.fxaclient.FxaException. (mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/Exceptions.kt@3273685a4dab:11-51)
  • The generated UniFFI Kotlin bindings throw InternalException for a Rust panic status (with the panic message if present) or for an unknown call status. (searchfox tip: toolkit/components/uniffi-bindgen-gecko-js/android/components/ads-client/android/src/main/java/mozilla/appservices/adsclient/ads_client.kt:288-293 (sibling binding, same template))
  • The Rust get_profile path (FirefoxAccount::get_profile / get_profile_helper) was last changed on 2026-06-25 by bug 2038896, long before the spike. (file_history third_party/application-services/components/fxa-client/src/internal/profile.rs)
  • The public get_profile takes self.internal.lock() and uses #[handle_error(Error)], so ordinary errors become FxaError. Only a panic, or an unknown status, would surface as InternalException. (third_party/application-services/components/fxa-client/src/profile.rs@3273685a4dab:34-37)
  • The representative report is a Java crash in the parent process with uptime 12 s. Its JavaException key is present but protected, and the minidump has no thread list. (crashstats report ecfbe00c-4139-4cb0-8bf6-ad65d0261016)

Alternatives considered:

  • b6f22ac8997d (bug 2079834, don't send scopes when sync decoupling is enabled): disfavored -- the diff only changes the scopes passed to BeginOAuthFlow in FxaAccountManager.beginAuthentication, it isn't in release 158.0, and release 158.0 rose over the same days.
  • Any changeset in the nightly 2026-10-14 pushlog as the cause: disfavored -- release 158.0, which contains none of them, shows the same rise and the same 2026-10-15 peak.
  • A change to the Rust profile code: disfavored -- internal/profile.rs has been unchanged since 2026-06-25.
  • Hardware error artefact: disfavored -- 0% bit-flip or Raptor Lake share (brief).
  • c12d48e17397 (vendoring application-services f22774fb, db-crypto move): not supported -- nothing links it to fxa-client, and it isn't in release 158.0.

Worth checking first:

  • Which Rust statement panics: read the protected JavaException messages (the panic text passed into InternalException) on the 2026-10-15 nightly and release reports. A single message, e.g. a JSON deserialization or unwrap failure, would pinpoint it.
  • Did FxA server behaviour change around 2026-10-09 to 2026-10-15 (profile endpoint, OAuth token responses, etags)? Confirm with the FxA server or operations team's deployment log.
  • Is it a panic or an unknown call status? The two message forms ('Rust panic' or a custom message vs 'Unknown rust call status') tell them apart.
  • Should android-components catch InternalException in handleFxaExceptions for getProfile? That is a defensive fix only and would hide the panic; decide after the panic site is known.

Filed automatically by Clouseau, which analyses nightly crashes with an LLM. Nothing above was written or checked by a human. Please close it as INVALID if it is wrong — that is useful feedback, not a nuisance.

This is not an independent Mozilla discovery: the crash is known here only because somebody submitted the crash report linked at the top. If this duplicates an existing report, please resolve THIS bug as the duplicate and leave the credit with the earlier reporter.

I believe this is another dupe of https://bugzilla.mozilla.org/show_bug.cgi?id=2082546, the crashes are all from the 10/07 build. There's almost no volume from builds after that.

Status: NEW → RESOLVED
Closed: 1 month ago
Duplicate of bug: 2082546
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.