Open Bug 1656361 Opened 4 months ago Updated 1 month ago

Firefox fails to start on NVidia: "Unflushed glGetGraphicsResetStatus" (Fixed by Nvidia driver 455.28)


(Core :: Graphics: WebRender, defect)




Tracking Status
firefox81 --- disabled


(Reporter: kvark, Unassigned)


(Blocks 2 open bugs, )


(Keywords: crash)

Just built the code from July 29th, switched WebRender on, and got this crash on startup:

[GLX] window 261 has VisualID 0x21
Unflushed glGetGraphicsResetStatus: 0x92bb

Assertion failure: !err, at /mnt/code/firefox/gfx/gl/GLContext.cpp:526
#01: mozilla::gl::GLContext::Init() (/mnt/code/firefox/gfx/gl/GLContext.cpp:319)
#02: mozilla::gl::GLContextGLX::Init() (/mnt/code/firefox/gfx/gl/GLContextProviderGLX.cpp:580)
#03: mozilla::gl::GLContextGLX::CreateGLContext(mozilla::gl::GLContextDesc const&, _XDisplay*, unsigned long, __GLXFBConfigRec*, bool, gfxXlibSurface*) (/mnt/code/firefox/gfx/gl/GLContextProviderGLX.cpp:537)
#04: GtkVsyncSource::GLXDisplay::SetupGLContext() (/mnt/code/firefox/gfx/thebes/gfxPlatformGtk.cpp:559)
#05: mozilla::detail::RunnableMethodImpl<GtkVsyncSource::GLXDisplay*, void (GtkVsyncSource::GLXDisplay::*)(), true, (mozilla::RunnableKind)0, >::Run() (/mnt/code/firefox/obj-x86_64-pc-linux-gnu/dist/include/nsThreadUtils.h:1243)
#06: MessageLoop::RunTask(already_AddRefed<nsIRunnable>) (/mnt/code/firefox/ipc/chromium/src/base/
#07: MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask&&) (/mnt/code/firefox/ipc/chromium/src/base/
#08: MessageLoop::DoWork() (/mnt/code/firefox/ipc/chromium/src/base/
#09: base::MessagePumpDefault::Run(base::MessagePump::Delegate*) (/mnt/code/firefox/ipc/chromium/src/base/
#10: MessageLoop::RunInternal() (/mnt/code/firefox/ipc/chromium/src/base/
#11: MessageLoop::Run() (/mnt/code/firefox/ipc/chromium/src/base/
#12: base::Thread::ThreadMain() (/mnt/code/firefox/ipc/chromium/src/base/
#13: ThreadFunc(void*) (/mnt/code/firefox/ipc/chromium/src/base/
#14: ??? (/usr/lib/ + 0x9606)
#15: clone (/usr/lib/haswell/ + 0x120753)
#16: ??? (???:???)

Unfortunately I can't repro with Nvidia 440.100, GTX 1060, Gnome X11, Debian Testing.

Occurences of "Nvidia glGetGraphicsResetStatus":

Blocks: wr-nv-linux
No longer blocks: wr-linux

bug 1628685 is about the one popular proprietary Nvidia bug. It blocks all duplicate reports.
Unsure if related, there is still an open TODO, last touched by bug 1500520 comment 10:

// TODO: Flush pending actions such as texture deletions/unlocks and
// textureHosts recycling.

Keywords: crash

I get the same error ONLY after system sleep/resume. Fixes itself for me when restarting Xorg (just with a systemctl restart gdm).

There's a thread on the nVidia Linux forum about this:

Can confirm this to be a valid workaround, just in my case the command was systemctl restart lightdm. Thank you!

This is very annoying, still. Restarting the DM is basically rebooting the system.

If you can reproduce this, it'd be great if you could investigate it a little. I don't know why this would be happening, since it seems to think its context is lost and that fGetGraphicsResetStatus is returning GL_PURGED_CONTEXT_RESET_NV. We don't expect this during context creation, so we bail out of caution, and I'm not sure how we'd resolve it anyway. :(

(In reply to Dzmitry Malyshau [:kvark] from comment #0)

#04: GtkVsyncSource::GLXDisplay::SetupGLContext() (/mnt/code/firefox/gfx/thebes/gfxPlatformGtk.cpp:559)

Could GLX Vsync be causing problems? For example, there are bugs like bug 1628913.

GLX Vsync also couldn't be mixed with EGL on proprietary Nvidia (it caused transparent windows), therefore it has been disabled for EGL.
(bug 1669275 will reenable GLX Vsync for EGL Mesa only until bug 1640779 implements EGL_CHROMIUM_sync_control.)

Can you test whether this bug occurs with $ MOZ_X11_EGL=1 path/to/firefox as well?
(MOZ_X11_EGL=1 on the proprietary Nvidia driver: Partial present is enabled and works. Two known bugs: (1) WebGL2 is going to be fixed by bug 1663152. (2) bug 1669275 will switch EGL/proprietary Nvidia back to the new GLContextEGL::FindVisual() which temporarily reintroduces bug 1663003 for EGL/proprietary Nvidia only.)

MOZ_X11_EGL=1 works like a clock! Thanks for the great workaround :)

Looks to be fixed in the latest NV proprietary driver:

Fixed a bug where glGetGraphicsResetStatusARB would incorrectly return GL_PURGED_CONTEXT_RESET_NV immediately after application start-up if the system had previously been suspended.

That's great! This has been the most concerning bug IMHO. Please reopen in case this bug still persists.

Closed: 1 month ago
Resolution: --- → MOVED
Summary: Firefox fails to start on NVidia: "Unflushed glGetGraphicsResetStatus" → Firefox fails to start on NVidia: "Unflushed glGetGraphicsResetStatus" (Fixed by Nvidia driver 455.28)

I think we should either:
A) fix this rather than have people think that Firefox is just crashy
or B) we should forbid WR on affected drivers

I think this is an easy fix based on the patchnotes.

Resolution: MOVED → ---

WebRender on Nightly/Early Beta is only enabled for Mesa, but not for proprietary Nvidia.
gfx.webrender.all can be manually set to true to force-enable WebRender. Force-enabling should anyway be possible.
I wanted to file a bug about enabling WebRender by default on Nightly on Gnome with Nvidia driver >= 455.28.

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