Bug 228570

Summary: [ iPad ] platform/ipad/media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html is a flaky timeout and crash
Product: WebKit Reporter: ayumi_kojima
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: aestes, dino, graouts, webkit-bot-watchers-bugzilla, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: iPhone / iPad   
OS: Unspecified   

Description ayumi_kojima 2021-07-28 15:34:39 PDT
platform/ipad/media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html

Is a flaky timeout on iOS 14 E Simulator iPad.

History: https://results.webkit.org/?suite=layout-tests&test=platform%2Fipad%2Fmedia%2Fmodern-media-controls%2Fmedia-documents%2Fmedia-document-audio-ios-sizing.html

Diff: 

--- /Volumes/Data/worker/ipados-simulator-14-debug-tests-wk2/build/layout-test-results/platform/ipad/media/modern-media-controls/media-documents/media-document-audio-ios-sizing-expected.txt
+++ /Volumes/Data/worker/ipados-simulator-14-debug-tests-wk2/build/layout-test-results/platform/ipad/media/modern-media-controls/media-documents/media-document-audio-ios-sizing-actual.txt
@@ -1,12 +1,3 @@
-Testing the size of the media element in an audio media document on iOS.
+#PID UNRESPONSIVE - WebKitTestRunnerApp (pid 8883)
+FAIL: Timed out waiting for notifyDone to be called
 
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS getComputedStyle(media).width became "650px"
-PASS getComputedStyle(media).height is "50px"
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Comment 1 Radar WebKit Bug Importer 2021-07-28 16:15:03 PDT
<rdar://problem/81241370>
Comment 2 ayumi_kojima 2021-07-28 16:24:36 PDT
I was able to reproduce the timeout at TOT and at the oldest spade available (r265027) on iOS 15 simulator on my local machine using: 

run-webkit-tests --iterations 1000 --exit-after-n-failures 2 --exit-after-n-crashes-or-timeouts 2 --ipad-simulator platform/ipad/media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html

I couldn't bisect but it seems like this test was introduced at https://trac.webkit.org/changeset/214468/webkit and last modified at https://trac.webkit.org/changeset/246118/webkit
Comment 3 ayumi_kojima 2021-07-28 16:33:38 PDT
Updated test expectations https://trac.webkit.org/changeset/280409/webkit
Comment 4 ayumi_kojima 2021-07-28 16:54:35 PDT
Crashlog: 

