RESOLVED FIXED 204221
[WinCairo] WebKitWebProcess.exe process remains alive while waiting for sync reply to Messages::WebProcessProxy::ShouldTerminate
https://bugs.webkit.org/show_bug.cgi?id=204221
Summary [WinCairo] WebKitWebProcess.exe process remains alive while waiting for sync ...
Fujii Hironori
Reported 2019-11-15 03:39:46 PST
[WinCairo] WebKitWebProcess.exe process remains alive while waiting for sync reply to Messages::WebProcessProxy::ShouldTerminate I often see this issue in the internal Jenkins test bot, but I don't see this on my PC. 0:000> k # Child-SP RetAddr Call Site 00 00000001`7315bf58 00007ffa`ea080610 ntdll!NtWaitForAlertByThreadId+0x14 01 00000001`7315bf60 00007ffa`e7e1599d ntdll!RtlSleepConditionVariableSRW+0x130 02 00000001`7315bfd0 00007ffa`c4360686 KERNELBASE!SleepConditionVariableSRW+0x2d 03 00000001`7315c010 00007ffa`c428ae2d WTF!WTF::ThreadCondition::timedWait+0x86 [C:\jenkins_slave\WinCairo-master\Source\WTF\wtf\win\ThreadingWin.cpp @ 413] 04 00000001`7315c080 00007ffa`c423a909 WTF!WTF::ParkingLot::parkConditionallyImpl+0x22d [C:\jenkins_slave\WinCairo-master\Source\WTF\wtf\ParkingLot.cpp @ 604] 05 00000001`7315c1b0 00007ffa`c423a776 WTF!WTF::ParkingLot::parkConditionally<`lambda at ..\..\Source\WTF\wtf/Condition.h:78:17',`lambda at ..\..\Source\WTF\wtf/Condition.h:84:17'>+0xa9 [C:\jenkins_slave\WinCairo-master\Source\WTF\wtf\ParkingLot.h @ 82] 06 00000001`7315c260 00007ffa`c434ef8f WTF!WTF::Condition::waitUntil<WTF::Lock>+0xc6 [C:\jenkins_slave\WinCairo-master\Source\WTF\wtf\Condition.h @ 76] 07 00000001`7315c310 00007ffa`c434eee8 WTF!WTF::Condition::waitUntil<WTF::Lock,`lambda at ..\..\Source\WTF\wtf\threads\BinarySemaphore.cpp:41:66'>+0x4f [C:\jenkins_slave\WinCairo-master\Source\WTF\wtf\Condition.h @ 98] 08 00000001`7315c370 00007ffa`a5ac1d94 WTF!WTF::BinarySemaphore::waitUntil+0x78 [C:\jenkins_slave\WinCairo-master\Source\WTF\wtf\threads\BinarySemaphore.cpp @ 41] 09 00000001`7315c3f0 00007ffa`a5ab9695 WebKit2!IPC::Connection::SyncMessageState::wait+0x14 [C:\jenkins_slave\WinCairo-master\Source\WebKit\Platform\IPC\Connection.cpp @ 88] 0a 00000001`7315c420 00007ffa`a5ab8708 WebKit2!IPC::Connection::waitForSyncReply+0x3b5 [C:\jenkins_slave\WinCairo-master\Source\WebKit\Platform\IPC\Connection.cpp @ 617] 0b 00000001`7315c550 00007ffa`a5f4a893 WebKit2!IPC::Connection::sendSyncMessage+0x358 [C:\jenkins_slave\WinCairo-master\Source\WebKit\Platform\IPC\Connection.cpp @ 559] 0c 00000001`7315c6b0 00007ffa`a5f36b32 WebKit2!IPC::Connection::sendSync<Messages::WebProcessProxy::ShouldTerminate>+0x1e3 [C:\jenkins_slave\WinCairo-master\Source\WebKit\Platform\IPC\Connection.h @ 500] 0d 00000001`7315c7e0 00007ffa`a5b13ce9 WebKit2!WebKit::WebProcess::shouldTerminate+0x192 [C:\jenkins_slave\WinCairo-master\Source\WebKit\WebProcess\WebProcess.cpp @ 689] 0e 00000001`7315c8b0 00007ffa`a5b14350 WebKit2!WebKit::AuxiliaryProcess::terminationTimerFired+0x19 [C:\jenkins_slave\WinCairo-master\Source\WebKit\Shared\AuxiliaryProcess.cpp @ 167] 0f 00000001`7315c8f0 00007ffa`a5f3687d WebKit2!WebKit::AuxiliaryProcess::enableTermination+0xc0 [C:\jenkins_slave\WinCairo-master\Source\WebKit\Shared\AuxiliaryProcess.cpp @ 149] 10 00000001`7315c940 00007ffa`a61031ef WebKit2!WebKit::WebProcess::removeWebPage+0xdd [C:\jenkins_slave\WinCairo-master\Source\WebKit\WebProcess\WebProcess.cpp @ 679] 11 00000001`7315c9a0 00007ffa`a58396c8 WebKit2!WebKit::WebPage::close+0x71f [C:\jenkins_slave\WinCairo-master\Source\WebKit\WebProcess\WebPage\WebPage.cpp @ 1453] 12 00000001`7315cba0 00007ffa`a5839666 WebKit2!IPC::callMemberFunctionImpl<WebKit::WebPage,void (WebKit::WebPage::*)(),std::tuple<>>+0x48 [C:\jenkins_slave\WinCairo-master\Source\WebKit\Platform\IPC\HandleMessage.h @ 42] 13 00000001`7315cc00 00007ffa`a581d9fb WebKit2!IPC::callMemberFunction<WebKit::WebPage,void (WebKit::WebPage::*)(),std::tuple<>,std::integer_sequence<unsigned long long> >+0x66 [C:\jenkins_slave\WinCairo-master\Source\WebKit\Platform\IPC\HandleMessage.h @ 47] 14 00000001`7315cc70 00007ffa`a581342a WebKit2!IPC::handleMessage<Messages::WebPage::Close,WebKit::WebPage,void (WebKit::WebPage::*)()>+0x12b [C:\jenkins_slave\WinCairo-master\Source\WebKit\Platform\IPC\HandleMessage.h @ 121] 15 00000001`7315cd00 00007ffa`a610faab WebKit2!WebKit::WebPage::didReceiveWebPageMessage+0x1e6a [C:\jenkins_slave\WinCairo-master\WebKitBuild\Debug\WebKit\DerivedSources\WebPageMessageReceiver.cpp @ 1411] 16 00000001`7315ed60 00007ffa`a5adcacf WebKit2!WebKit::WebPage::didReceiveMessage+0x22b [C:\jenkins_slave\WinCairo-master\Source\WebKit\WebProcess\WebPage\WebPage.cpp @ 4446] 17 00000001`7315ee60 00007ffa`a5f36cec WebKit2!IPC::MessageReceiverMap::dispatchMessage+0x18f [C:\jenkins_slave\WinCairo-master\Source\WebKit\Platform\IPC\MessageReceiverMap.cpp @ 124] 18 00000001`7315ef30 00007ffa`a5abbfc6 WebKit2!WebKit::WebProcess::didReceiveMessage+0x4c [C:\jenkins_slave\WinCairo-master\Source\WebKit\WebProcess\WebProcess.cpp @ 720] 19 00000001`7315f040 00007ffa`a5ab67c5 WebKit2!IPC::Connection::dispatchMessage+0x226 [C:\jenkins_slave\WinCairo-master\Source\WebKit\Platform\IPC\Connection.cpp @ 950] 1a 00000001`7315f0f0 00007ffa`a5abc88d WebKit2!IPC::Connection::dispatchMessage+0x295 [C:\jenkins_slave\WinCairo-master\Source\WebKit\Platform\IPC\Connection.cpp @ 1003] 1b 00000001`7315f1b0 00007ffa`a5abf6ac WebKit2!IPC::Connection::dispatchOneIncomingMessage+0x11d [C:\jenkins_slave\WinCairo-master\Source\WebKit\Platform\IPC\Connection.cpp @ 1071] 1c 00000001`7315f250 00007ffa`a5abf607 WebKit2!IPC::Connection::enqueueIncomingMessage::<unnamed-tag>::operator()+0x5c [C:\jenkins_slave\WinCairo-master\Source\WebKit\Platform\IPC\Connection.cpp @ 927] 1d 00000001`7315f290 00007ffa`c42450a0 WebKit2!WTF::Detail::CallableWrapper<`lambda at ..\..\Source\WebKit\Platform\IPC\Connection.cpp:922:30',void>::call+0x17 [C:\jenkins_slave\WinCairo-master\WebKitBuild\Debug\WTF\Headers\wtf\Function.h @ 52] 1e 00000001`7315f2c0 00007ffa`c4299d66 WTF!WTF::Function<void ()>::operator()+0x90 [C:\jenkins_slave\WinCairo-master\Source\WTF\wtf\Function.h @ 79] 1f 00000001`7315f300 00007ffa`c435dfb5 WTF!WTF::RunLoop::performWork+0x126 [C:\jenkins_slave\WinCairo-master\Source\WTF\wtf\RunLoop.cpp @ 108] 20 00000001`7315f3d0 00007ffa`c435dec9 WTF!WTF::RunLoop::wndProc+0x75 [C:\jenkins_slave\WinCairo-master\Source\WTF\wtf\win\RunLoopWin.cpp @ 57] 21 00000001`7315f440 00007ffa`e88a63ed WTF!WTF::RunLoop::RunLoopWndProc+0x59 [C:\jenkins_slave\WinCairo-master\Source\WTF\wtf\win\RunLoopWin.cpp @ 39] 22 00000001`7315f4b0 00007ffa`e88a5de2 USER32!UserCallWinProcCheckWow+0x2bd 23 00000001`7315f640 00007ffa`c435e1d3 USER32!DispatchMessageWorker+0x1e2 24 00000001`7315f6c0 00007ffa`a542c76b WTF!WTF::RunLoop::run+0x63 [C:\jenkins_slave\WinCairo-master\Source\WTF\wtf\win\RunLoopWin.cpp @ 73] 25 00000001`7315f730 00007ffa`a542c6ab WebKit2!WebKit::AuxiliaryProcessMain<WebKit::WebProcess,WebKit::WebProcessMain>+0xab [C:\jenkins_slave\WinCairo-master\Source\WebKit\Shared\unix\AuxiliaryProcessMain.h @ 67] *** WARNING: Unable to verify checksum for C:\jenkins_slave\WinCairo-master\WebKitBuild\Debug\bin64\WebKitWebProcess.exe 26 00000001`7315f7f0 00007ff6`5042101c WebKit2!WebKit::WebProcessMainWin+0x8b [C:\jenkins_slave\WinCairo-master\Source\WebKit\WebProcess\win\WebProcessMainWin.cpp @ 49] 27 00000001`7315f830 00007ff6`5042123c WebKitWebProcess!main+0x1c [C:\jenkins_slave\WinCairo-master\Source\WebKit\WebProcess\EntryPoint\win\WebProcessMain.cpp @ 33] 28 (Inline Function) --------`-------- WebKitWebProcess!invoke_main+0x22 [d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 78] 29 00000001`7315f870 00007ffa`e9357bd4 WebKitWebProcess!__scrt_common_main_seh+0x10c [d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288] 2a 00000001`7315f8b0 00007ffa`ea08ced1 KERNEL32!BaseThreadInitThunk+0x14 2b 00000001`7315f8e0 00000000`00000000 ntdll!RtlUserThreadStart+0x21
Attachments
Patch to reproduce (685 bytes, patch)
2022-04-06 13:36 PDT, Fujii Hironori
no flags
WIP patch (1.01 KB, patch)
2022-04-08 12:35 PDT, Fujii Hironori
no flags
Patch (1.63 KB, patch)
2022-04-09 14:09 PDT, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2021-03-21 13:40:10 PDT
I don't observe this problem these days.
Fujii Hironori
Comment 2 2021-03-28 13:13:45 PDT
I still observe this. WinCairo Debug WK2 r275063.
Fujii Hironori
Comment 3 2022-04-06 13:36:45 PDT
Created attachment 456855 [details] Patch to reproduce I can't reproduce this on my PC. However, adding Sleep(100) in IPC::Connection::readEventHandler can reproduce remaining web process problem by running layout tests. But, the call stack is almost empty, not waiting for sync reply. I'm not sure this is exactly same issue.
Fujii Hironori
Comment 4 2022-04-08 12:35:06 PDT
Created attachment 457109 [details] WIP patch
Fujii Hironori
Comment 5 2022-04-09 13:44:08 PDT
I tested the patch on my PC and confirmed it fixed comment#3 problem. I didn't test it on the internal Jenkins. I don't know it will fix the comment#0 problem. I think it's promising.
Fujii Hironori
Comment 6 2022-04-09 14:08:46 PDT
The code was added by Bug 186445.
Fujii Hironori
Comment 7 2022-04-09 14:09:54 PDT
EWS
Comment 8 2022-04-10 20:40:14 PDT
Found 2 new test failures: fast/multicol/client-rects-spanners.html, imported/blink/fast/pagination/div-x-vertical-lr-rtl.html
Fujii Hironori
Comment 9 2022-04-10 21:26:13 PDT
Comment on attachment 457181 [details] Patch Clearing flags on attachment: 457181 Committed r292695 (249487@trunk): <https://commits.webkit.org/249487@trunk>
Fujii Hironori
Comment 10 2022-04-10 21:26:16 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 11 2022-04-10 21:42:22 PDT
Note You need to log in before you can comment on or make changes to this bug.