Closed Bug 1699533 Opened 4 years ago Closed 4 years ago

fairly reproducible canvas-y crashes on https://lab.hakim.se/hypnos/

Categories

(Core :: Graphics: Canvas2D, defect)

defect

Tracking

()

VERIFIED FIXED
89 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox86 --- wontfix
firefox87 --- wontfix
firefox88 --- verified
firefox89 --- verified

People

(Reporter: mayankleoboy1, Assigned: bobowen)

References

Details

Crash Data

Attachments

(2 files)

  1. Use my usual latest Nightly profile
  2. Go to https://lab.hakim.se/hypnos/
  3. Try to duplicate the tab a couple of times by right click on tab-> Duplicate tab

Do this a couple of times. Then try closing the tabs one by one

AR: Either a "tab turns white" crash, or a silent background crash.
ER : not so

I get a variety of crash signatures. Posting a few.

Attached file about:upport
Crash Signature: [@ igd10iumd64.dll | CContext::UMQuerySO_Targets_ ] [@ igd10iumd64.dll | CTransformSink::AddLines ] [@ igd10iumd64.dll | CContext::UMQueryRS_Scissor_ ]
Crash Signature: [@ igd10iumd64.dll | CContext::UMQuerySO_Targets_ ] [@ igd10iumd64.dll | CTransformSink::AddLines ] [@ igd10iumd64.dll | CContext::UMQueryRS_Scissor_ ] → [@ igd10iumd64.dll | CContext::UMQuerySO_Targets_ ] [@ igd10iumd64.dll | CTransformSink::AddLines ] [@ igd10iumd64.dll | CContext::UMQueryRS_Scissor_ ] [@ igd10iumd64.dll | CContext::UMQueryPS_Shader_ ]
Crash Signature: [@ igd10iumd64.dll | CContext::UMQuerySO_Targets_ ] [@ igd10iumd64.dll | CTransformSink::AddLines ] [@ igd10iumd64.dll | CContext::UMQueryRS_Scissor_ ] [@ igd10iumd64.dll | CContext::UMQueryPS_Shader_ ] → [@ igd10iumd64.dll | CContext::UMQuerySO_Targets_ ] [@ igd10iumd64.dll | CTransformSink::AddLines ] [@ igd10iumd64.dll | CContext::UMQueryRS_Scissor_ ] [@ igd10iumd64.dll | CContext::UMQueryPS_Shader_ ] [@ igd10iumd64.dll | CContext::TID3D11DeviceCon…
Crash Signature: CContext::TID3D11DeviceContext_IASetVertexBuffers_<T> ] → CContext::TID3D11DeviceContext_IASetVertexBuffers_<T> ] [@ igd10iumd64.dll | CContext::TID3D11DeviceContext_SetShaderResources_<T> ]

Hi Mayank, thanks for the bug, would you mind testing with: pref gfx.canvas.remote=false

Flags: needinfo?(mayankleoboy1)
Crash Signature: CContext::TID3D11DeviceContext_IASetVertexBuffers_<T> ] [@ igd10iumd64.dll | CContext::TID3D11DeviceContext_SetShaderResources_<T> ] → CContext::TID3D11DeviceContext_IASetVertexBuffers_<T> ] [@ igd10iumd64.dll | CContext::TID3D11DeviceContext_SetShaderResources_<T> ] [@ igd10iumd64.dll | CContext::UMQueryOM_RenderTargets_ ]
Flags: needinfo?(mayankleoboy1)

(In reply to Bob Owen (:bobowen) from comment #3)

Hi Mayank, thanks for the bug, would you mind testing with: pref gfx.canvas.remote=false

I do not crash with gfx.canvas.remote=false

Flags: needinfo?(bobowencode)

NB: these are not new crashes or new regression. I have been reproducing these crashes for atleast a month.

Thanks for the report.
I can also reproduce a crash on my old laptop with only Intel graphics, although the signature is different.
I wonder if we need to be using AutoSerializeWithMoz2D for uses of the Direct3D and DXGI APIs in the compositor and webrender threads, like we do in the canvas ones.

Essentially nothing has changed with remote canvas with respect to the Direct2D writing calls, except we are now processing the Direct2D calls in the same process.
So, the Direct2D device is in the same process, which might make the difference here.

Assignee: nobody → bobowencode
Status: NEW → ASSIGNED
Flags: needinfo?(bobowencode)

This should ensure that we are more rigorous about always serializing when
required. For example in this crash it appears the issue is that we are not
using it when destroying the textures still held by the CanvasTranslator on its
destruction. It also means that we can minimize the code that is serialized,
which should reduce contention and possible deadlocks.

This patch also ensures that we drop any other references to the texture's
DrawTarget before dropping the texture, so that it can control the destruction
of its DrawTarget including any locking.

Pushed by bobowencode@gmail.com: https://hg.mozilla.org/integration/autoland/rev/95dbe830d8bf Push most uses of AutoSerializeWithMoz2D in canvas classes into D3D11TextureData. r=mattwoodrow
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch

Comment on attachment 9211574 [details]
Bug 1699533: Push most uses of AutoSerializeWithMoz2D in canvas classes into D3D11TextureData. r=mattwoodrow!

Beta/Release Uplift Approval Request

  • User impact if declined: This stops a number of crashes within graphics drivers in the GPU process.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See description.
  • List of other uplifts needed: None
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): This isn't a trivial change, so not putting low.
    However, it is mainly making the locking more consistent, i.e. doing what we already do, but covering places we've missed.
  • String changes made/needed: None
Attachment #9211574 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Blocks: 1700357

Comment on attachment 9211574 [details]
Bug 1699533: Push most uses of AutoSerializeWithMoz2D in canvas classes into D3D11TextureData. r=mattwoodrow!

Approved for 88.0b5.

Attachment #9211574 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]
Regressions: 1702133

I've managed to reproduce this issue on Windows 10 using Firefox 87.0 using the STR from the description. After duplicating ~20 tabs and closing several of them, the page turned white.

Confirming that with Firefox 88.0b5 (build ID 20210330185720) and latest 89.0a1 Nightly (build ID 20210331215444) I don't see any white page / crash.
Tested on Windows 10x64 and Ubuntu 20.04.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Duplicate of this bug: 1700357
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: