Closed Bug 1448770 Opened 7 years ago Closed 6 years ago

WebRender tries to use non-advertised OpenGL extensions (e.g., GL_EXT_debug_marker)

Categories

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

x86
FreeBSD
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox60 --- disabled
firefox61 --- disabled
firefox62 --- disabled
firefox63 --- fixed

People

(Reporter: jbeich, Unassigned, NeedInfo)

References

(Blocks 2 open bugs, )

Details

Attachments

(1 file)

mozilla-unified changeset b99844d179ca snapshot built by Clang 4.0.0 on FreeBSD 11.1 i386. Doesn't affect amd64. $ rm -rf objdir/tmp/scratch_user; mkdir -p objdir/tmp/scratch_user $ echo 'user_pref("browser.tabs.remote.autostart", false);' >>objdir/tmp/scratch_user/user.js $ echo 'user_pref("gfx.webrender.all", true);' >>objdir/tmp/scratch_user/user.js $ gdb --args objdir/dist/bin/firefox -no-remote -profile objdir/tmp/scratch_user [...] Thread 23 "Renderer" received signal SIGSEGV, Segmentation fault. [Switching to LWP 101339 of process 74486] 0x35cbb100 in ?? () (gdb) bt #0 0x35cbb100 in ?? () #1 0x2eef8bb0 in <gleam::gl::GlFns as gleam::gl::Gl>::push_group_marker_ext (self=0x35cee008, message=...) at third_party/rust/gleam/src/gl_fns.rs:1558 #2 0x2f2c3c49 in webrender::query::GpuMarker::new (gl=0x35cef730, message=...) at gfx/webrender/src/query.rs:277 #3 0x2edea86d in webrender::renderer::Renderer::render_impl (self=<optimized out>, framebuffer_size=...) at gfx/webrender/src/renderer.rs:2028 #4 0x2edea79e in webrender::renderer::Renderer::render (self=<optimized out>, framebuffer_size=...) at gfx/webrender/src/renderer.rs:2006 #5 0x2ec6f8fb in wr_renderer_render (renderer=<optimized out>, width=<optimized out>, height=<optimized out>) at gfx/webrender_bindings/src/bindings.rs:529 #6 0x2b3fa3b3 in mozilla::wr::RendererOGL::UpdateAndRender (this=0x35c0e0c0, aReadback=<optimized out>) at gfx/webrender_bindings/RendererOGL.cpp:136 #7 0x2b3f9d39 in mozilla::wr::RenderThread::UpdateAndRender (this=<optimized out>, aWindowId=..., aReadback=<optimized out>) at gfx/webrender_bindings/RenderThread.cpp:256 #8 0x2b3f9b48 in mozilla::wr::RenderThread::NewFrameReady (this=<optimized out>, aWindowId=...) at gfx/webrender_bindings/RenderThread.cpp:174 #9 0x2b400735 in mozilla::detail::RunnableMethodArguments<mozilla::wr::WrWindowId>::applyImpl<mozilla::wr::RenderThread, void (mozilla::wr::RenderThread::*)(mozilla::wr::WrWindowId), StoreCopyPassByConstLRef<mozilla::wr::WrWindowId>, 0u> (o=<optimized out>, m=<optimized out>, args=...) at obj-i386-unknown-freebsd11.1/dist/include/nsThreadUtils.h:1164 #10 mozilla::detail::RunnableMethodArguments<mozilla::wr::WrWindowId>::apply<mozilla::wr::RenderThread, void (mozilla::wr::RenderThread::*)(mozilla::wr::WrWindowId)> (o=<optimized out>, m=<optimized out>, this=<optimized out>) at obj-i386-unknown-freebsd11.1/dist/include/nsThreadUtils.h:1170 #11 mozilla::detail::RunnableMethodImpl<mozilla::wr::RenderThread*, void (mozilla::wr::RenderThread::*)(mozilla::wr::WrWindowId), true, (mozilla::RunnableKind)0, mozilla::wr::WrWindowId>::Run (this=<optimized out>) at obj-i386-unknown-freebsd11.1/dist/include/nsThreadUtils.h:1215 #12 0x2aac2eeb in MessageLoop::RunTask (this=0xfa3c7ec8, aTask=...) at ipc/chromium/src/base/message_loop.cc:452 #13 MessageLoop::DeferOrRunPendingTask (this=0x35cee008, pending_task=...) at ipc/chromium/src/base/message_loop.cc:460 #14 0x2aac321b in MessageLoop::DoWork (this=0xfa3c7ec8) at ipc/chromium/src/base/message_loop.cc:535 #15 0x2aac3bd2 in base::MessagePumpDefault::Run (this=<optimized out>, delegate=<optimized out>) at ipc/chromium/src/base/message_pump_default.cc:36 #16 0x2aac28fe in MessageLoop::RunInternal (this=0x3076d303 <str.2d>) at ipc/chromium/src/base/message_loop.cc:326 #17 MessageLoop::RunHandler (this=<optimized out>) at ipc/chromium/src/base/message_loop.cc:319 #18 MessageLoop::Run (this=0x3076d303 <str.2d>) at ipc/chromium/src/base/message_loop.cc:299 #19 0x2aacf653 in base::Thread::ThreadMain (this=0x33d1efc0) at ipc/chromium/src/base/thread.cc:181 #20 0x2aac7b79 in ThreadFunc (closure=0x33d1efc0) at ipc/chromium/src/base/platform_thread_posix.cc:38 #21 0x281b1644 in thread_start (curthread=0x32652700) at /usr/src/lib/libthr/thread/thr_create.c:289 #22 0x00000000 in ?? () (gdb) x/10i 0x35cbb100 => 0x35cbb100: mov 0x29ddfb98,%eax 0x35cbb105: test %eax,%eax 0x35cbb107: je 0x35cbb10f 0x35cbb109: jmp *0x1a08(%eax) 0x35cbb10f: call 0x35cbbb40 0x35cbb114: jmp *0x1a08(%eax) 0x35cbb11a: nop 0x35cbb11b: nop 0x35cbb11c: nop 0x35cbb11d: nop (gdb) info registers eax 0x3076d303 813093635 ecx 0x35cee008 902750216 edx 0xd 13 ebx 0x30a5cff4 816173044 esp 0xfa3c7a5c 0xfa3c7a5c ebp 0xfa3c7a6c 0xfa3c7a6c esi 0x35cee008 902750216 edi 0xd 13 eip 0x35cbb100 0x35cbb100 eflags 0x210212 [ AF IF RF ID ] cs 0x33 51 ss 0x3b 59 ds <unavailable> es <unavailable> fs <unavailable> gs <unavailable> (gdb) frame 1 #1 0x2eef8bb0 in <gleam::gl::GlFns as gleam::gl::Gl>::push_group_marker_ext (self=0x35cee008, message=...) at third_party/rust/gleam/src/gl_fns.rs:1558 1558 self.ffi_gl_.PushGroupMarkerEXT(message.len() as GLsizei, message.as_ptr() as *const _); (gdb) list 1553 } 1554 1555 fn push_group_marker_ext(&self, message: &str) { 1556 if self.ffi_gl_.PushGroupMarkerEXT.is_loaded() { 1557 unsafe { 1558 self.ffi_gl_.PushGroupMarkerEXT(message.len() as GLsizei, message.as_ptr() as *const _); 1559 } 1560 } 1561 } 1562 (gdb) frame 3 #3 0x2edea86d in webrender::renderer::Renderer::render_impl (self=<optimized out>, framebuffer_size=...) at gfx/webrender/src/renderer.rs:2028 2028 let _gm = self.gpu_profile.start_marker("build samples"); (gdb) list 2023 let mut stats = RendererStats::empty(); 2024 let mut frame_profiles = Vec::new(); 2025 let mut profile_timers = RendererProfileTimers::new(); 2026 2027 let profile_samplers = { 2028 let _gm = self.gpu_profile.start_marker("build samples"); 2029 // Block CPU waiting for last frame's GPU profiles to arrive. 2030 // In general this shouldn't block unless heavily GPU limited. 2031 let (gpu_frame_id, timers, samplers) = self.gpu_profile.build_samples(); 2032
Landry, did you test WebRender on OpenBSD i386 on Firefox >= 58?
Flags: needinfo?(landry)
Nop, but technically i *could*. I only have an atom n270 netbook w/ 1gb for i386 so... and rust is broken anyway.
Flags: needinfo?(landry)
It might be caused by similar reason to Bug 1434961.
Attached patch workaround (deleted) — Splinter Review
WebRender works fine on FreeBSD i386 if gl*MarkerExt are disabled.
Hmm, glXGetProcAddressARB() never returns NULL pointer.
Looking at the following warnings on x86_64 it appears WebRender tries to use extensions not advertised via glXQueryExtensionsString(). Apparently, doing so on Mesa leads to an undefined behavior. $ firefox about:blank Could not find symbol "glDeleteFencesAPPLE" by glcontext Could not find symbol "glFinishFenceAPPLE" by glcontext Could not find symbol "glFinishObjectAPPLE" by glcontext Could not find symbol "glGenFencesAPPLE" by glcontext Could not find symbol "glGetTexParameterPointervAPPLE" by glcontext Could not find symbol "glInsertEventMarkerEXT" by glcontext Could not find symbol "glIsFenceAPPLE" by glcontext Could not find symbol "glPopGroupMarkerEXT" by glcontext Could not find symbol "glPushGroupMarkerEXT" by glcontext Could not find symbol "glSetFenceAPPLE" by glcontext Could not find symbol "glTestFenceAPPLE" by glcontext Could not find symbol "glTestObjectAPPLE" by glcontext Could not find symbol "glTextureRangeAPPLE" by glcontext WebRender - OpenGL version new 4.5 (Core Profile) Mesa 18.0.0-rc5 Could not find symbol "glDeleteFencesAPPLE" by glcontext Could not find symbol "glFinishFenceAPPLE" by glcontext Could not find symbol "glFinishObjectAPPLE" by glcontext Could not find symbol "glGenFencesAPPLE" by glcontext Could not find symbol "glGetTexParameterPointervAPPLE" by glcontext Could not find symbol "glInsertEventMarkerEXT" by glcontext Could not find symbol "glIsFenceAPPLE" by glcontext Could not find symbol "glPopGroupMarkerEXT" by glcontext Could not find symbol "glPushGroupMarkerEXT" by glcontext Could not find symbol "glSetFenceAPPLE" by glcontext Could not find symbol "glTestFenceAPPLE" by glcontext Could not find symbol "glTestObjectAPPLE" by glcontext Could not find symbol "glTextureRangeAPPLE" by glcontext WebRender - OpenGL version new 4.5 (Core Profile) Mesa 18.0.0-rc5
Summary: WebRender crashes in OpenGL FFI → WebRender tries to use non-advertised OpenGL extensions
Summary: WebRender tries to use non-advertised OpenGL extensions → WebRender tries to use non-advertised OpenGL extensions (e.g., GL_EXT_debug_marker)
Depends on: 1479432
Flags: needinfo?(jbeich)
Confirmed on FreeBSD 10.4 i386 + Mesa 18.2.0-rc1 (i965/skylake).
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: