Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] orphan WPEWebProcess eating 100% cpu #13181

Closed
yury-s opened this issue Mar 30, 2022 · 1 comment · Fixed by #13185
Closed

[BUG] orphan WPEWebProcess eating 100% cpu #13181

yury-s opened this issue Mar 30, 2022 · 1 comment · Fixed by #13185

Comments

@yury-s
Copy link
Member

yury-s commented Mar 30, 2022

After running our entire suite I routinely see a couple of WPEWebProcess without corresponding browser processes that are running message loops inside InspectorController::didShowNewWindow() and eating 100% CPU:

#0  0x00007f92491f19cf in __GI___poll (fds=0xb52bd0, nfds=2, timeout=0) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f924989336e in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f92498934a3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f924c1bdcda in WTF::RunLoop::cycle(unsigned int) () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#4  0x00007f924d340917 in WebCore::InspectorController::didShowNewWindow() () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#5  0x00007f924ad8f80a in WebKit::WebPage::show() () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#6  0x00007f924d474074 in WebCore::FrameLoader::continueLoadAfterNewWindowPolicy(WebCore::ResourceRequest const&, WebCore::FormState*, WTF::String const&, WebCore::NavigationAction const&, WebCore::ShouldContinuePolicyCheck, WebCore::AllowNavigationToInvalidURL, WebCore::NewFrameOpenerPolicy) () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#7  0x00007f924d478d20 in WTF::Detail::CallableWrapper<WebCore::FrameLoader::loadURL(WebCore::FrameLoadRequest&&, WTF::String const&, WebCore::FrameLoadType, WebCore::Event*, WTF::RefPtr<WebCore::FormState, WTF::RawPtrTraits<WebCore::FormState>, WTF::DefaultRefDerefTraits<WebCore::FormState> >&&, std::optional<WebCore::PrivateClickMeasurement>&&, WTF::CompletionHandler<void ()>&&)::$_3, void, WebCore::ResourceRequest const&, WTF::WeakPtr<WebCore::FormState, WTF::EmptyCounter>&&, WTF::String const&, WebCore::NavigationAction const&, WebCore::ShouldContinuePolicyCheck>::call(WebCore::ResourceRequest const&, WTF::WeakPtr<WebCore::FormState, WTF::EmptyCounter>&&, WTF::String const&, WebCore::NavigationAction const&, WebCore::ShouldContinuePolicyCheck) ()
    at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#8  0x00007f924d49410e in WTF::Detail::CallableWrapper<WebCore::FrameLoader::PolicyChecker::checkNewWindowPolicy(WebCore::NavigationAction&&, WebCore::ResourceRequest&&, WTF::RefPtr<WebCore::FormState, WTF::RawPtrTraits<WebCore::FormState>, WTF::DefaultRefDerefTraits<WebCore::FormState> >&&, WTF::String const&, WTF::CompletionHandler<void (WebCore::ResourceRequest const&, WTF::WeakPtr<WebCore::FormState, WTF::EmptyCounter>&&, WTF::String const&, WebCore::NavigationAction const&, WebCore::ShouldContinuePolicyCheck)>&&)::$_7, void, WebCore::PolicyAction, WebCore::PolicyCheckIdentifier>::call(WebCore::PolicyAction, WebCore::PolicyCheckIdentifier) () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#9  0x00007f924ada9416 in WebKit::WebFrame::didReceivePolicyDecision(unsigned long, WebKit::PolicyDecision&&) () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#10 0x00007f924a8acbcb in WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&) () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#11 0x00007f924aa682ab in IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#12 0x00007f924acb47a7 in WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#13 0x00007f924aa610ba in IPC::Connection::dispatchMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >) () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#14 0x00007f924aa61397 in IPC::Connection::dispatchOneIncomingMessage() () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#15 0x00007f924c155f50 in WTF::RunLoop::performWork() () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#16 0x00007f924c1be146 in WTF::RunLoop::RunLoop()::$_1::__invoke(void*) () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#17 0x00007f924c1bd63a in WTF::RunLoop::$_0::__invoke(_GSource*, int (*)(void*), void*) () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#18 0x00007f924989304e in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007f9249893400 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007f92498936f3 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007f924c1bdbdb in WTF::RunLoop::run() () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#22 0x00007f924adc41bb in int WebKit::AuxiliaryProcessMain<WebKit::WebProcessMainWPE>(int, char**) () at /home/yurys/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-1.0.so.3
#23 0x00007f92491030b3 in __libc_start_main (main=0x401130 <main>, argc=3, argv=0x7ffef8a612d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffef8a612c8) at ../csu/libc-start.c:308
#24 0x000000000040106e in _start ()

@yury-s
Copy link
Member Author

yury-s commented Mar 30, 2022

The issue reproduces on this test in isolation:

it('should not report frameless pages on error', async ({ browser, server }) => {
const context = await browser.newContext();
const page = await context.newPage();
server.setRoute('/empty.html', (req, res) => {
res.end(`<a href="${server.EMPTY_PAGE}" target="_blank">Click me</a>`);
});
let popup;
context.on('page', p => popup = p);
await page.goto(server.EMPTY_PAGE);
await page.click('"Click me"');
await context.close();
if (popup) {
// This races on Firefox :/
expect(popup.isClosed()).toBeTruthy();
expect(popup.mainFrame()).toBeTruthy();
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant