Changeset 269749 in webkit


Ignore:
Timestamp:
Nov 12, 2020 2:01:18 PM (3 years ago)
Author:
Chris Dumez
Message:

ASSERTION FAILED: isValidIdentifier(m_identifier) seen with TestWebKitAPI.GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes
https://bugs.webkit.org/show_bug.cgi?id=218856
<rdar://problem/71331809>

Reviewed by Tim Horton.

The API test is repeatedly killing the GPU process. As a result, it is possible for the
GPUProcess to crash while RemoteAudioDestinationProxy::connectToGPUProcess() is in the
middle of its RemoteAudioDestinationManager::CreateAudioDestination() synchronous IPC.
The function would fail to check if the IPC was successful and proceed with an invalid
destinationID in such cases, causing the crash.

We now check if the sendSync() was successful. If it wasn't we now log an error and
return early. RemoteAudioDestinationManager::gpuProcessConnectionDidClose() will get
called later on to notify us that the GPU Process crashed and it will call
connectToGPUProcess() again.

No new tests, covered by existing API test that is flakily crashing.

  • WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:

(WebKit::RemoteAudioDestinationProxy::connectToGPUProcess):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r269739 r269749  
     12020-11-12  Chris Dumez  <cdumez@apple.com>
     2
     3        ASSERTION FAILED: isValidIdentifier(m_identifier) seen with TestWebKitAPI.GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes
     4        https://bugs.webkit.org/show_bug.cgi?id=218856
     5        <rdar://problem/71331809>
     6
     7        Reviewed by Tim Horton.
     8
     9        The API test is repeatedly killing the GPU process. As a result, it is possible for the
     10        GPUProcess to crash while RemoteAudioDestinationProxy::connectToGPUProcess() is in the
     11        middle of its RemoteAudioDestinationManager::CreateAudioDestination() synchronous IPC.
     12        The function would fail to check if the IPC was successful and proceed with an invalid
     13        destinationID in such cases, causing the crash.
     14
     15        We now check if the sendSync() was successful. If it wasn't we now log an error and
     16        return early. RemoteAudioDestinationManager::gpuProcessConnectionDidClose() will get
     17        called later on to notify us that the GPU Process crashed and it will call
     18        connectToGPUProcess() again.
     19
     20        No new tests, covered by existing API test that is flakily crashing.
     21
     22        * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
     23        (WebKit::RemoteAudioDestinationProxy::connectToGPUProcess):
     24
    1252020-11-12  Youenn Fablet  <youenn@apple.com>
    226
  • trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp

    r269698 r269749  
    3030
    3131#include "GPUConnectionToWebProcess.h"
     32#include "Logging.h"
    3233#include "RemoteAudioDestinationManagerMessages.h"
    3334#include "RemoteAudioDestinationProxyMessages.h"
     
    8283    auto& connection = WebProcess::singleton().ensureGPUProcessConnection();
    8384    connection.addClient(*this);
    84     connection.connection().sendSync(
     85    bool didSucceed = connection.connection().sendSync(
    8586        Messages::RemoteAudioDestinationManager::CreateAudioDestination(m_inputDeviceId, m_numberOfInputChannels, numberOfOutputChannels(), sampleRate(), hardwareSampleRate()),
    8687        Messages::RemoteAudioDestinationManager::CreateAudioDestination::Reply(destinationID), 0);
     88
     89    if (!didSucceed) {
     90        // The GPUProcess likely crashed during this synchronous IPC. gpuProcessConnectionDidClose() will get called to reconnect to the GPUProcess.
     91        RELEASE_LOG_ERROR(Media, "RemoteAudioDestinationProxy::connectToGPUProcess: Failed to send RemoteAudioDestinationManager::CreateAudioDestination() IPC (GPU process likely crashed)");
     92        return;
     93    }
     94
    8795    connection.connection().addThreadMessageReceiver(Messages::RemoteAudioDestinationProxy::messageReceiverName(), this, destinationID.toUInt64());
    88 
    8996    m_destinationID = destinationID;
    9097
Note: See TracChangeset for help on using the changeset viewer.