Closed Bug 1768053 Opened 3 years ago Closed 1 year ago

mozilla.components.feature.media.service.MediaSessionServiceDelegate$onCreate Crash in [@ java.lang.IllegalStateException: at android.os.Parcel.createExceptionOrNull] Too many receivers, total of 1000, registered for pid

Categories

(GeckoView :: Media, defect, P5)

Unspecified
Android
defect

Tracking

(firefox100 affected, firefox101 affected, firefox102 affected, firefox106 affected, firefox107 affected, firefox108 affected, firefox110 affected, firefox111 affected, firefox112 affected, firefox114 affected, firefox115 ?, firefox116 ?)

RESOLVED WORKSFORME
Tracking Status
firefox100 --- affected
firefox101 --- affected
firefox102 --- affected
firefox106 --- affected
firefox107 --- affected
firefox108 --- affected
firefox110 --- affected
firefox111 --- affected
firefox112 --- affected
firefox114 --- affected
firefox115 --- ?
firefox116 --- ?

People

(Reporter: cpeterson, Unassigned)

References

Details

(Keywords: crash, Whiteboard: [fxdroid] [group4])

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/f098bbbb-7fa6-46c5-b682-b13a00220505

Looks like a bug related to mozilla.components.feature.media.service.MediaSessionServiceDelegate$onCreate

Java stack trace:

java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid: 31989, callerPackage: org.mozilla.fenix
	at android.os.Parcel.createExceptionOrNull(Parcel.java:2433)
	at android.os.Parcel.createException(Parcel.java:2409)
	at android.os.Parcel.readException(Parcel.java:2392)
	at android.os.Parcel.readException(Parcel.java:2334)
	at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5530)
	at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1769)
	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1723)
	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1711)
	at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:724)
	at mozilla.components.feature.media.service.MediaSessionServiceDelegate$onCreate$1$invokeSuspend$$inlined$collect$1.emit(Collect.kt:25)
	at mozilla.components.support.ktx.kotlinx.coroutines.flow.FlowKt$ifChanged$$inlined$filter$1$2.emit(Collect.kt:9)
	at mozilla.components.feature.media.service.MediaSessionServiceDelegate$onCreate$1$invokeSuspend$$inlined$map$1$2.emit(Collect.kt:5)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:14)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Channels.kt:1)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:4)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:18)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7839)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:12463)
	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2209)
	at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2498)
	at android.os.Binder.execTransactInternal(Binder.java:1179)
	at android.os.Binder.execTransact(Binder.java:1143)
Component: General → Stability
Product: GeckoView → Fenix

No crash reports since Fenix 103.2.0.

Severity: S3 → S2
Component: Stability → General
Priority: P3 → P5

Since the crash volume is low (less than 5 per week), the severity is downgraded to S3. Feel free to change it back if you think the bug is still critical.

For more information, please visit auto_nag documentation.

Severity: S2 → S3
Crash Signature: [@ java.lang.IllegalStateException: at android.os.Parcel.createExceptionOrNull(Parcel.java)] → [@ java.lang.IllegalStateException: at android.os.Parcel.createExceptionOrNull]
Summary: mozilla.components.feature.media.service.MediaSessionServiceDelegate$onCreate Crash in [@ java.lang.IllegalStateException: at android.os.Parcel.createExceptionOrNull(Parcel.java)] Too many receivers, total of 1000, registered for pid → mozilla.components.feature.media.service.MediaSessionServiceDelegate$onCreate Crash in [@ java.lang.IllegalStateException: at android.os.Parcel.createExceptionOrNull] Too many receivers, total of 1000, registered for pid
Crash Signature: [@ java.lang.IllegalStateException: at android.os.Parcel.createExceptionOrNull] → [@ java.lang.IllegalStateException: at android.os.Parcel.createExceptionOrNull(Parcel.java)] [@ java.lang.IllegalStateException: at android.os.Parcel.createExceptionOrNull(Unknown Source:31)]
Duplicate of this bug: 1764516

The severity field for this bug is set to S3. However, the following bug duplicate has higher severity:

:cpeterson, could you consider increasing the severity of this bug to S2?

For more information, please visit auto_nag documentation.

Flags: needinfo?(cpeterson)

The exception's reason is "java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid: 31989, callerPackage: org.mozilla.fenix". Who are these 1000 receivers? What are they receiving? Were they all created by A-C's mozilla.components.feature.media.service.MediaSessionServiceDelegate code? Is this our bug or an Android OOM?

Severity: S3 → S2
Component: General → Media
Flags: needinfo?(cpeterson)
Product: Fenix → GeckoView
Whiteboard: [fxdroid] [group4]

The recent reports under this crash signature [@ java.lang.IllegalStateException: at android.os.Parcel.createExceptionOrNull(Parcel.java) ] look to be unrelated to the original bug created regarding mozilla.components.feature.media.service.MediaSessionServiceDelegate$onCreate. The recent reports show below as the stack trace, with calls to ContentInputStream.isReadable and ContentResolver.openAssetFileDescriptor.

java.lang.IllegalStateException
	at android.os.Parcel.createExceptionOrNull(Parcel.java:2394)
	at android.os.Parcel.createException(Parcel.java:2370)
	at android.os.Parcel.readException(Parcel.java:2353)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
	at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:153)
	at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:781)
	at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1993)
	at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1808)
	at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1724)
	at org.mozilla.geckoview.ContentInputStream.isReadable(ContentInputStream.java:38)
	at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
	at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:615)

Closing this crash out and opening a different bug for this new crash https://bugzilla.mozilla.org/show_bug.cgi?id=1888978.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.