Closed Bug 1756569 Opened 3 years ago Closed 3 years ago

Crash in [@ java.lang.NullPointerException: at org.mozilla.gecko.process.GeckoProcessManager.getCompositorSurfaceManager(GeckoProcessManager.java)]

Categories

(Core :: Graphics, defect)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox97 --- unaffected
firefox98 --- unaffected
firefox99 --- fixed

People

(Reporter: jnicol, Assigned: jnicol)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/ff375cbc-9c0a-4812-b062-18f650220220

Java stack trace:

java.lang.NullPointerException
	at org.mozilla.gecko.process.GeckoProcessManager.getCompositorSurfaceManager(GeckoProcessManager.java:4)

This is a crash with the GPU process enabled on Android. I think what is happening is that we are encountering a GPU process crash early in its startup. In response to this the GeckoProcessManager will remove the GpuProcessConnection from its mNonContentConnections map here. Then when GPU process initialization is completing we we attempt to fetch the CompositorSurfaceManager from the GeckoProcessManager but hit a null pointer assertion here.

I can reproduce by manually inserting a MOZ_CRASH in GPUParent::Init() and inserting a sleep before we dispatch the GetCompositorSurfaceManager() call to the launcher thread in GPUProcessHost::InitAfterConnect().

It's perhaps slightly concerning that the numbers for this crash (~250 in the past fortnight) are higher than total GPU process crashes (~210), especially given that there is quite a small time window in which the GPU process crash must occur to cause the null pointer exception. But if we hit this null pointer exception then the parent process crashes before we have a chance to report the GPU process crash. So at the very least fixing this should help us uncover any underlying problem.

FTR this was regressed by bug 1331109, which was then backed out, hence why the crash stopped in the Feb 15th build. But it will come back when the GPU process is re-enabled.

Regressed by: 1331109
Has Regression Range: --- → yes

If the GPU process crashes immediately after startup, before
GPUProcessHost calls getCompositorSurfaceManager, then the
getExistingConnection call will return null. This wasn't being
handled, resulting in a parent process crash due to a null pointer
exception.

This patch simply returns null from getCompositorSurfaceManager if it
cannot find the GpuProcessConnection. This will avoid the parent
process crash, allowing the GPU process crash to be handled
correctly (sending a crash report and restarting/disabling the GPU
process).

Assignee: nobody → jnicol
Status: NEW → ASSIGNED
Pushed by jnicol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/116789a85456 Handle null connection in GeckoProcessManager.getCompositorSurfaceManager. r=geckoview-reviewers,calu
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: