[Webkit-unassigned] [Bug 175942] [GTK][Wayland] Opening FedoraProject's pastebin chews CPU

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 31 08:54:42 PDT 2017


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

--- Comment #4 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Created attachment 319463

  --> https://bugs.webkit.org/attachment.cgi?id=319463&action=review

WIP

This is a WIP patch, it fixes the issue, but also introduces locks. Now I remember this was the other reason why we didn't implement the frame callbacks this way. Problem is that mesa calls wl_display_dispatch_queue in a loop, but the main thread is blocking trying to make a sync threaded compositing task (for repaint). See the bt:

Thread 13 (Thread 0x7f74077fe700 (LWP 20452)):
#0  0x00007f747505966d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f7475bb6769 in ?? () from /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#2  0x00007f7475bb7dac in wl_display_dispatch_queue () from /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#3  0x00007f747d619d0b in ?? () from /usr/lib/x86_64-linux-gnu/libEGL.so.1
#4  0x00007f747d61a14c in ?? () from /usr/lib/x86_64-linux-gnu/libEGL.so.1
#5  0x00007f747d61a224 in ?? () from /usr/lib/x86_64-linux-gnu/libEGL.so.1
#6  0x00007f7417ab2848 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#7  0x00007f7417ab2ba1 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#8  0x00007f7417a9dc84 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#9  0x00007f7483338437 in WebCore::GraphicsContext3D::clear(unsigned int) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#10 0x00007f748265cc0b in WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext(WebCore::TransformationMatrix const&, float, WebCore::FloatRect const&, WebCore::Color const&, bool, WebCore::FloatPoint const&, unsigned int) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#11 0x00007f7482666ab1 in WebKit::ThreadedCompositor::renderLayerTree() () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37


Thread 1 (Thread 0x7f7484c8ea80 (LWP 20432)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f747f2240eb in WTF::ThreadCondition::timedWait(WTF::Mutex&, double) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#2  0x00007f747f1eb9e3 in WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#3  0x00007f7482664004 in WebKit::CompositingRunLoop::performTaskSync(WTF::Function<void ()>&&) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#4  0x00007f7482666600 in WebKit::ThreadedCompositor::forceRepaint() () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#5  0x00007f74827b432f in WebKit::AcceleratedDrawingArea::layerHostDidFlushLayers() () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#6  0x00007f74827bc14e in WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired() () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37

Any idea?

-- 
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/20170831/7e8a2420/attachment-0001.html>


More information about the webkit-unassigned mailing list