Title: [269749] trunk/Source/WebKit
- Revision
- 269749
- Author
- [email protected]
- Date
- 2020-11-12 14:01:18 -0800 (Thu, 12 Nov 2020)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (269748 => 269749)
--- trunk/Source/WebKit/ChangeLog 2020-11-12 21:53:34 UTC (rev 269748)
+++ trunk/Source/WebKit/ChangeLog 2020-11-12 22:01:18 UTC (rev 269749)
@@ -1,3 +1,27 @@
+2020-11-12 Chris Dumez <[email protected]>
+
+ 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):
+
2020-11-12 Youenn Fablet <[email protected]>
WebProcess should process WebRTC codecs IPC messages from the GPU Process in a background thread
Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp (269748 => 269749)
--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp 2020-11-12 21:53:34 UTC (rev 269748)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp 2020-11-12 22:01:18 UTC (rev 269749)
@@ -29,6 +29,7 @@
#if ENABLE(GPU_PROCESS) && ENABLE(WEB_AUDIO)
#include "GPUConnectionToWebProcess.h"
+#include "Logging.h"
#include "RemoteAudioDestinationManagerMessages.h"
#include "RemoteAudioDestinationProxyMessages.h"
#include "WebProcess.h"
@@ -81,11 +82,17 @@
auto& connection = WebProcess::singleton().ensureGPUProcessConnection();
connection.addClient(*this);
- connection.connection().sendSync(
+ bool didSucceed = connection.connection().sendSync(
Messages::RemoteAudioDestinationManager::CreateAudioDestination(m_inputDeviceId, m_numberOfInputChannels, numberOfOutputChannels(), sampleRate(), hardwareSampleRate()),
Messages::RemoteAudioDestinationManager::CreateAudioDestination::Reply(destinationID), 0);
+
+ if (!didSucceed) {
+ // The GPUProcess likely crashed during this synchronous IPC. gpuProcessConnectionDidClose() will get called to reconnect to the GPUProcess.
+ RELEASE_LOG_ERROR(Media, "RemoteAudioDestinationProxy::connectToGPUProcess: Failed to send RemoteAudioDestinationManager::CreateAudioDestination() IPC (GPU process likely crashed)");
+ return;
+ }
+
connection.connection().addThreadMessageReceiver(Messages::RemoteAudioDestinationProxy::messageReceiverName(), this, destinationID.toUInt64());
-
m_destinationID = destinationID;
#if PLATFORM(COCOA)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes