Closed Bug 1641315 Opened 11 months ago Closed 11 months ago

Crash in [@ java.lang.IllegalStateException: at org.mozilla.gecko.process.GeckoProcessManager$ChildConnection.getPid(GeckoProcessManager.java)]

Categories

(GeckoView :: General, defect, P1)

Unspecified
Android

Tracking

(firefox76 unaffected, firefox77 wontfix, firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox76 --- unaffected
firefox77 --- wontfix
firefox78 --- fixed

People

(Reporter: aklotz, Assigned: aklotz)

Details

(Keywords: crash, Whiteboard: [geckoview:m78])

Crash Data

Attachments

(1 file)

This bug is for crash report bp-3eeace59-6ef5-47a1-b024-181750200526.

Java stack trace:

java.lang.IllegalStateException
	at org.mozilla.gecko.process.GeckoProcessManager$ChildConnection.getPid(GeckoProcessManager.java:4)
	at org.mozilla.gecko.process.GeckoProcessManager$ConnectionManager.removeContentConnection(GeckoProcessManager.java:3)
	at org.mozilla.gecko.process.GeckoProcessManager$ConnectionManager.removeConnection(GeckoProcessManager.java:4)
	at org.mozilla.gecko.process.ServiceAllocator$InstanceInfo.unbindService(ServiceAllocator.java:16)
	at org.mozilla.gecko.process.ServiceAllocator$InstanceInfo.onBinderConnectedInternal(ServiceAllocator.java:15)
	at org.mozilla.gecko.process.ServiceAllocator$InstanceInfo$Binding.lambda$onServiceConnected$0$ServiceAllocator$InstanceInfo$Binding(ServiceAllocator.java:2)
	at org.mozilla.gecko.process.-$$Lambda$ServiceAllocator$InstanceInfo$Binding$GH4LBN9B7GpQKa5rjxdu9sMiy1s.run(Unknown Source:4)
	at org.mozilla.gecko.util.XPCOMEventTarget.runOnLauncherThread(XPCOMEventTarget.java:3)
	at org.mozilla.gecko.process.ServiceAllocator$InstanceInfo$Binding.onServiceConnected(ServiceAllocator.java:1)
	at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1963)
	at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1995)
	at org.mozilla.gecko.util.XPCOMEventTarget$JNIRunnable.run(XPCOMEventTarget.java:1)

This crash hits when a RemoteException is thrown during onServiceConnected.
We unbind, which destroys all our bookkeeping data. During this destruction,
we also attempt to retrieve the pid, which fails because we lost our binding
before we had a chance to retrieve it.

This patch adds a new exception to be thrown in this case, which we explicitly
catch in removeContentConnection.

Pushed by aklotz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/18c2608ab71f
Fix crash when a binding connection is lost during final connection setup; r=geckoview-reviewers,agi
Whiteboard: [geckoview:m78]
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.