Closed Bug 2082335 Opened 1 month ago Closed 1 month ago

Crash in [@ mozilla.appservices.relay.InternalException: at mozilla.appservices.relay.RelayKt.uniffiCheckCallStatus(relay.kt:40)]

Categories

(Firefox for Android :: Privacy, defect)

All
Android
defect

Tracking

()

RESOLVED DUPLICATE of bug 2082546

People

(Reporter: clouseau-bot, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: crash, topcrash)

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/a3ebb3b3-0e34-4071-b8f0-42d410261015

Top 10 frames:

0  mozilla.appservices.relay.RelayKt  uniffiCheckCallStatus  toolkit/components/uniffi-bindgen-gecko-js/android/components/relay/android/src/main/java/mozilla/appservices/relay/relay.kt
1  mozilla.appservices.relay.RelayKt  access$uniffiCheckCallStatus  toolkit/components/uniffi-bindgen-gecko-js/android/components/relay/android/src/main/java/mozilla/appservices/relay/relay.kt
2  mozilla.appservices.relay.RelayClient  fetchProfile  toolkit/components/uniffi-bindgen-gecko-js/android/components/relay/android/src/main/java/mozilla/appservices/relay/relay.kt
3  mozilla.components.service.fxrelay.FxRelayImpl$fetchProfile$2$2  invokeSuspend  mobile/android/android-components/components/service/firefox-relay/src/main/java/mozilla/components/service/fxrelay/FxRelay.kt
4  mozilla.components.service.fxrelay.FxRelayImpl$fetchProfile$2$2  invoke  mobile/android/android-components/components/service/firefox-relay/src/main/java/mozilla/components/service/fxrelay/FxRelay.kt
5  mozilla.components.service.fxrelay.FxRelayImpl  handleRelayExceptions  mobile/android/android-components/components/service/firefox-relay/src/main/java/mozilla/components/service/fxrelay/FxRelay.kt
6  mozilla.components.service.fxrelay.FxRelayImpl$fetchProfile$2  invokeSuspend  mobile/android/android-components/components/service/firefox-relay/src/main/java/mozilla/components/service/fxrelay/FxRelay.kt
7  mozilla.components.service.fxrelay.FxRelayImpl$fetchProfile$2  invoke  mobile/android/android-components/components/service/firefox-relay/src/main/java/mozilla/components/service/fxrelay/FxRelay.kt
8  kotlinx.coroutines.intrinsics.UndispatchedKt  startUndispatched
9  kotlinx.coroutines.BuildersKt__Builders_commonKt  withContext

There is 1 crash in nightly 160 with buildid 20261014215550.

This bug looks actionable because:

  • A Rust panic inside RelayClient::fetch_profile reaches Kotlin as mozilla.appservices.relay.InternalException, which FxRelayImpl.handleRelayExceptions does not catch, so the profile fetch crashes Fenix.

    1. FxRelayImpl.fetchProfile runs client.fetchProfile() inside handleRelayExceptions, whose only catch clause is catch (e: RelayApiException).
    2. The generated binding RelayClient.fetchProfile calls uniffi_relay_fn_method_relayclient_fetch_profile through uniffiRustCallWithError(RelayApiException), so ordinary Rust errors come back as a caught RelayApiException.
    3. When the Rust call returns a panic status, uniffiCheckCallStatus throws InternalException (a plain kotlin.Exception) instead of lifting a RelayApiException.
    4. That exception is not caught by handleRelayExceptions, fetchProfile or fetchAccountDetails, and it terminates the parent process from the Dispatchers.IO coroutine.

    The exception class and frame 0 (uniffiCheckCallStatus), with fetchProfile and handleRelayExceptions above it, match this chain. The panic message is not in the report. The Rust fetch_profile body has no explicit panic and sends through viaduct Client::send_sync (pollster::block_on) to the registered backend, which is the likely source but is not shown here. First, look at whether handleRelayExceptions should also handle InternalException, so a Relay background fetch cannot crash the browser. Then look at what panics in the Rust relay/viaduct path on Android.

  • The failing code comes from c0ac317234cf (gh) (bug 1977879) by gela.

Code references:

gela, can you have a look please?

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.

The bug is linked to a topcrash signature, which matches the following criterion:

  • Top 10 AArch64 and ARM crashes on nightly

For more information, please visit BugBot documentation.

Keywords: topcrash
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.