Failed to find media engine.
Failed to find media engine.
ASSERTION FAILED: !m_messageReceiverMapCount
/Volumes/Data/worker/ios-simulator-14-debug/build/Source/WebKit/Platform/IPC/MessageReceiver.h(41) : virtual IPC::MessageReceiver::~MessageReceiver()
1   0x26543fad9 WTFCrash
2   0x2480b10db WTFCrashWithInfo(int, char const*, char const*, int)
3   0x2480f60e8 IPC::MessageReceiver::~MessageReceiver()
4   0x249db7fde WebKit::RemoteAudioHardwareListener::~RemoteAudioHardwareListener()
5   0x249db8125 WebKit::RemoteAudioHardwareListener::~RemoteAudioHardwareListener()
6   0x249db818c WebKit::RemoteAudioHardwareListener::~RemoteAudioHardwareListener()
7   0x26e2a4f9f std::__1::default_delete<WebCore::AudioHardwareListener>::operator()(WebCore::AudioHardwareListener*) const
8   0x26e2a4f62 WTF::RefCounted<WebCore::AudioHardwareListener, std::__1::default_delete<WebCore::AudioHardwareListener> >::deref() const
9   0x26e2a4ee7 WTF::DefaultRefDerefTraits<WebCore::AudioHardwareListener>::derefIfNotNull(WebCore::AudioHardwareListener*)
10  0x26f90f3b4 WTF::RefPtr<WebCore::AudioHardwareListener, WTF::RawPtrTraits<WebCore::AudioHardwareListener>, WTF::DefaultRefDerefTraits<WebCore::AudioHardwareListener> >::operator=(std::nullptr_t)
11  0x26f90f36e WebCore::MediaSessionManagerCocoa::removeSession(WebCore::PlatformMediaSession&)
12  0x27205fd8f WebCore::PlatformMediaSession::stopSession()
13  0x2713bc9fc WebCore::HTMLMediaElement::stop()
14  0x27100686d auto WebCore::ScriptExecutionContext::stopActiveDOMObjects()::$_3::operator()<WebCore::ActiveDOMObject>(WebCore::ActiveDOMObject&) const
15  0x271006803 WTF::Detail::CallableWrapper<WebCore::ScriptExecutionContext::stopActiveDOMObjects()::$_3, WebCore::ScriptExecutionContext::ShouldContinue, WebCore::ActiveDOMObject&>::call(WebCore::ActiveDOMObject&)
16  0x270fef0ba WTF::Function<WebCore::ScriptExecutionContext::ShouldContinue (WebCore::ActiveDOMObject&)>::operator()(WebCore::ActiveDOMObject&) const
17  0x270feef10 WebCore::ScriptExecutionContext::forEachActiveDOMObject(WTF::Function<WebCore::ScriptExecutionContext::ShouldContinue (WebCore::ActiveDOMObject&)> const&) const
18  0x270fef427 WebCore::ScriptExecutionContext::stopActiveDOMObjects()
19  0x270dada3f WebCore::Document::stopActiveDOMObjects()
20  0x271b21fa4 WebCore::FrameLoader::frameDetached()
21  0x271358579 WebCore::HTMLFrameOwnerElement::disconnectContentFrame()
22  0x270d57c01 WebCore::disconnectSubframes(WebCore::ContainerNode&, WebCore::SubframeDisconnectPolicy)
23  0x270d52d85 WebCore::disconnectSubframesIfNeeded(WebCore::ContainerNode&, WebCore::SubframeDisconnectPolicy)
24  0x270d52f14 WebCore::ContainerNode::removeNodeWithScriptAssertion(WebCore::Node&, WebCore::ContainerNode::ChildChange::Source)
25  0x270d4f1b8 WebCore::ContainerNode::removeChild(WebCore::Node&)
26  0x270f5e08f WebCore::Node::remove()
27  0x26e89d989 WebCore::jsElementPrototypeFunction_removeBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSElement*)::'lambda'()::operator()() const
28  0x26e89d8d1 JSC::JSValue WebCore::toJS<WebCore::IDLUndefined, WebCore::jsElementPrototypeFunction_removeBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSElement*)::'lambda'()>(JSC::JSGlobalObject&, JSC::ThrowScope&, WebCore::jsElementPrototypeFunction_removeBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSElement*)::'lambda'()&&)
29  0x26e89d861 WebCore::jsElementPrototypeFunction_removeBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSElement*)
30  0x26e89d75c long long WebCore::IDLOperation<WebCore::JSElement>::call<&(WebCore::jsElementPrototypeFunction_removeBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSElement*)), (WebCore::CastedThisErrorBehavior)0>(JSC::JSGlobalObject&, JSC::CallFrame&, char const*)
31  0x26e88bee4 WebCore::jsElementPrototypeFunction_remove(JSC::JSGlobalObject*, JSC::CallFrame*)
com.apple.WebKit.WebContent.Development terminated (pid 40416) because the process crashed

Result page: https://build.webkit.org/results/Apple-iPadOS-14-Simulator-Debug-WK2-Tests/r280289%20(1444)/results.html

The crash log is same as https://bugs.webkit.org/show_bug.cgi?id=228038 which was fixed on 7/26/21. The history shows that no timeouts/crash after 7/26. 

I will remove the test expectations and will close this bug.
Comment 5 ayumi_kojima 2021-07-28 17:10:29 PDT
Removed test expectation https://trac.webkit.org/changeset/280411/webkit
Comment 6 ayumi_kojima 2021-07-28 17:11:17 PDT

*** This bug has been marked as a duplicate of bug 228038 ***