Open Bug 1989195 Opened 6 months ago Updated 5 months ago

Crash in [@ mozilla::layers::NativeLayerWaylandRender::NextSurfaceAsFramebuffer] EGLContext is owned by thread

Categories

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

Other
Linux
defect

Tracking

()

Tracking Status
firefox145 --- disabled

People

(Reporter: release-mgmt-account-bot, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: crash)

Crash Data

Attachments

(2 files)

Crash report: https://crash-stats.mozilla.org/report/index/2f54c49d-7d6f-4eae-bc07-acc180250829

MOZ_CRASH Reason: MOZ_RELEASE_ASSERT(fbo) (GetFramebufferForBuffer failed.)

Top 10 frames of crashing thread:

0  libxul.so  MOZ_CrashSequence  mfbt/Assertions.h:248
0  libxul.so  mozilla::layers::NativeLayerWaylandRender::NextSurfaceAsFramebuffer  gfx/layers/NativeLayerWayland.cpp:1099
1  libxul.so  mozilla::wr::RenderCompositorNativeOGL::Bind  gfx/webrender_bindings/RenderCompositorNative.cpp:596
2  libxul.so  <webrender_bindings::bindings::WrCompositor as webrender::composite::Compositor>::bind  gfx/webrender_bindings/src/bindings.rs:1427
3  libxul.so  webrender::renderer::Renderer::draw_frame  gfx/wr/webrender/src/renderer/mod.rs:5344
4  libxul.so  webrender::renderer::Renderer::render_impl  gfx/wr/webrender/src/renderer/mod.rs:1675
5  libxul.so  webrender::renderer::Renderer::render  gfx/wr/webrender/src/renderer/mod.rs:1364
6  libxul.so  wr_renderer_render  gfx/webrender_bindings/src/bindings.rs:651
7  libxul.so  mozilla::wr::RendererOGL::UpdateAndRender  gfx/webrender_bindings/RendererOGL.cpp:230
7  libxul.so  mozilla::wr::RenderThread::UpdateAndRender  gfx/webrender_bindings/RenderThread.cpp:849

By querying Nightly crashes reported within the last 2 months, here are some insights about the signature:

  • First crash report: 2025-08-19
  • Process type: Parent
  • Is startup crash: No
  • Has user comments: No
  • Is null crash: Yes - all crashes happened on null or near null memory address

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Graphics: WebRender

Glenn, please adjust the P/S to better accuracy, if needed.

Severity: -- → S3
Flags: needinfo?(mozilla)
Priority: -- → P2
Flags: needinfo?(mozilla) → needinfo?(stransky)

HDR mode, disabled by default.

Flags: needinfo?(stransky)
Priority: P2 → P3

I ususally experience crash when scrolling video hosting sites - that shows main video and also load some previews of other videos. First I need to start playing main video - then does not matter if I stop the playback or leave it playing but start browsing it down so more amd more previews start loading. Then there is a good chance to crash. It is not immediately crashing , seems there is some random factors. It can crash immediately when start scrolling or can crash in 10 sec or minute.

and I do have hdr enabled - in fact I do not care about hdr intself but this new compositor implemented for hdr and activating together with hdr provides perfect power efficiency since 144 nigtly.

The key moment here - I need to start playing main video at least once. If I just open the page without starting play I can scroll it forever with no issue, but ones I start playin even if I stop it before start scrolling page becomes crashy

There's the related error message:

[1][GFX1]: MakeCurrent called on a thread other than the creating thread! (t=4230.53)
[2][GFX1]: EGLContext#true is owned by/Current on thread#48645 but MakeCurrent requested on thread#48555! (t=4230.53)
[3][GFX1-]: MozFramebuffer::CreateImpl(size:Size(1024,512), samples:0, depthAndStencil:true, colorTarget:0xde1, colorName:22): Incomplete: 0x0 (t=4230.59) 
Flags: needinfo?(stransky)
Flags: needinfo?(stransky)
Summary: Crash in [@ mozilla::layers::NativeLayerWaylandRender::NextSurfaceAsFramebuffer] → Crash in [@ mozilla::layers::NativeLayerWaylandRender::NextSurfaceAsFramebuffer] EGLContext is owned by thread
Flags: needinfo?(stransky)

Okay, looks like the gl context is shared somehow between threads and I suspect they're compositor/rendering/main here. The video decode hint indicates that dmabuf is involved here.

Can you run on terminal with MOZ_LOG="WidgetCompositor:5 Dmabuf:5" env variables, reproduce it and attach the log here?
Thanks.

Flags: needinfo?(stransky) → needinfo?(s.zharkoff)
Attached file log.txt

here is the last part of the log after crash.

Flags: needinfo?(s.zharkoff)

Looks like the crash reason is different here:

Crash Annotation GraphicsCriticalError: |[0][GFX1-]: (mate) Wayland protocol error: wp_viewport#16096: error 2: source rectangle out of buffer bounds
 (t=1748.36) [GFX1-]: (mate) Wayland protocol error: wp_viewport#16096: error 2: source rectangle out of buffer bounds

Can you please run with WAYLAND_DEBUG=1 MOZ_LOG="WidgetWayland:5" env variables and try to crash it again?
Thanks.

Flags: needinfo?(s.zharkoff)

Lot of the crashes here are 'Detect DeviceReset DeviceResetReason::UNKNOWN DeviceResetDetectPlace::WR_POST_UPDATE in Parent process ' so it matches Bug 1990162.

Attached file Wayland widget log
Flags: needinfo?(s.zharkoff)

Filed follow up for the viewport crashes Bug 1991369.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: