Bug 223123

Summary: REGRESSION (r274323): [ wk2 ] 2 http/tests/IndexedDB tests are constantly crashing or timing out
Product: WebKit Reporter: Robert Jenner <jenner>
Component: New BugsAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, sihui_liu, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
2 Crashlogs for crashing tests
none
Patch none

Description Robert Jenner 2021-03-12 08:44:49 PST
http/tests/IndexedDB/storage-limit-2.https.html
http/tests/IndexedDB/storage-limit.https.html

are timing out in macOS and iOS release wk2, and crashing in macOs and iOS debug wk2.

HISTORY URL:
https://results.webkit.org/?suite=layout-tests&suite=layout-tests&test=http%2Ftests%2FIndexedDB%2Fstorage-limit-2.https.html&test=http%2Ftests%2FIndexedDB%2Fstorage-limit.https.html
Comment 1 Robert Jenner 2021-03-12 08:48:42 PST
Created attachment 423053 [details]
2 Crashlogs for crashing tests

Uploading both crashlogs to the bug. Here's an abridged version of the crash:

Thread 0 Crashed:
0   com.apple.JavaScriptCore      	0x0000000140b545ce WTFCrash + 14 (Assertions.cpp:295)
1   com.apple.WebKit              	0x000000010dba41e7 WTF::CompletionHandler<void ()>::~CompletionHandler() + 87 (CompletionHandler.h:58)
2   com.apple.WebKit              	0x000000010dba17b5 WTF::CompletionHandler<void ()>::~CompletionHandler() + 21 (CompletionHandler.h:57)
3   com.apple.WebKit              	0x000000010e01572a void IPC::handleMessageAsync<Messages::NetworkProcess::SetQuotaLoggingEnabled, WebKit::NetworkProcess, void (WebKit::NetworkProcess::*)(PAL::SessionID, bool, WTF::CompletionHandler<void ()>&&)>(IPC::Connection&, IPC::Decoder&, WebKit::NetworkProcess*, void (WebKit::NetworkProcess::*)(PAL::SessionID, bool, WTF::CompletionHandler<void ()>&&)) + 346 (HandleMessage.h:214)
4   com.apple.WebKit              	0x000000010e00c338 WebKit::NetworkProcess::didReceiveNetworkProcessMessage(IPC::Connection&, IPC::Decoder&) + 11720 (NetworkProcessMessageReceiver.cpp:2234)
5   com.apple.WebKit              	0x000000010e6c6558 WebKit::NetworkProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 440 (NetworkProcess.cpp:244)
6   com.apple.WebKit              	0x000000010dacd6b4 IPC::Connection::dispatchMessage(IPC::Decoder&) + 516 (Connection.cpp:1006)
7   com.apple.WebKit              	0x000000010dacde7c IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 636 (Connection.cpp:1051)
8   com.apple.WebKit              	0x000000010dace4d0 IPC::Connection::dispatchOneIncomingMessage() + 208 (Connection.cpp:1120)
9   com.apple.WebKit              	0x000000010daed1b8 IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_9::operator()() + 88 (Connection.cpp:975)
10  com.apple.WebKit              	0x000000010daed0ae WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_9, void>::call() + 30 (Function.h:52)
11  com.apple.JavaScriptCore      	0x0000000140b7fac2 WTF::Function<void ()>::operator()() const + 130 (Function.h:83)
12  com.apple.JavaScriptCore      	0x0000000140c02685 WTF::RunLoop::performWork() + 341 (RunLoop.cpp:128)
13  com.apple.JavaScriptCore      	0x0000000140c06f41 WTF::RunLoop::performWork(void*) + 33 (RunLoopCF.cpp:46)
14  com.apple.CoreFoundation      	0x00007fff20460a0c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
15  com.apple.CoreFoundation      	0x00007fff20460974 __CFRunLoopDoSource0 + 180
16  com.apple.CoreFoundation      	0x00007fff204606ef __CFRunLoopDoSources0 + 248
17  com.apple.CoreFoundation      	0x00007fff2045f121 __CFRunLoopRun + 890
18  com.apple.CoreFoundation      	0x00007fff2045e6ce CFRunLoopRunSpecific + 563
19  com.apple.Foundation          	0x00007fff211ebfa1 0x7fff2118c000 + 393121
20  com.apple.Foundation          	0x00007fff2127a384 0x7fff2118c000 + 975748
21  libxpc.dylib                  	0x00007fff200b53dd 0x7fff200a0000 + 87005
22  libxpc.dylib                  	0x00007fff200b4e65 0x7fff200a0000 + 85605
23  com.apple.WebKit              	0x000000010e81b301 WebKit::XPCServiceMain(int, char const**) + 1025 (XPCServiceMain.mm:209)
24  com.apple.WebKit              	0x000000010fe5f84b WKXPCServiceMain + 27 (WKMain.mm:33)
25  com.apple.WebKit.Networking   	0x000000010c8b8ea2 main + 34 (AuxiliaryProcessMain.cpp:30)
26  libdyld.dylib                 	0x00007fff20383621 0x7fff2036e000 + 87585
Comment 2 Radar WebKit Bug Importer 2021-03-12 08:50:04 PST
<rdar://problem/75363329>
Comment 3 Robert Jenner 2021-03-12 08:57:29 PST
Produced the timeouts in release using the following test: 

run-webkit-test http/tests/IndexedDB/storage-limit.https.html --iterations 100 -f

The timeouts occurred at tip of tree, as well as at r274323. They did NOT occur at r274322. 

r274322 does appear to directly change these tests, and it appears to have caused them to timeout in release and crash in debug:
https://trac.webkit.org/changeset/274323/webkit
Comment 4 Sihui Liu 2021-03-12 10:49:28 PST
Created attachment 423065 [details]
Patch
Comment 5 Chris Dumez 2021-03-12 10:52:10 PST
Comment on attachment 423065 [details]
Patch

I already fixed it in https://commits.webkit.org/r274364
Comment 6 Sihui Liu 2021-03-12 10:58:01 PST
(In reply to Chris Dumez from comment #5)
> Comment on attachment 423065 [details]
> Patch
> 
> I already fixed it in https://commits.webkit.org/r274364

Thanks, it's at least six second faster.