Bug 172025 - [GTK] ASSERTION FAILED: !m_flushingLayers
Summary: [GTK] ASSERTION FAILED: !m_flushingLayers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, LayoutTestFailure
: 170009 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-12 01:52 PDT by Carlos Garcia Campos
Modified: 2017-05-12 04:42 PDT (History)
9 users (show)

See Also:


Attachments
Patch (1.58 KB, patch)
2017-05-12 02:44 PDT, Carlos Garcia Campos
zan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-05-12 01:52:01 PDT
Many layout tests using accelerated compositing are crashing in the GTK+ debug bot because of this assert. It happens when dumping the layers, RenderLayerCompositor::layerTreeAsText() calls flushPendingLayerChanges() and at some point one of the layers calls client().notifyFlushRequired(). CoordinatedGraphicsLayer::notifyFlushRequired() has an early return when the coordinator is flushing layer, but in this case the CompositingCoordinator doesn't know anything about this layer flush.

Thread 1 (Thread 0x7f22d48aca40 (LWP 995)):
#0  0x00007f22e3a09201 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:292
#1  0x00000000047d6ce8 in (anonymous namespace)::RenderLayerCompositor::scheduleLayerFlush (this=0x7f22d3f703b0, canThrottle=false) at ../../Source/WebCore/rendering/RenderLayerCompositor.cpp:405
#2  0x00000000047d6c5a in (anonymous namespace)::RenderLayerCompositor::notifyFlushRequired (this=0x7f22d3f703b0, layer=0x7f22843db200) at ../../Source/WebCore/rendering/RenderLayerCompositor.cpp:394
#3  0x0000000004d066bd in (anonymous namespace)::CoordinatedGraphicsLayer::notifyFlushRequired (this=0x7f22843db200) at ../../Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:63
#4  0x0000000004d066ec in (anonymous namespace)::CoordinatedGraphicsLayer::didChangeLayerState (this=0x7f22843db200) at ../../Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:69
#5  0x0000000004d085f5 in (anonymous namespace)::CoordinatedGraphicsLayer::syncImageBacking (this=0x7f22843db200) at ../../Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:637
#6  0x0000000004d08c6a in (anonymous namespace)::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly (this=0x7f22843db200) at ../../Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:737
#7  0x0000000004d081db in (anonymous namespace)::CoordinatedGraphicsLayer::flushCompositingState (this=0x7f22843db200, rect=...) at ../../Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:584
#8  0x00000000047d70e1 in (anonymous namespace)::RenderLayerCompositor::flushPendingLayerChanges (this=0x7f22d3f703b0, isFlushRoot=true) at ../../Source/WebCore/rendering/RenderLayerCompositor.cpp:455
#9  0x00000000047dbe60 in (anonymous namespace)::RenderLayerCompositor::layerTreeAsText (this=0x7f22d3f703b0, flags=0) at ../../Source/WebCore/rendering/RenderLayerCompositor.cpp:1814
#10 0x00000000042f1b56 in (anonymous namespace)::Frame::layerTreeAsText (this=0x7f22d3f92000, flags=0) at ../../Source/WebCore/page/Frame.cpp:924
#11 0x00007f22866173bc in (anonymous namespace)::Internals::layerTreeAsText (this=0x7f22d3ff5f00, document=..., flags=0) at ../../Source/WebCore/testing/Internals.cpp:2264
#12 0x00007f2286595878 in (anonymous namespace)::jsInternalsPrototypeFunctionLayerTreeAsTextCaller (state=0x7ffcc6bb3da0, castedThis=0x7f226f1c8820, throwScope=...) at DerivedSources/WebCore/JSInternals.cpp:4001
#13 0x00007f22865b120e in (anonymous namespace)::BindingCaller<WebCore::JSInternals>::callOperation<WebCore::jsInternalsPrototypeFunctionLayerTreeAsTextCaller, (WebCore::CastedThisErrorBehavior)0> (state=0x7ffcc6bb3da0, operationName=0x7f22866a11fa "layerTreeAsText") at ../../Source/WebCore/bindings/js/JSDOMBindingCaller.h:71
#14 0x00007f22865956d7 in (anonymous namespace)::jsInternalsPrototypeFunctionLayerTreeAsText (state=0x7ffcc6bb3da0) at DerivedSources/WebCore/JSInternals.cpp:3987
#15 0x00007f228cdbe028 in ?? ()
#16 0x00007ffcc6bb3e20 in ?? ()
#17 0x00007f22e3500b07 in llint_entry () at ../../Source/WTF/wtf/RefPtr.h:80
Backtrace stopped: frame did not save the PC

I'm not sure, but I think this could have started when we switched to the display refresh monitor, which also makes me wonder if we should be using the GraphicsLayerUpdater for some of the layers.
This is causing the debug bot to always exit early :-(
Comment 1 Carlos Garcia Campos 2017-05-12 01:55:37 PDT
I forgot to mention that this doesn't happen when tests are run individually, only when several tests are run in the same UI process.
Comment 2 Carlos Garcia Campos 2017-05-12 02:44:20 PDT
Created attachment 309885 [details]
Patch
Comment 3 Carlos Garcia Campos 2017-05-12 03:00:58 PDT
*** Bug 170009 has been marked as a duplicate of this bug. ***
Comment 4 Carlos Garcia Campos 2017-05-12 03:03:37 PDT
Many expectations were updated in r214306, but that was not enough, because it doesn't matter the test itself, it happens when several tests using AC are run in the same worker. I'll revert the expectations added in r214306
Comment 5 Carlos Garcia Campos 2017-05-12 04:42:59 PDT
Committed r216759: <http://trac.webkit.org/changeset/216759>