Closed Bug 974010 Opened 10 years ago Closed 10 years ago

GL initialization uses prefs off the main thread

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 946907

People

(Reporter: dbaron, Unassigned)

References

Details

The following stack:

PREF_GetIntPref (/home/dbaron/builds/ssd/mozilla-central/mozilla/modules/libpref/src/prefapi.cpp:525)
mozilla::Preferences::GetUint(char const*, unsigned int*) (/home/dbaron/builds/ssd/mozilla-central/obj/firefox-debugopt/gfx/gl/../../dist/include/mozilla/Preferences.h:122)
nsAutoPtr<mozilla::gl::GLFormats>::assign(mozilla::gl::GLFormats*) (/home/dbaron/builds/ssd/mozilla-central/obj/firefox-debugopt/gfx/gl/../../dist/include/nsAutoPtr.h:38)
mozilla::gl::GLContextGLX::Init() (/home/dbaron/builds/ssd/mozilla-central/mozilla/gfx/gl/GLContextProviderGLX.cpp:837)
mozilla::gl::GLContextGLX::CreateGLContext(mozilla::gfx::SurfaceCaps const&, mozilla::gl::GLContextGLX*, bool, _XDisplay*, unsigned long, __GLXFBConfigRec*, bool, gfxXlibSurface*) (/home/dbaron/builds/ssd/mozilla-central/mozilla/gfx/gl/GLContextProviderGLX.cpp:756)
nsRefPtr<mozilla::gl::GLContextGLX>::assign_assuming_AddRef(mozilla::gl::GLContextGLX*) (/home/dbaron/builds/ssd/mozilla-central/obj/firefox-debugopt/gfx/gl/../../dist/include/nsAutoPtr.h:885)
nsRefPtr<mozilla::gl::GLContext>::assign_assuming_AddRef(mozilla::gl::GLContext*) (/home/dbaron/builds/ssd/mozilla-central/obj/firefox-debugopt/gfx/gl/../../dist/include/nsAutoPtr.h:885)
mozilla::gfx::SurfaceCaps::Any() (/home/dbaron/builds/ssd/mozilla-central/mozilla/gfx/gl/SurfaceTypes.h:63)
nsRefPtr<mozilla::gl::GLContext>::assign_assuming_AddRef(mozilla::gl::GLContext*) (/home/dbaron/builds/ssd/mozilla-central/obj/firefox-debugopt/gfx/layers/../../dist/include/nsAutoPtr.h:885)
nsRefPtr<mozilla::gl::GLContext>::assign_assuming_AddRef(mozilla::gl::GLContext*) (/home/dbaron/builds/ssd/mozilla-central/obj/firefox-debugopt/gfx/layers/../../dist/include/nsAutoPtr.h:885)
mozilla::layers::CompositorParent::InitializeLayerManager(nsTArray<mozilla::layers::LayersBackend> const&) (/home/dbaron/builds/ssd/mozilla-central/mozilla/gfx/layers/ipc/CompositorParent.cpp:771)
nsRefPtr<mozilla::layers::LayerManagerComposite>::get() const (/home/dbaron/builds/ssd/mozilla-central/obj/firefox-debugopt/gfx/layers/../../dist/include/nsAutoPtr.h:1029)
mozilla::layers::PCompositorParent::OnMessageReceived(IPC::Message const&, IPC::Message*&) (/home/dbaron/builds/ssd/mozilla-central/obj/firefox-debugopt/ipc/ipdl/PCompositorParent.cpp:781)
mozilla::ipc::MessageChannel::DispatchSyncMessage(IPC::Message const&) (/home/dbaron/builds/ssd/mozilla-central/mozilla/ipc/glue/MessageChannel.cpp:1065)
mozilla::ipc::MessageChannel::OnMaybeDequeueOne() (/home/dbaron/builds/ssd/mozilla-central/mozilla/ipc/glue/MessageChannel.cpp:1036)
MessageLoop::RunTask(Task*) (/home/dbaron/builds/ssd/mozilla-central/mozilla/ipc/chromium/src/base/message_loop.cc:345)
MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask const&) (/home/dbaron/builds/ssd/mozilla-central/mozilla/ipc/chromium/src/base/message_loop.cc:355)
MessageLoop::DoWork() (/home/dbaron/builds/ssd/mozilla-central/mozilla/ipc/chromium/src/base/message_loop.cc:452)
base::MessagePumpDefault::Run(base::MessagePump::Delegate*) (/home/dbaron/builds/ssd/mozilla-central/mozilla/ipc/chromium/src/base/message_pump_default.cc:35)
MessageLoop::RunInternal() (/home/dbaron/builds/ssd/mozilla-central/mozilla/ipc/chromium/src/base/message_loop.cc:227)
~AutoRunState (/home/dbaron/builds/ssd/mozilla-central/mozilla/ipc/chromium/src/base/message_loop.cc:513)
base::Thread::ThreadMain() (/home/dbaron/builds/ssd/mozilla-central/mozilla/ipc/chromium/src/base/thread.cc:165)
ThreadFunc (/home/dbaron/builds/ssd/mozilla-central/mozilla/ipc/chromium/src/base/platform_thread_posix.cc:41)
start_thread (/build/buildd/eglibc-2.15/nptl/pthread_create.c:308)
clone (/build/buildd/eglibc-2.15/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:114)

shows GL initialization using preferences off the main thread, which is forbidden.

The top of the stack was a little bit optimized away, but I think it comes down to this:

PREF_GetIntPref
mozilla::Preferences::GetUint
GLContext::ChooseGLFormats
GLContext::UpdateGLFormats
GLContext::InitWithPrefix
GLContextGLX::Init
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.