Bug 221985 - REGRESSION: [ Mac WK2 ] fast/mediastream/audio-track-enabled.html is flaky failing
Summary: REGRESSION: [ Mac WK2 ] fast/mediastream/audio-track-enabled.html is flaky fa...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peng Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-16 12:07 PST by Truitt Savell
Modified: 2021-05-14 16:46 PDT (History)
10 users (show)

See Also:


Attachments
Patch (3.67 KB, patch)
2021-05-14 13:39 PDT, Peng Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Truitt Savell 2021-02-16 12:07:41 PST
fast/mediastream/audio-track-enabled.html

This test began flaky failing somewhere around r272848. it is highly intermittent so the regression point could be anywhere in the last 30 revisions before this point

history:
https://results.webkit.org/?suite=layout-tests&test=fast%2Fmediastream%2Faudio-track-enabled.html

Diff:
--- /Volumes/Data/slave/bigsur-release-tests-wk2/build/layout-test-results/fast/mediastream/audio-track-enabled-expected.txt
+++ /Volumes/Data/slave/bigsur-release-tests-wk2/build/layout-test-results/fast/mediastream/audio-track-enabled-actual.txt
@@ -1,4 +1,4 @@
 
 
-PASS Check audio session state in case of disabled and stopped audio tracks
+FAIL Check audio session state in case of disabled and stopped audio tracks assert_equals: expected "AmbientSound" but got "None"
Comment 1 Radar WebKit Bug Importer 2021-02-16 12:07:58 PST
<rdar://problem/74401281>
Comment 2 Amir Mark Jr 2021-04-14 17:34:15 PDT
Updated test expectations. This is also affecting EWS.

https://trac.webkit.org/changeset/275983/webkit
Comment 3 Peng Liu 2021-04-29 14:46:32 PDT
This test sometimes crashes on bot Apple-iOS-14-Simulator-Debug-WK2-Tests

stderr:
ASSERTION FAILED: Unhandled message RemoteRemoteCommandListenerProxy_UpdateSupportedCommands to 103
assertionFailureDueToUnreachableCode
/Volumes/Data/worker/ios-simulator-14-debug/build/WebKitBuild/Debug-iphonesimulator/DerivedSources/WebKit2/GPUConnectionToWebProcessMessageReceiver.cpp(132) : virtual void WebKit::GPUConnectionToWebProcess::didReceiveMessage(IPC::Connection &, IPC::Decoder &)
1   0x11efd5119 WTFCrash
2   0x1094d5c45 WebKit::GPUConnectionToWebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
3   0x108d078c4 IPC::Connection::dispatchMessage(IPC::Decoder&)
4   0x108d080ac IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)
5   0x108d08700 IPC::Connection::dispatchOneIncomingMessage()
6   0x108d28bd8 IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_10::operator()()
7   0x108d28ace WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_10, void>::call()
8   0x11f000f72 WTF::Function<void ()>::operator()() const
9   0x11f084295 WTF::RunLoop::performWork()
10  0x11f088b51 WTF::RunLoop::performWork(void*)
11  0x103c1837a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
12  0x103c18272 __CFRunLoopDoSource0
13  0x103c17754 __CFRunLoopDoSources0
14  0x103c11f1f __CFRunLoopRun
15  0x103c116c6 CFRunLoopRunSpecific
16  0x1035ff7b9 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
17  0x1035ff9cd -[NSRunLoop(NSRunLoop) run]
18  0x10552c176 _xpc_objc_main
19  0x10552e115 xpc_main
20  0x1099e8c8b WebKit::XPCServiceMain(int, char const**)
21  0x10b1191ab WKXPCServiceMain
22  0x103430d52 main
23  0x1051d9409 start
LEAK: 1 WebPageProxy
Comment 4 Peng Liu 2021-04-30 09:18:35 PDT
(In reply to Peng Liu from comment #3)
> This test sometimes crashes on bot Apple-iOS-14-Simulator-Debug-WK2-Tests
> 
> stderr:
> ASSERTION FAILED: Unhandled message
> RemoteRemoteCommandListenerProxy_UpdateSupportedCommands to 103
> assertionFailureDueToUnreachableCode
> /Volumes/Data/worker/ios-simulator-14-debug/build/WebKitBuild/Debug-
> iphonesimulator/DerivedSources/WebKit2/
> GPUConnectionToWebProcessMessageReceiver.cpp(132) : virtual void
> WebKit::GPUConnectionToWebProcess::didReceiveMessage(IPC::Connection &,
> IPC::Decoder &)
> 1   0x11efd5119 WTFCrash
> 2   0x1094d5c45
> WebKit::GPUConnectionToWebProcess::didReceiveMessage(IPC::Connection&,
> IPC::Decoder&)
> 3   0x108d078c4 IPC::Connection::dispatchMessage(IPC::Decoder&)
> 4   0x108d080ac
> IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder,
> std::__1::default_delete<IPC::Decoder> >)
> 5   0x108d08700 IPC::Connection::dispatchOneIncomingMessage()
> 6   0x108d28bd8
> IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder,
> std::__1::default_delete<IPC::Decoder> >)::$_10::operator()()
> 7   0x108d28ace
> WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::
> __1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder>
> >)::$_10, void>::call()
> 8   0x11f000f72 WTF::Function<void ()>::operator()() const
> 9   0x11f084295 WTF::RunLoop::performWork()
> 10  0x11f088b51 WTF::RunLoop::performWork(void*)
> 11  0x103c1837a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
> 12  0x103c18272 __CFRunLoopDoSource0
> 13  0x103c17754 __CFRunLoopDoSources0
> 14  0x103c11f1f __CFRunLoopRun
> 15  0x103c116c6 CFRunLoopRunSpecific
> 16  0x1035ff7b9 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
> 17  0x1035ff9cd -[NSRunLoop(NSRunLoop) run]
> 18  0x10552c176 _xpc_objc_main
> 19  0x10552e115 xpc_main
> 20  0x1099e8c8b WebKit::XPCServiceMain(int, char const**)
> 21  0x10b1191ab WKXPCServiceMain
> 22  0x103430d52 main
> 23  0x1051d9409 start
> LEAK: 1 WebPageProxy

Will fix this in bug 225234.
Comment 5 Peng Liu 2021-05-13 15:55:59 PDT
I can reproduce the failure locally with the following command:

run-webkit-tests --no-build --order=random fast/mediastream/audio-track-enabled.html webaudio/web-audio-is-playing.html --iterations=50 -f
Comment 6 Peng Liu 2021-05-13 16:02:20 PDT
The root cause of this flaky failure seems to be the interferences with web audio tests. Eric confirmed that it is possible because WKTR enables "Media in GPU Process" by default and AudioSession runs in the GPU Process now.
Comment 7 Peng Liu 2021-05-13 21:50:29 PDT
Looks like the real issue is that a WebContent process does not reset the category of the shared audio session before it loads a new page. Working on a patch to fix that.
Comment 8 Peng Liu 2021-05-14 13:39:34 PDT
Created attachment 428650 [details]
Patch
Comment 9 EWS 2021-05-14 16:46:18 PDT
Committed r277519 (237748@main): <https://commits.webkit.org/237748@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 428650 [details].