⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 280951 in webkit


Ignore:
Timestamp:
Aug 11, 2021, 6:11:15 PM (5 years ago)
Author:
Peng Liu
Message:

[ BigSur Debug ] TestWebKitAPI.GPUProcess.CrashWhilePlayingAudioViaCreateMediaElementSource is flaky, hitting ASSERTION FAILED: !isInRoutingArbitrationForToken(token)
https://bugs.webkit.org/show_bug.cgi?id=227728
<rdar://problem/80237464>

Reviewed by Jer Noble.

Source/WebKit:

After the GPU process crashes, the UI process will clean up the
SharedRoutingArbitrator, while a WebContent process might be resuming
the media playback and setup AudioSessionRoutingArbitrator.
There is a race condition here. If the WebContent process runs faster,
SharedRoutingArbitrator in the UI process will try to begin a duplicated
routing arbitration and lead to an assertion failure.

No new tests. Fixed following two API test failures:

  • TestWebKitAPI.WebKit2.CrashGPUProcessWhileCapturing
  • TestWebKitAPI.GPUProcess.CrashWhilePlayingAudioViaCreateMediaElementSource
  • UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm:

(WebKit::AudioSessionRoutingArbitratorProxy::processDidTerminate):

  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::didClose):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(TEST):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r280936 r280951  
     12021-08-11  Peng Liu  <peng.liu6@apple.com>
     2
     3        [ BigSur Debug ] TestWebKitAPI.GPUProcess.CrashWhilePlayingAudioViaCreateMediaElementSource is flaky, hitting ASSERTION FAILED: !isInRoutingArbitrationForToken(token)
     4        https://bugs.webkit.org/show_bug.cgi?id=227728
     5        <rdar://problem/80237464>
     6
     7        Reviewed by Jer Noble.
     8
     9        After the GPU process crashes, the UI process will clean up the
     10        `SharedRoutingArbitrator`, while a WebContent process might be resuming
     11        the media playback and setup `AudioSessionRoutingArbitrator`.
     12        There is a race condition here. If the WebContent process runs faster,
     13        `SharedRoutingArbitrator` in the UI process will try to begin a duplicated
     14        routing arbitration and lead to an assertion failure.
     15
     16        No new tests. Fixed following two API test failures:
     17        - TestWebKitAPI.WebKit2.CrashGPUProcessWhileCapturing
     18        - TestWebKitAPI.GPUProcess.CrashWhilePlayingAudioViaCreateMediaElementSource
     19
     20        * UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm:
     21        (WebKit::AudioSessionRoutingArbitratorProxy::processDidTerminate):
     22        * WebProcess/GPU/GPUProcessConnection.cpp:
     23        (WebKit::GPUProcessConnection::didClose):
     24
    1252021-08-11  Peng Liu  <peng.liu6@apple.com>
    226
  • trunk/Source/WebKit/UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm

    r276993 r280951  
    5353void AudioSessionRoutingArbitratorProxy::processDidTerminate()
    5454{
    55     if (SharedRoutingArbitrator::sharedInstance().isInRoutingArbitrationForToken(m_token))
    56         endRoutingArbitration();
    5755}
    5856
  • trunk/Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp

    r280731 r280951  
    128128    WebProcess::singleton().gpuProcessConnectionClosed(*this);
    129129
     130#if ENABLE(ROUTING_ARBITRATION)
     131    if (auto* arbitrator = WebProcess::singleton().supplement<AudioSessionRoutingArbitrator>())
     132        arbitrator->leaveRoutingAbritration();
     133#endif
     134
    130135    auto clients = m_clients;
    131136    for (auto& client : clients)
  • trunk/Tools/ChangeLog

    r280920 r280951  
     12021-08-11  Peng Liu  <peng.liu6@apple.com>
     2
     3        [ BigSur Debug ] TestWebKitAPI.GPUProcess.CrashWhilePlayingAudioViaCreateMediaElementSource is flaky, hitting ASSERTION FAILED: !isInRoutingArbitrationForToken(token)
     4        https://bugs.webkit.org/show_bug.cgi?id=227728
     5        <rdar://problem/80237464>
     6
     7        Reviewed by Jer Noble.
     8
     9        * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
     10        (TEST):
     11
    1122021-08-11  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm

    r280180 r280951  
    369369}
    370370
    371 // FIXME: Re-enable this test once <rdar://80237464> is resolved
    372 TEST(GPUProcess, DISABLED_CrashWhilePlayingAudioViaCreateMediaElementSource)
     371TEST(GPUProcess, CrashWhilePlayingAudioViaCreateMediaElementSource)
    373372{
    374373    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
Note: See TracChangeset for help on using the changeset viewer.