Bug 219055 - [iOS] ASSERTION FAILED: Completion handler should always be called under WebKit::GPUProcess::didReceiveMessage
Summary: [iOS] ASSERTION FAILED: Completion handler should always be called under WebK...
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
Keywords: InRadar
Depends on:
Reported: 2020-11-17 15:26 PST by Ryan Haddad
Modified: 2020-11-17 17:07 PST (History)
7 users (show)

See Also:

Patch (1.54 KB, patch)
2020-11-17 16:05 PST, Chris Dumez
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Haddad 2020-11-17 15:26:44 PST
I'm seeing > 10 GPUProcess crashes on iOS simulator debug bots with the assertion failure below. Some crashes are attributed to tests, others are showing up in the "Other crashes" section.

ASSERTION FAILED: Completion handler should always be called
/Volumes/Data/slave/ios-simulator-14-debug/build/WebKitBuild/Debug-iphonesimulator/usr/local/include/wtf/CompletionHandler.h(58) : WTF::CompletionHandler<void ()>::~CompletionHandler()
1   0x123bdfb09 WTFCrash
2   0x111afac97 WTF::CompletionHandler<void ()>::~CompletionHandler()
3   0x111af8235 WTF::CompletionHandler<void ()>::~CompletionHandler()
4   0x112096bde void IPC::handleMessageAsync<Messages::GPUProcess::PrepareToSuspend, WebKit::GPUProcess, void (WebKit::GPUProcess::*)(bool, WTF::CompletionHandler<void ()>&&)>(IPC::Connection&, IPC::Decoder&, WebKit::GPUProcess*, void (WebKit::GPUProcess::*)(bool, WTF::CompletionHandler<void ()>&&))
5   0x1120963c6 WebKit::GPUProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
6   0x111a2fe6a IPC::Connection::dispatchMessage(IPC::Decoder&)
7   0x111a30fb0 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)
8   0x111a31640 IPC::Connection::dispatchOneIncomingMessage()
9   0x111a524e8 IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_8::operator()()
10  0x111a523fe WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_8, void>::call()
11  0x123c0b532 WTF::Function<void ()>::operator()() const
12  0x123c89bd5 WTF::RunLoop::performWork()
13  0x123c8e311 WTF::RunLoop::performWork(void*)
15  0x10a550272 __CFRunLoopDoSource0
16  0x10a54f754 __CFRunLoopDoSources0
17  0x10a549f1f __CFRunLoopRun
18  0x10a5496c6 CFRunLoopRunSpecific
19  0x109f377b9 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
20  0x109f379cd -[NSRunLoop(NSRunLoop) run]
21  0x10be64176 _xpc_objc_main
22  0x10be66115 xpc_main
23  0x1123e58b2 WebKit::XPCServiceMain(int, char const**)
24  0x11390872b WKXPCServiceMain
25  0x109d68d52 main
26  0x10bb11409 start
27  0x1

Comment 1 Radar WebKit Bug Importer 2020-11-17 15:28:20 PST
Comment 2 Ryan Haddad 2020-11-17 15:29:08 PST
This might be related to https://trac.webkit.org/changeset/269879/webkit
Comment 3 Chris Dumez 2020-11-17 15:29:34 PST
r269690 did not fix this?
Comment 4 Chris Dumez 2020-11-17 15:30:26 PST
I will investigate shortly. Just surprised because we had those crashes before and I had landed r269690 for it.
Comment 5 Chris Dumez 2020-11-17 15:32:06 PST
Oh, it is an easy fix. GPUProcess::prepareToSuspend() fails to call its completion handler.
Comment 6 Chris Dumez 2020-11-17 16:05:39 PST
Created attachment 414393 [details]
Comment 7 Chris Dumez 2020-11-17 16:42:35 PST
Comment on attachment 414393 [details]

Clearing flags on attachment: 414393

Committed r269935: <https://trac.webkit.org/changeset/269935>
Comment 8 Chris Dumez 2020-11-17 16:42:37 PST
All reviewed patches have been landed.  Closing bug.