Closed Bug 1682483 Opened 3 years ago Closed 3 years ago

Fission Crash in [@ mozilla::wr::RenderCompositorD3D11SWGL::AttachExternalImage]

Categories

(Core :: Graphics: WebRender, defect, P3)

Unspecified
Windows 10
defect

Tracking

()

RESOLVED FIXED
87 Branch
Fission Milestone M6c
Tracking Status
firefox-esr78 --- unaffected
firefox85 --- unaffected
firefox86 --- wontfix
firefox87 --- fixed

People

(Reporter: aryx, Assigned: sotaro)

References

(Blocks 2 open bugs)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file, 1 obsolete file)

3/3 crashes with Fission enabled. All crashes on video sites (e.g. twitch.tv)

All crashes on Windows 10 x64, oldest reported build ID is 20201124092228.

Crash report: https://crash-stats.mozilla.org/report/index/21bf07ee-1439-46a2-8e7b-14eb70201215

MOZ_CRASH Reason: MOZ_RELEASE_ASSERT(image)

Top 10 frames of crashing thread:

0 xul.dll mozilla::wr::RenderCompositorD3D11SWGL::AttachExternalImage gfx/webrender_bindings/RenderCompositorD3D11SWGL.cpp:336
1 xul.dll webrender_bindings::swgl_bindings::{{impl}}::attach_external_image gfx/webrender_bindings/src/swgl_bindings.rs:1401
2 xul.dll webrender::renderer::Renderer::update_native_surfaces gfx/wr/webrender/src/renderer.rs:5880
3 xul.dll webrender::renderer::Renderer::render_impl gfx/wr/webrender/src/renderer.rs:3449
4 xul.dll webrender::renderer::Renderer::update gfx/wr/webrender/src/renderer.rs:2804
5 xul.dll mozilla::wr::RenderThread::UpdateAndRender gfx/webrender_bindings/RenderThread.cpp:496
6 xul.dll mozilla::wr::RenderThread::HandleFrameOneDoc gfx/webrender_bindings/RenderThread.cpp:327
7 xul.dll mozilla::detail::RunnableMethodImpl<RefPtr<mozilla::layers::APZCTreeManager>, void  xpcom/threads/nsThreadUtils.h:1201
8 xul.dll MessageLoop::DoWork ipc/chromium/src/base/message_loop.cc:548
9 xul.dll base::MessagePumpDefault::Run ipc/chromium/src/base/message_pump_default.cc:35

Low numbers but that could be due to low intersection of fission and software-webrender users.

Blocks: sw-wr
Severity: -- → S3
Priority: -- → P3
Flags: needinfo?(matt.woodrow)

It looks like the other callsites of GetRenderTexture are fallible (at least in release builds), so we should probably do the same here.

Super low numbers and no STR, so no real way to make progress on why this happens (I guess we released our video frame before we'd actually composited it).

Sotaro, do you have an idea on how we should keep these alive until the render thread has finished using them?

Flags: needinfo?(matt.woodrow) → needinfo?(sotaro.ikeda.g)
Fission Milestone: --- → M6c
Assignee: nobody → sotaro.ikeda.g
No longer blocks: sw-wr-correctness

Assert failure was always the following. Previous line of "MOZ_RELEASE_ASSERT(image);" seemed not hit. RenderTextureHost of the ExternalImageId seemed to exist. But it seemed not a valid type.

MOZ_RELEASE_ASSERT(image->AsRenderDXGITextureHost() || image->AsRenderDXGIYCbCrTextureHost())

Flags: needinfo?(sotaro.ikeda.g)

If comment 3 is correct, one possibility is that the following check for update usage is not correct.

With the patch, youtube video playback caused same crash.

By Attachment 9197676 [details] [diff], comment 4 seems like one possible cause of the crash.

Depends on: 1687427

(In reply to Sotaro Ikeda [:sotaro] from comment #3)

Assert failure was always the following. Previous line of "MOZ_RELEASE_ASSERT(image);" seemed not hit. RenderTextureHost of the ExternalImageId seemed to exist. But it seemed not a valid type.

MOZ_RELEASE_ASSERT(image->AsRenderDXGITextureHost() || image->AsRenderDXGIYCbCrTextureHost())

Since Bug 1687427 fix, I noticed that the "MOZ_RELEASE_ASSERT(image);" exists. There another cause of the problem.

Status: NEW → ASSIGNED

Since bug 1687427 fix, amount of crashes seemed to be reduced. It seems OK to make RenderCompositorD3D11SWGL::AttachExternalImage() to fallible like RenderThread::GetRenderTexture().

Attachment #9197676 - Attachment is obsolete: true

Sometimes, the following error log exists in crash reports, it might be a hint to the crash.

Updating unknown shared surface: 210453397521

Pushed by sikeda.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bbd74a090439
Make RenderCompositorD3D11SWGL::AttachExternalImage() fallible r=mattwoodrow
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: