Closed
Bug 1354411
Opened 8 years ago
Closed 7 years ago
Gracefully fallback if WebRenderAPI is not created
Categories
(Core :: Graphics: WebRender, defect)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
If GLContextProvider fails to create GLContext, WebRenderAPI is also not created. In this case, CompositorBridgeParent::AllocPWebRenderBridgeParent() crashes now. In this case, gecko should fallback to LayerManagerComposite composite.
Comment 1•8 years ago
|
||
If possible we should try to do the GLContext test early, before we set the gfxFeature for webrender.
Updated•8 years ago
|
Blocks: wr-stability
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Updated•8 years ago
|
No longer blocks: wr-stability
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Comment 3•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Status: REOPENED → RESOLVED
Closed: 8 years ago → 7 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 5•7 years ago
|
||
Reopen this bug since there is still STR to cause crash because of webrender initialization failure. Only my linux pc, it always failed to create 2nd webrender instance. It caused crash during creating 2nd windows.
WebRender's Multi-doc support could address this crash, but it is still necessary to handle 2nd window's initialization failure.
https://github.com/servo/webrender/pull/1509/files
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Assignee | ||
Updated•7 years ago
|
Attachment #8879408 -
Attachment is obsolete: true
Assignee | ||
Comment 6•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8892781 -
Flags: review?(bugmail)
Comment 7•7 years ago
|
||
Comment on attachment 8892781 [details] [diff] [review]
patch - Rebuild CompositorSessions if WebRender is disabled
Review of attachment 8892781 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/ipc/GPUProcessManager.cpp
@@ +424,5 @@
> +GPUProcessManager::DisableWebRender()
> +{
> + MOZ_ASSERT(gfx::gfxVars::UseWebRender());
> + if (!gfx::gfxVars::UseWebRender()) {
> + }
Empty if condition - did you mean to have an early return here?
::: gfx/layers/wr/WebRenderBridgeParent.cpp
@@ +528,5 @@
> }
> + // Do no handle DPEnd if WebRender is going to be disabled.
> + if (!gfxVars::UseWebRender()) {
> + return IPC_OK();
> + }
Instead of putting these checks on the parent side, can we instead just reset mWrChild to nullptr in the WebRenderLayerManager::Initialize function when if the textureFactorIdentifier isn't LAYERS_WR? I feel like once we start adding these checks on the parent side we'll have to add them to all the methods which gets pretty annoying. Best to not send the messages from the client side at all. Or are there other conditions where the client sends these messages?
Assignee | ||
Comment 8•7 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #7)
> Comment on attachment 8892781 [details] [diff] [review]
> patch - Rebuild CompositorSessions if WebRender is disabled
>
> Review of attachment 8892781 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: gfx/ipc/GPUProcessManager.cpp
> @@ +424,5 @@
> > +GPUProcessManager::DisableWebRender()
> > +{
> > + MOZ_ASSERT(gfx::gfxVars::UseWebRender());
> > + if (!gfx::gfxVars::UseWebRender()) {
> > + }
>
> Empty if condition - did you mean to have an early return here?
Yes, I forgot to add it.
>
> ::: gfx/layers/wr/WebRenderBridgeParent.cpp
> @@ +528,5 @@
> > }
> > + // Do no handle DPEnd if WebRender is going to be disabled.
> > + if (!gfxVars::UseWebRender()) {
> > + return IPC_OK();
> > + }
>
> Instead of putting these checks on the parent side, can we instead just
> reset mWrChild to nullptr in the WebRenderLayerManager::Initialize function
> when if the textureFactorIdentifier isn't LAYERS_WR? I feel like once we
> start adding these checks on the parent side we'll have to add them to all
> the methods which gets pretty annoying. Best to not send the messages from
> the client side at all. Or are there other conditions where the client sends
> these messages?
WebRenderLayerManager could not handle the problem well, since the problem happen on parent side. value of gfxVars::UseWebRender() was changed true to false during disabling webrender. It could happen at any timing on compositor thread. The problem happen by using gfxVars::UseWebRender(). It seems better to remove gfxVars::UseWebRender() usage on compositor thread.
Assignee | ||
Comment 9•7 years ago
|
||
> It seems better to remove gfxVars::UseWebRender() usage on compositor thread.
Correction:
It seems better to reduce gfxVars::UseWebRender() usage on compositor thread.
Assignee | ||
Comment 10•7 years ago
|
||
Attachment #8892781 -
Attachment is obsolete: true
Attachment #8892781 -
Flags: review?(bugmail)
Assignee | ||
Comment 11•7 years ago
|
||
attachment 8893251 [details] [diff] [review] reduced gfxVars::UseWebRender() usage on compositor thread to avoid the problem during disabling WebRender.
Assignee | ||
Updated•7 years ago
|
Attachment #8893251 -
Flags: review?(bugmail)
Comment 12•7 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #8)
> WebRenderLayerManager could not handle the problem well, since the problem
> happen on parent side. value of gfxVars::UseWebRender() was changed true to
> false during disabling webrender. It could happen at any timing on
> compositor thread.
Sorry, I don't really understand this. The gfxVars check happens on the parent side, but the RecvDPEnd etc calls are triggered because the WebRenderLayerManager sends the SendDPEnd message from the content side. So avoiding that send would avoid the checks in RecvDPEnd that you had in your first patch. The other changes (in the compositable code and other places) were fine, I didn't have a problem with those.
> The problem happen by using gfxVars::UseWebRender(). It
> seems better to remove gfxVars::UseWebRender() usage on compositor thread.
This is ok too. Although honestly it seems like gfxVars::UseWebRender should only ever change from true to false at two times: (1) during widget initialization, if we fail to start webrender or (2) if the gpu process resets, in which case all the state in the compositor is thrown away anyway. So I don't think we need to handle the more general case of the gfxvar changing to false at some random time that we can't predict.
Comment 13•7 years ago
|
||
Comment on attachment 8893251 [details] [diff] [review]
patch - Rebuild CompositorSessions if WebRender is disabled
Review of attachment 8893251 [details] [diff] [review]:
-----------------------------------------------------------------
This looks fine. I'd prefer if the commit message went into a bit more detail on the "There is a case" part. Can you describe what scenario triggers that case?
Attachment #8893251 -
Flags: review?(bugmail) → review+
Assignee | ||
Comment 14•7 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #12)
> > The problem happen by using gfxVars::UseWebRender(). It
> > seems better to remove gfxVars::UseWebRender() usage on compositor thread.
>
> This is ok too. Although honestly it seems like gfxVars::UseWebRender should
> only ever change from true to false at two times: (1) during widget
> initialization, if we fail to start webrender or (2) if the gpu process
> resets, in which case all the state in the compositor is thrown away anyway.
> So I don't think we need to handle the more general case of the gfxvar
> changing to false at some random time that we can't predict.
If e10s is enabled, but no-gpu process(default on linux and mac), gfxVars::UseWebRender change is soon notified by compositor thread. If WebRender creation failure happens at 2nd WebRender creation, there could be several WebRenderBridgeParents for 1st WebRender. WebRenderBridgeParents could receive several IPC messages that were sent before the gfxVars::UseWebRender change until Rebuild InProcessSessions and LayerManagers in content processes.
Assignee | ||
Comment 15•7 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #12)
> (In reply to Sotaro Ikeda [:sotaro] from comment #8)
> > WebRenderLayerManager could not handle the problem well, since the problem
> > happen on parent side. value of gfxVars::UseWebRender() was changed true to
> > false during disabling webrender. It could happen at any timing on
> > compositor thread.
>
> Sorry, I don't really understand this. The gfxVars check happens on the
> parent side, but the RecvDPEnd etc calls are triggered because the
> WebRenderLayerManager sends the SendDPEnd message from the content side. So
> avoiding that send would avoid the checks in RecvDPEnd that you had in your
> first patch. The other changes (in the compositable code and other places)
> were fine, I didn't have a problem with those.
IPC messages from WebRenderLayerManager are basically async, then there is a chance that WebRenderBridgeParents receive the messages after the gfxVars::UseWebRender change. And the gfxVars::UseWebRender change in content process could be delayed than WebRenderBridgeParents.
Assignee | ||
Comment 16•7 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #13)
> Comment on attachment 8893251 [details] [diff] [review]
> patch - Rebuild CompositorSessions if WebRender is disabled
>
> Review of attachment 8893251 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> This looks fine. I'd prefer if the commit message went into a bit more
> detail on the "There is a case" part. Can you describe what scenario
> triggers that case?
Yes, I will add more messages to the commit message.
Comment 17•7 years ago
|
||
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/901c59d3ab9f
Rebuild CompositorSessions if WebRender is disabled r=kats
Updated•7 years ago
|
Blocks: stage-wr-trains
Comment 18•7 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 7 years ago → 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•