Changeset 276007 in webkit
- Timestamp:
- Apr 15, 2021, 12:37:06 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/ios-simulator-wk2/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/TestExpectations (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp (modified) (2 diffs)
-
Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h (modified) (1 diff)
-
Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in (modified) (1 diff)
-
Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r276004 r276007 1 2021-04-15 Chris Dumez <cdumez@apple.com> 2 3 REGRESSION(r275921-r275922): [ wk2 ] http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html is flakey crashing 4 https://bugs.webkit.org/show_bug.cgi?id=224566 5 <rdar://problem/76657007> 6 7 Reviewed by Tim Horton. 8 9 Unskip layout tests that should no longer be flaky. 10 11 * platform/ios-simulator-wk2/TestExpectations: 12 * platform/mac-wk2/TestExpectations: 13 1 14 2021-04-14 Diego Pino Garcia <dpino@igalia.com> 2 15 -
trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations
r275987 r276007 170 170 http/tests/navigation/page-cache-mediastream.html [ Pass Crash ] 171 171 172 # webkit.org/b/224566 The following three tests are flaky crashing causing issues with EWS/commit queue.173 http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html [ Pass Crash ]174 imported/w3c/web-platform-tests/webmessaging/with-ports/011.html [ Pass Crash ]175 webgl/1.0.3/conformance/glsl/matrices/glsl-mat3-construction.html [ Pass Crash ] -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r275987 r276007 1378 1378 http/tests/navigation/page-cache-mediastream.html [ Pass Crash ] 1379 1379 1380 # webkit.org/b/224566 The following three tests are flaky crashing causing issues with EWS/commit queue.1381 http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html [ Pass Crash ]1382 imported/w3c/web-platform-tests/webmessaging/with-ports/011.html [ Pass Crash ]1383 webgl/1.0.3/conformance/glsl/matrices/glsl-mat3-construction.html [ Pass Crash ]1384 1385 1380 webkit.org/b/221985 fast/mediastream/audio-track-enabled.html [ Pass Failure ] -
trunk/Source/WebKit/ChangeLog
r275992 r276007 1 2021-04-15 Chris Dumez <cdumez@apple.com> 2 3 REGRESSION(r275921-r275922): [ wk2 ] http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html is flakey crashing 4 https://bugs.webkit.org/show_bug.cgi?id=224566 5 <rdar://problem/76657007> 6 7 Reviewed by Tim Horton. 8 9 r275921-r275922 changed the timing of when the WebProcess/RemoteRenderingBackendProxy sends the GPUConnectionToWebProcess::CreateRenderingBackend 10 IPC to the GPUProcess. This IPC used to get sent as soon as the RemoteRenderingBackendProxy was constructed. However, I delayed sending it until 11 the RemoteRenderingBackendProxy actually needs to create an ImageBuffer to avoid launching the GPUProcess prematurely. 12 13 Unfortunately, this exposed a pre-existing synchronization issue with regards to the RemoteRenderingBackend IPC. In particular, the 14 GPUConnectionToWebProcess::CreateRenderingBackend was getting sent asynchronously and processed by the GPUProcess on the main thread. This would 15 cause the creation of the RemoteRenderingBackend object on the GPUProcess side, which would then register itself as a WorkQueueMessageReceiver. 16 The issue is that the WebProcess was sending the RemoteRenderingBackend IPC so quickly after the CreateRenderingBackend IPC that when the IPC is 17 received (on the IPC thread), the RemoteRenderingBackend has not had a change to register itself as a WorkQueueMessageReceiver yet. As a result, 18 some of the early IPC was getting dispatched to the main thread and later IPC would get sent to the RemoteRenderingBackend WorkQueue. This was 19 causing RemoteRenderingBackend to get processed out of order. 20 21 To address the synchronization issue for now, I made the GPUConnectionToWebProcess::CreateRenderingBackend synchronous. This may not be the 22 best design long term but it is an easy and safe way to resolve this for now. It makes sure the WebProcess cannot send RemoteRenderingBackend 23 IPC until after the GPUProcess has created the RemoteRenderingBackend and the RemoteRenderingBackend object has registered itself as a 24 WorkQueueMessageReceiver. We probably want to follow-up when we come up with a better design. For now though, I have verified locally that this 25 fixes the out of order IPC messaging AND the flaky crashes on these canvas tests. 26 27 No new tests, unskipped existing tests that are no longer flaky. 28 29 * GPUProcess/GPUConnectionToWebProcess.cpp: 30 (WebKit::GPUConnectionToWebProcess::createRenderingBackend): 31 * GPUProcess/GPUConnectionToWebProcess.h: 32 * GPUProcess/GPUConnectionToWebProcess.messages.in: 33 * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: 34 (WebKit::RemoteRenderingBackendProxy::ensureGPUProcessConnection): 35 1 36 2021-04-14 Basuke Suzuki <basuke.suzuki@sony.com> 2 37 -
trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
r275968 r276007 363 363 #endif 364 364 365 void GPUConnectionToWebProcess::createRenderingBackend(RemoteRenderingBackendCreationParameters&& creationParameters )365 void GPUConnectionToWebProcess::createRenderingBackend(RemoteRenderingBackendCreationParameters&& creationParameters, CompletionHandler<void()>&& completionHandler) 366 366 { 367 367 auto addResult = m_remoteRenderingBackendMap.ensure(creationParameters.identifier, [&]() { … … 369 369 }); 370 370 ASSERT_UNUSED(addResult, addResult.isNewEntry); 371 completionHandler(); 371 372 } 372 373 -
trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h
r275921 r276007 162 162 #endif 163 163 164 void createRenderingBackend(RemoteRenderingBackendCreationParameters&& );164 void createRenderingBackend(RemoteRenderingBackendCreationParameters&&, CompletionHandler<void()>&&); 165 165 void releaseRenderingBackend(RenderingBackendIdentifier); 166 166 -
trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in
r275921 r276007 24 24 25 25 messages -> GPUConnectionToWebProcess WantsDispatchMessage { 26 void CreateRenderingBackend(struct WebKit::RemoteRenderingBackendCreationParameters creationParameters) 26 void CreateRenderingBackend(struct WebKit::RemoteRenderingBackendCreationParameters creationParameters) -> () Synchronous 27 27 void ReleaseRenderingBackend(WebKit::RenderingBackendIdentifier renderingBackendIdentifier) 28 28 #if ENABLE(WEBGL) -
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp
r275922 r276007 76 76 gpuProcessConnection.addClient(*this); 77 77 gpuProcessConnection.messageReceiverMap().addMessageReceiver(Messages::RemoteRenderingBackendProxy::messageReceiverName(), renderingBackendIdentifier().toUInt64(), *this); 78 gpuProcessConnection.connection().send(Messages::GPUConnectionToWebProcess::CreateRenderingBackend(m_parameters), 0, IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply); 78 // This message is synchronous to ensure that the RemoteRenderingBackend has been created and has registered itself as a WorkQueueMessageReceiver before we send it IPC. 79 // Without this synchronization, some IPC messages may get received by the GPUProcess before the RemoteRenderingBackend has registered itself as a WorkQueueMessageReceiver 80 // and IPC may get processed out of order. 81 gpuProcessConnection.connection().sendSync(Messages::GPUConnectionToWebProcess::CreateRenderingBackend(m_parameters), Messages::GPUConnectionToWebProcess::CreateRenderingBackend::Reply(), 0); 79 82 m_gpuProcessConnection = makeWeakPtr(gpuProcessConnection); 80 83 }
Note:
See TracChangeset
for help on using the changeset viewer.