Bug 265932

Summary: [Win] Enable ForceCompositingMode if AC is on to make on-demand AC mode switching unsupported
Product: WebKit Reporter: Fujii Hironori <fujii.hironori>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: kkinnunen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP patch
none
callstack
none
WIP Patch
none
WIP patch none

Fujii Hironori
Reported 2023-12-06 00:04:24 PST
[Win] Enable ForceCompositingMode if AC is on to make on-demand AC mode switch unsupported Mac WK2 doesn't support non-AC mode. GTK removed on-demand hardware acceleration support. Bug 232516 – [GTK] Remove on-demand hardware acceleration setting
Attachments
WIP patch (1.10 KB, patch)
2023-12-07 23:29 PST, Fujii Hironori
no flags
callstack (14.78 KB, text/plain)
2023-12-07 23:32 PST, Fujii Hironori
no flags
WIP Patch (2.55 KB, patch)
2024-01-15 13:53 PST, Fujii Hironori
no flags
WIP patch (3.12 KB, patch)
2024-07-01 00:39 PDT, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2023-12-07 23:29:01 PST
Created attachment 468940 [details] WIP patch
Fujii Hironori
Comment 2 2023-12-07 23:32:19 PST
Created attachment 468941 [details] callstack With this WIP patch, a lot of tests are crashing with the following assertion failure. For example, css3/images/cross-fade-invalidation.html ASSERTION FAILED: !m_flushingLayers C:\PSDEV\gb\Source\WebCore\rendering/RenderLayerCompositor.cpp(644) : scheduleRenderingUpdate SVGImage is doing layout during painting.
Radar WebKit Bug Importer
Comment 3 2023-12-13 00:05:23 PST
Fujii Hironori
Comment 4 2024-01-15 13:53:17 PST
Created attachment 469404 [details] WIP Patch
Fujii Hironori
Comment 5 2024-01-21 13:50:03 PST
With the WIP patch, running layout tests is observing random crashes due to OpenGL context creataion failures. For example, the following command reproduces the crash. > python .\Tools\Scripts\run-webkit-tests --debug --child=1 --exit-after-n-c=1 --iter=10 fast/dom/lazy-image-loading-document-leak.html > WebCore!WebCore::GLContext::makeContextCurrent(void)+0x18 [C:\WebKit\Source\WebCore\platform\graphics\egl\GLContext.cpp @ 435] > WebKit2!WebKit::WCSceneContext::makeContextCurrent(void)+0x1c [C:\WebKit\Source\WebKit\GPUProcess\graphics\wc\WCSceneContext.cpp @ 45] > WebKit2!WebKit::WCScene::initialize(class WebKit::WCSceneContext * context = 0x000001a3`a72592d0)+0x39 [C:\WebKit\Source\WebKit\GPUProcess\graphics\wc\WCScene.cpp @ 76] > WebKit2!WebKit::RemoteWCLayerTreeHost::RemoteWCLayerTreeHost::<lambda_0>::operator()(void)+0x65 [C:\WebKit\Source\WebKit\GPUProcess\graphics\wc\RemoteWCLayerTreeHost.cpp @ 73] > WebKit2!WTF::Detail::CallableWrapper<`lambda at C:\WebKit\Source\WebKit\GPUProcess\graphics\wc\RemoteWCLayerTreeHost.cpp:69:46',void>::call(void)+0x17 [C:\WebKit\WebKitBuild\Debug\WTF\Headers\wtf\Function.h @ 53] > WebKit2!WTF::Function<void (void)+0x85 [C:\WebKit\WebKitBuild\Debug\WTF\Headers\wtf\Function.h @ 82] > WebKit2!IPC::StreamConnectionWorkQueue::processStreams(void)+0x121 [C:\WebKit\Source\WebKit\Platform\IPC\StreamConnectionWorkQueue.cpp @ 159] > WebKit2!IPC::StreamConnectionWorkQueue::startProcessingThread::<lambda_0>::operator()(void)+0x2f [C:\WebKit\Source\WebKit\Platform\IPC\StreamConnectionWorkQueue.cpp @ 125] > WebKit2!WTF::Detail::CallableWrapper<`lambda at C:\WebKit\Source\WebKit\Platform\IPC\StreamConnectionWorkQueue.cpp:123:17',void>::call(void)+0x17 [C:\WebKit\WebKitBuild\Debug\WTF\Headers\wtf\Function.h @ 53] > WTF!WTF::Function<void (void)+0x84 [C:\WebKit\Source\WTF\wtf\Function.h @ 82] > WTF!WTF::Thread::entryPoint(struct WTF::Thread::NewThreadContext * newThreadContext = 0x000001a3`a723b640)+0x1cb [C:\WebKit\Source\WTF\wtf\Threading.cpp @ 259] > WTF!WTF::wtfThreadEntryPoint(void * data = 0x000001a3`a723b640)+0x13 [C:\WebKit\Source\WTF\wtf\win\ThreadingWin.cpp @ 151] > ucrtbase!thread_start<unsigned int +0x42 > KERNEL32!BaseThreadInitThunk+0x14 > ntdll!RtlUserThreadStart+0x21 The test case opens 10 windows.
Fujii Hironori
Comment 6 2024-02-20 12:17:17 PST
See also: Bug 264562 – [GTK] Enable `forceCompositingMode` by default
Fujii Hironori
Comment 7 2024-05-12 21:49:57 PDT
(In reply to Fujii Hironori from comment #5) > With the WIP patch, running layout tests is observing random crashes due to > OpenGL context creataion failures. I haven't checked yet, but I think 273315@main fixed this problem.
Fujii Hironori
Comment 8 2024-07-01 00:39:08 PDT
Created attachment 471780 [details] WIP patch
Fujii Hironori
Comment 9 2024-07-01 00:47:45 PDT
GPU process is still randomly crashing for tests openning a window. > python .\Tools\Scripts\run-webkit-tests --wincairo --debug fast/events/popup-allowed-from-gesture-initiated-event.html --iter=4 Callstack: > libGLESv2!gl::LogMessage::~LogMessage(void)+0x115 [C:\webkit\wc\Source\ThirdParty\ANGLE\src\common\debug.cpp @ 212] > libGLESv2!rx::SurfaceD3D::checkForOutOfDateSwapChain(class rx::DisplayD3D * displayD3D = 0x000001b4`5478c4a0)+0x1b1 [C:\webkit\wc\Source\ThirdParty\ANGLE\src\libANGLE\renderer\d3d\SurfaceD3D.cpp @ 324] > libGLESv2!rx::SurfaceD3D::swapRect(class rx::DisplayD3D * displayD3D = 0x000001b4`5478c4a0, int x = 0n0, int y = 0n0, int width = 0n1200, int height = 0n900)+0x1a1 [C:\webkit\wc\Source\ThirdParty\ANGLE\src\libANGLE\renderer\d3d\SurfaceD3D.cpp @ 307] > libGLESv2!rx::SurfaceD3D::swap(class gl::Context * context = 0x000001b4`63bfb730)+0x76 [C:\webkit\wc\Source\ThirdParty\ANGLE\src\libANGLE\renderer\d3d\SurfaceD3D.cpp @ 356] > libGLESv2!egl::Surface::swap(class gl::Context * context = 0x000001b4`63bfb730)+0x180 [C:\webkit\wc\Source\ThirdParty\ANGLE\src\libANGLE\Surface.cpp @ 337] > libGLESv2!egl::SwapBuffers(class egl::Thread * thread = 0x000001b4`547b4ce0, class egl::Display * display = 0x000001b4`547ba970, struct egl::SurfaceID surfaceID = struct egl::SurfaceID)+0x69 [C:\webkit\wc\Source\ThirdParty\ANGLE\src\libGLESv2\egl_stubs.cpp @ 748] > libGLESv2!EGL_SwapBuffers(void * dpy = 0x000001b4`547ba970, void * surface = 0x00000000`00000002)+0x14c [C:\webkit\wc\Source\ThirdParty\ANGLE\src\libGLESv2\entry_points_egl_autogen.cpp @ 757] > libEGL!eglSwapBuffers(void * dpy = 0x000001b4`547ba970, void * surface = 0x00000000`00000002)+0x23 [C:\webkit\wc\Source\ThirdParty\ANGLE\src\libEGL\libEGL_autogen.cpp @ 216] > WebCore!WebCore::GLContext::swapBuffers(void)+0xb4 [C:\webkit\wc\Source\WebCore\platform\graphics\egl\GLContext.cpp @ 483] > WebKit2!WebKit::WCSceneContext::swapBuffers(void)+0x1c [C:\webkit\wc\Source\WebKit\GPUProcess\graphics\wc\WCSceneContext.cpp @ 58] > WebKit2!WebKit::WCScene::update(struct WebKit::WCUpdateInfo * update = 0x000001b4`639afa10)+0x2157 [C:\webkit\wc\Source\WebKit\GPUProcess\graphics\wc\WCScene.cpp @ 286] > WebKit2!WebKit::RemoteWCLayerTreeHost::update::<lambda_2>::operator()(void)+0x3c [C:\webkit\wc\Source\WebKit\GPUProcess\graphics\wc\RemoteWCLayerTreeHost.cpp @ 103] > WebKit2!WTF::Detail::CallableWrapper<`lambda at C:\webkit\wc\Source\WebKit\GPUProcess\graphics\wc\RemoteWCLayerTreeHost.cpp:101:46',void>::call(void)+0x17 [C:\webkit\wc\WebKitBuild\Debug\WTF\Headers\wtf\Function.h @ 53] > WebKit2!WTF::Function<void (void)+0x90 [C:\webkit\wc\WebKitBuild\Debug\WTF\Headers\wtf\Function.h @ 82] > WebKit2!IPC::StreamConnectionWorkQueue::processStreams(void)+0x121 [C:\webkit\wc\Source\WebKit\Platform\IPC\StreamConnectionWorkQueue.cpp @ 159] > WebKit2!IPC::StreamConnectionWorkQueue::startProcessingThread::<lambda_0>::operator()(void)+0x2f [C:\webkit\wc\Source\WebKit\Platform\IPC\StreamConnectionWorkQueue.cpp @ 125] > WebKit2!WTF::Detail::CallableWrapper<`lambda at C:\webkit\wc\Source\WebKit\Platform\IPC\StreamConnectionWorkQueue.cpp:123:17',void>::call(void)+0x17 [C:\webkit\wc\WebKitBuild\Debug\WTF\Headers\wtf\Function.h @ 53] > WTF!WTF::Function<void (void)+0x8e [C:\webkit\wc\Source\WTF\wtf\Function.h @ 82] > WTF!WTF::Thread::entryPoint(struct WTF::Thread::NewThreadContext * newThreadContext = 0x000001b4`547a3fe0)+0x1f4 [C:\webkit\wc\Source\WTF\wtf\Threading.cpp @ 260] > WTF!WTF::wtfThreadEntryPoint(void * data = 0x000001b4`547a3fe0)+0x13 [C:\webkit\wc\Source\WTF\wtf\win\ThreadingWin.cpp @ 147] > ucrtbase!thread_start<unsigned int +0x93 > KERNEL32!BaseThreadInitThunk+0x1d > ntdll!RtlUserThreadStart+0x28 This crash happens if the GPU process is going to swap buffers after the window closed. GPU process and UI process have to coorparate not to render after the window closed.
Note You need to log in before you can comment on or make changes to this bug.