Closed Bug 1494528 Opened 6 years ago Closed 6 years ago

GPU process start failure is not handled correctly when WebRender is enabled

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

With the following crash log, when gpu loanch is failed, it seemed to try to allocate WebRender in chrome process. But it is disabled and an unexpected STR.

https://crash-stats.mozilla.com/report/index/cc18ed3b-af9b-48c5-8d10-24ba30180924
Assignee: nobody → sotaro.ikeda.g
Summary: GPU process start failure is not handled correctly when WebRender is enabled. → GPU process start failure is not handled correctly
Component: Graphics: WebRender → Graphics
Blocks: 1494430
Attachment #9012480 - Attachment is obsolete: true
No longer blocks: 1494430
Summary: GPU process start failure is not handled correctly → GPU process start failure is not handled correctly when WebRender is enabled
When connection to GPU process is failed, GPUProcessManager::DisableGPUProcess() is called and it disables GPU process usage. And gfxPlatform::NotifyGPUProcessDisabled() is called in the DisableGPUProcess(). The NotifyGPUProcessDisabled() disables WebRender if it is enabled.

https://dxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxPlatform.cpp#3185
(In reply to Sotaro Ikeda [:sotaro] from comment #0)
> With the following crash log, when gpu loanch is failed, it seemed to try to
> allocate WebRender in chrome process. But it is disabled and an unexpected
> STR.
> 
> https://crash-stats.mozilla.com/report/index/cc18ed3b-af9b-48c5-8d10-24ba30180924

The crash suggests that GPU process is disabled, but it try to allocate WebRenderAPI in parent process. But in parent process, RenderThread is not initialized. Then it causes crash.

One possibility of causing the crash is that GPUProcessManager::EnsureGPUReady() is not called yet when nsBaseWidget::CreateCompositorSession() is called, and the EnsureGPUReady() is called in GPUProcessManager::CreateTopLevelCompositor(). And it failed to connect to GPU process and disabled GPU process and disabled gfxVars::UseWebRender(), but the CreateCompositorSession() already decided to use WebRender before calling the CreateTopLevelCompositor().
Blocks: wr-stability
Attachment #9012539 - Flags: review?(aosmond)
Comment on attachment 9012539 [details] [diff] [review]
patch - Call GPUProcessManager::EnsureGPUReady() before accessing gfxVars::UseWebRender()

Review of attachment 9012539 [details] [diff] [review]:
-----------------------------------------------------------------

Nice catch.
Attachment #9012539 - Flags: review?(aosmond) → review+
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a94730ef300e
Call GPUProcessManager::EnsureGPUReady() before accessing gfxVars::UseWebRender() r=aosmond
https://hg.mozilla.org/mozilla-central/rev/a94730ef300e
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: