[Webkit-unassigned] [Bug 176296] New: [Threaded Compositor] Deadlock in ThreadedDisplayRefreshMonitor

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 3 00:39:15 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=176296

            Bug ID: 176296
           Summary: [Threaded Compositor] Deadlock in
                    ThreadedDisplayRefreshMonitor
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Keywords: Gtk
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cgarcia at igalia.com
                CC: bugs-noreply at webkitgtk.org, zan at falconsigh.net

Thread 13 (Thread 0x7fca3a0ff700 (LWP 22518)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fcabf14b54b in WTF::ThreadCondition::timedWait(WTF::Mutex&, double) () from /home/cgarcia/gnome/lib/libjavascriptcoregtk-4.0.so.18
#2  0x00007fcabf112cc3 in WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) ()
   from /home/cgarcia/gnome/lib/libjavascriptcoregtk-4.0.so.18
#3  0x00007fcabf108710 in WTF::LockAlgorithm<unsigned char, (unsigned char)1, (unsigned char)2>::lockSlow(WTF::Atomic<unsigned char>&) ()
   from /home/cgarcia/gnome/lib/libjavascriptcoregtk-4.0.so.18
#4  0x00007fcac253f178 in WebKit::ThreadedDisplayRefreshMonitor::requiresDisplayRefreshCallback() () from /home/cgarcia/gnome/lib/libwebkit2gtk-4.0.so.37
#5  0x00007fcac2541b5c in WebKit::ThreadedCompositor::sceneUpdateFinished() () from /home/cgarcia/gnome/lib/libwebkit2gtk-4.0.so.37
#6  0x00007fcac254132c in WebKit::ThreadedCompositor::renderLayerTree() () from /home/cgarcia/gnome/lib/libwebkit2gtk-4.0.so.37
#7  0x00007fcabf14c53a in WTF::RunLoop::TimerBase::TimerBase(WTF::RunLoop&)::{lambda(void*)#1}::_FUN(void*) () from /home/cgarcia/gnome/lib/libjavascriptcoregtk-4.0.so.18
#8  0x00007fcaba6285aa in g_main_dispatch (context=0x7fca340008c0) at gmain.c:3234
#9  g_main_context_dispatch (context=context at entry=0x7fca340008c0) at gmain.c:3899
#10 0x00007fcaba628928 in g_main_context_iterate (context=0x7fca340008c0, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at gmain.c:3972
#11 0x00007fcaba628c42 in g_main_loop_run (loop=0x7fca34001200) at gmain.c:4168
#12 0x00007fcabf14c8f8 in WTF::RunLoop::run() () from /home/cgarcia/gnome/lib/libjavascriptcoregtk-4.0.so.18
#13 0x00007fcabf14b912 in WTF::Function<void ()>::CallableWrapper<WTF::WorkQueue::platformInitialize(char const*, WTF::WorkQueue::Type, WTF::WorkQueue::QOS)::{lambda()#1}>::call() ()
   from /home/cgarcia/gnome/lib/libjavascriptcoregtk-4.0.so.18
#14 0x00007fcabf116ccb in WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) () from /home/cgarcia/gnome/lib/libjavascriptcoregtk-4.0.so.18
#15 0x00007fcabf14aa89 in WTF::wtfThreadEntryPoint(void*) () from /home/cgarcia/gnome/lib/libjavascriptcoregtk-4.0.so.18
#16 0x00007fcab635a494 in start_thread (arg=0x7fca3a0ff700) at pthread_create.c:333
#17 0x00007fcab4fc6abf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 1 (Thread 0x7fcac4b1ca80 (LWP 22475)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fcabf14b54b in WTF::ThreadCondition::timedWait(WTF::Mutex&, double) () from /home/cgarcia/gnome/lib/libjavascriptcoregtk-4.0.so.18
#2  0x00007fcabf112cc3 in WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) ()
   from /home/cgarcia/gnome/lib/libjavascriptcoregtk-4.0.so.18
#3  0x00007fcabf108710 in WTF::LockAlgorithm<unsigned char, (unsigned char)1, (unsigned char)2>::lockSlow(WTF::Atomic<unsigned char>&) ()
   from /home/cgarcia/gnome/lib/libjavascriptcoregtk-4.0.so.18
#4  0x00007fcac2541e08 in WebKit::ThreadedCompositor::requestDisplayRefreshMonitorUpdate() () from /home/cgarcia/gnome/lib/libwebkit2gtk-4.0.so.37
#5  0x00007fcac253ef84 in WebKit::ThreadedDisplayRefreshMonitor::requestRefreshCallback() () from /home/cgarcia/gnome/lib/libwebkit2gtk-4.0.so.37
#6  0x00007fcac296433c in WebCore::ScriptedAnimationController::scheduleAnimation() () from /home/cgarcia/gnome/lib/libwebkit2gtk-4.0.so.37
#7  0x00007fcac2964532 in WebCore::ScriptedAnimationController::registerCallback(WTF::Ref<WebCore::RequestAnimationFrameCallback>&&) () from /home/cgarcia/gnome/lib/libwebkit2gtk-4.0.so.37
#8  0x00007fcac3857692 in WebCore::jsDOMWindowInstanceFunctionRequestAnimationFrame(JSC::ExecState*) () from /home/cgarcia/gnome/lib/libwebkit2gtk-4.0.so.37
#9  0x00007fca57fff288 in ?? ()
#10 0x00007ffe552abfb0 in ?? ()
#11 0x00007fca5809e53d in ?? ()
#12 0x0000000000000000 in ?? ()

The main thread tries to schedule a display refresh monitor from RAF, requestDisplayRefreshMonitorUpdate() tries to take the attributes lock to update coordinateUpdateCompletionWithClient. The compositing thread has finished a frame and sceneUpdateFinished() takes the attributes lock to update clientRendersNextFrame and then asks the display refresh monitor requires a new callback. ThreadedDisplayRefreshMonitor::requiresDisplayRefreshCallback() takes its lock to check the state, and requestDisplayRefreshMonitorUpdate() was called by ThreadedDisplayRefreshMonitor::requestRefreshCallback() with the display refresh monitor lock taken. So, compositing thread has the attributes lock and wants the display refresh monitor one, and main thread has the display refresh monitor lock and wants the attributes one.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170903/33a7973d/attachment-0001.html>


More information about the webkit-unassigned mailing list