Closed Bug 1852741 Opened 2 years ago Closed 2 years ago

Crash at mozilla::wr::RendererOGL::UpdateAndRender() for WebGL scenes (Raw external data is not expected for deferred resolves!)

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Firefox crashes in WebRender while WebGL scene is rendered on Linux.

It crashes in rust in:

panic!("Raw external data is not expected for deferred resolves!");

partial backtrace:

#15 0x00007f912b97d3fc in webrender::renderer::Renderer::update_deferred_resolves (self=0x7f90fb14e000, deferred_resolves=...) at gfx/wr/webrender/src/renderer/mod.rs:4291
#16 webrender::renderer::Renderer::prepare_gpu_cache (self=0x7f90fb14e000, deferred_resolves=...) at gfx/wr/webrender/src/renderer/gpu_cache.rs:494
#17 0x00007f912b98162c in webrender::renderer::Renderer::render_impl (self=0x7f90fb14e000, doc_id=..., active_doc=0x7f91110bacd0, device_size=..., buffer_age=2)
    at gfx/wr/webrender/src/renderer/mod.rs:1512
#18 0x00007f912b9808c9 in webrender::renderer::Renderer::render (self=0x7f90fb14e000, device_size=..., buffer_age=2) at gfx/wr/webrender/src/renderer/mod.rs:1240
#19 0x00007f912b7ca2f1 in webrender_bindings::bindings::wr_renderer_render (renderer=0x10c3, width=285975348, height=1, buffer_age=0, out_stats=0x7f91110bb7e0, out_dirty_rects=0x0)
    at gfx/webrender_bindings/src/bindings.rs:619
#20 0x00007f91268b004b in mozilla::wr::RendererOGL::UpdateAndRender(mozilla::Maybe<mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> > const&, mozilla::Maybe<mozilla::wr::ImageFormat> const&, mozilla::Maybe<mozilla::Range<unsigned char> > const&, bool*, mozilla::wr::RendererStats*)
    (this=0x7f90fc6c2b20, aReadbackSize=..., aReadbackFormat=..., aReadbackBuffer=..., aNeedsYFlip=0x0, aOutStats=aOutStats@entry=0x7f91110bb7e0)
    at /raid/src/gfx/webrender_bindings/RendererOGL.cpp:190
#21 0x00007f91268af620 in mozilla::wr::RenderThread::UpdateAndRender(mozilla::wr::WrWindowId, mozilla::layers::BaseTransactionId<mozilla::VsyncIdType> const&, mozilla::TimeStamp const&, bool, mozilla::Maybe<mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> > const&, mozilla::Maybe<mozilla::wr::ImageFormat> const&, mozilla::Maybe<mozilla::Range<unsigned char> > const&, bool*) (this=this@entry=0x7f910fe13c30, aWindowId=aWindowId@entry=..., aStartId=..., aStartTime=..., aRender=true, aReadbackSize=..., aReadbackFormat=..., aReadbackBuffer=..., aNeedsYFlip=0x0)
    at /raid/src/gfx/webrender_bindings/RenderThread.cpp:781
#22 0x00007f91268aeddf in mozilla::wr::RenderThread::HandleFrameOneDocInner(mozilla::wr::WrWindowId, bool, bool, mozilla::Maybe<mozilla::wr::FramePublishId>)
    (this=this@entry=0x7f910fe13c30, aWindowId=aWindowId@entry=..., aRender=true, aTrackedFrame=<optimized out>, aPublishId=...) at /raid/src/gfx/webrender_bindings/RenderThread.cpp:624
#23 0x00007f91268ae3f2 in mozilla::wr::RenderThread::HandleFrameOneDoc(mozilla::wr::WrWindowId, bool, bool, mozilla::Maybe<mozilla::wr::FramePublishId>)
    (this=0x7f910fe13c30, aWindowId=..., aRender=false, aTrackedFrame=true, aPublishId=...) at /raid/src/gfx/webrender_bindings/RenderThread.cpp:573
#24 mozilla::wr::RenderThread::WrNotifierEvent_HandleNewFrameReady(mozilla::wr::WrWindowId, bool, mozilla::wr::FramePublishId)
    (this=0x7f910fe13c30, aWindowId=..., aCompositeNeeded=false, aPublishId=...) at /raid/src/gfx/webrender_bindings/RenderThread.cpp:534

Reproduction steps:

  1. Go to https://webglsamples.org
  2. open all samples, each in new tab
  3. Pres CTRL+PgDown which cycles between tabs
  4. see Firefox freeze and crash

I can't reproduce this on Windows with Firefox stable 117. Is it only reproducible on Linux?

It seems we are violating an internal invariant (possibly due to cycling through pages faster than updating data?).
Can someone familiar with this code chime in?

Blocks: gfx-triage

Martin, is the a regression? Can you try to find a regression window?

Flags: needinfo?(stransky)

This is probably quite machine / environment dependent, can we get about:support too?

I made a brief attempt to repro this but failed, on nvidia proprietary driver 535 on Ubuntu 23.04 with Wayland, not sure if the data point is useful but thought I'd mention it.

The problem might be related to Bug 1851432.

Yes, I'll test that on Intel (I'm on AMD now) and try to find regression range although I think regression but may be the one where accelerated canvas was enabled.

But this is just a side effect of Bug 1850696 - the reproducer is there. If we're out of free file descriptors we fail to create next dmabuf surface. I'll create a patch with better error handling.

Core cause looks fixed by Bug 1851377 but we should better react to dmabuf import.

Flags: needinfo?(stransky)
Assignee: nobody → stransky
Status: NEW → ASSIGNED
Attachment #9353367 - Attachment description: Bug 1852741 [Linux] Delete DMABUFTextureHostOGL is dmabuf surface import fails r?sotaro → Bug 1852741 [Linux] Delete DMABUFTextureHostOGL if dmabuf surface import fails r?sotaro
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/0909e599f530 [Linux] Delete DMABUFTextureHostOGL if dmabuf surface import fails r=sotaro
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: