Bug 196190

Summary: [Coordinated Graphics][WinCairo] ASSERTION FAILED: state.id == m_nicosia.state.id
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, magomez, webkit-bug-importer, zan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=195550
https://bugs.webkit.org/show_bug.cgi?id=188693
Bug Depends on:    
Bug Blocks: 186364    
Attachments:
Description Flags
CrashLog_0134_2019-03-25_10-42-43-882.txt
none
Patch zan: review+

Fujii Hironori
Reported 2019-03-24 18:47:35 PDT
[Coordinated Graphics][WinCairo] ASSERTION FAILED: state.id == m_nicosia.state.id I'm working on enabling Coordinated Graphics for WinCairo in Bug 186364. The compositing layout tests are randomly failing the following assertion. > ASSERTION FAILED: state.id == m_nicosia.state.id > python ./Tools/Scripts/run-webkit-tests --debug --wincairo --no-new-test-results compositing Callstack: > WTF!WTFCrash(void)+0x10 [C:\webkit\gb\Source\WTF\wtf\Assertions.cpp @ 305] > WebKit2!WTFCrashWithInfo(void)+0x20 [C:\webkit\gb\WebKitBuild\Debug\DerivedSources\ForwardingHeaders\wtf\Assertions.h @ 560] > WebKit2!WebKit::CoordinatedGraphicsScene::purgeGLResources::<unnamed-tag>::operator()(struct Nicosia::Scene::State * state = 0x000001f5`c666a870)+0x8d [C:\webkit\gb\Source\WebKit\Shared\CoordinatedGraphics\CoordinatedGraphicsScene.cpp @ 436] > WebKit2!Nicosia::Scene::accessState<`lambda at ..\..\Source\WebKit\Shared\CoordinatedGraphics\CoordinatedGraphicsScene.cpp:434:13'>(class WebKit::CoordinatedGraphicsScene::purgeGLResources::<unnamed-tag> * functor = 0x000000de`e15ff408)+0x61 [C:\webkit\gb\WebKitBuild\Debug\DerivedSources\ForwardingHeaders\WebCore\NicosiaScene.h @ 67] > WebKit2!WebKit::CoordinatedGraphicsScene::purgeGLResources(void)+0xc7 [C:\webkit\gb\Source\WebKit\Shared\CoordinatedGraphics\CoordinatedGraphicsScene.cpp @ 433] > WebKit2!WebKit::ThreadedCompositor::invalidate::<unnamed-tag>::operator()(void)+0x7c [C:\webkit\gb\Source\WebKit\Shared\CoordinatedGraphics\threadedcompositor\ThreadedCompositor.cpp @ 111] > WebKit2!WTF::Function<void (void)+0x17 [C:\webkit\gb\WebKitBuild\Debug\DerivedSources\ForwardingHeaders\wtf\Function.h @ 102] > WebKit2!WTF::Function<void (void)+0x91 [C:\webkit\gb\WebKitBuild\Debug\DerivedSources\ForwardingHeaders\wtf\Function.h @ 57] > WebKit2!WebKit::CompositingRunLoop::performTaskSync::<unnamed-tag>::operator()(void)+0x31 [C:\webkit\gb\Source\WebKit\Shared\CoordinatedGraphics\threadedcompositor\CompositingRunLoop.cpp @ 91] > WebKit2!WTF::Function<void (void)+0x17 [C:\webkit\gb\WebKitBuild\Debug\DerivedSources\ForwardingHeaders\wtf\Function.h @ 102] > WTF!WTF::Function<void (void)+0x90 [C:\webkit\gb\Source\WTF\wtf\Function.h @ 57] > WTF!WTF::RunLoop::performWork(void)+0x126 [C:\webkit\gb\Source\WTF\wtf\RunLoop.cpp @ 107] > WTF!WTF::RunLoop::wndProc(struct HWND__ * hWnd = 0x00000000`000606fe, unsigned int message = 0x401, unsigned int64 wParam = 0x000001f5`c6597780, int64 lParam = 0n0)+0x75 [C:\webkit\gb\Source\WTF\wtf\win\RunLoopWin.cpp @ 57] > WTF!WTF::RunLoop::RunLoopWndProc(struct HWND__ * hWnd = 0x00000000`000606fe, unsigned int message = 0x401, unsigned int64 wParam = 0x000001f5`c6597780, int64 lParam = 0n0)+0x59 [C:\webkit\gb\Source\WTF\wtf\win\RunLoopWin.cpp @ 39] > USER32!UserCallWinProcCheckWow+0x2c1 > USER32!DispatchMessageWorker+0x1c3 > WTF!WTF::RunLoop::run(void)+0x63 [C:\webkit\gb\Source\WTF\wtf\win\RunLoopWin.cpp @ 69] > WebKit2!WebKit::createRunLoop::<unnamed-tag>::operator()(void)+0x34 [C:\webkit\gb\Source\WebKit\Shared\CoordinatedGraphics\threadedcompositor\CompositingRunLoop.cpp @ 50] > WebKit2!WTF::Function<void (void)+0x17 [C:\webkit\gb\WebKitBuild\Debug\DerivedSources\ForwardingHeaders\wtf\Function.h @ 102] > WTF!WTF::Function<void (void)+0x90 [C:\webkit\gb\Source\WTF\wtf\Function.h @ 57] > WTF!WTF::Thread::entryPoint(struct WTF::Thread::NewThreadContext * newThreadContext = 0x000001f5`c6631a00)+0x1f3 [C:\webkit\gb\Source\WTF\wtf\Threading.cpp @ 149] > WTF!WTF::wtfThreadEntryPoint(void * data = 0x000001f5`c6631a00)+0x13 [C:\webkit\gb\Source\WTF\wtf\win\ThreadingWin.cpp @ 152] > ucrtbase!thread_start<unsigned int +0x3e > KERNEL32!BaseThreadInitThunk+0x14 > ntdll!RtlUserThreadStart+0x21
Attachments
CrashLog_0134_2019-03-25_10-42-43-882.txt (130.20 KB, text/plain)
2019-03-24 18:48 PDT, Fujii Hironori
no flags
Patch (1.97 KB, patch)
2019-03-24 22:16 PDT, Fujii Hironori
zan: review+
Fujii Hironori
Comment 1 2019-03-24 18:48:23 PDT
Created attachment 365841 [details] CrashLog_0134_2019-03-25_10-42-43-882.txt
Fujii Hironori
Comment 2 2019-03-24 19:30:34 PDT
This assertion assumes two scenes are identical in the composting thread in CoordinatedGraphicsScene::purgeGLResources. However, state.id is incremented in the main thread in CompositingCoordinator::flushPendingLayerChanges. https://trac.webkit.org/browser/webkit/trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp?rev=243163#L157 The reason why GTK port doesn't have this issue is RunLoop::TimerBase::stop in GTK port stop the RunLoop timer synchronously. If the RunLoop timer is firing, RunLoop::TimerBase::stop blocks until it finishes. This is the same reason why GTK port doesn't occur Bug 195550.
Fujii Hironori
Comment 3 2019-03-24 19:39:19 PDT
This assertion has been introduced in Bug 188693.
Fujii Hironori
Comment 4 2019-03-24 22:16:18 PDT
Fujii Hironori
Comment 5 2019-03-25 17:44:43 PDT
Radar WebKit Bug Importer
Comment 6 2019-03-25 17:45:21 PDT
Note You need to log in before you can comment on or make changes to this bug.