Bug 228969

Summary: [GPU Process] REGRESSION: WebContent often crashes when using iCloud photos
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: CanvasAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, mmaxfield, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=228665
Attachments:
Description Flags
Patch
none
Patch
none
Patch
simon.fraser: review+
Patch none

Description Said Abou-Hallawa 2021-08-10 14:12:42 PDT
This will cause the WebProcess to be terminated. It is a remaining work of bug 228665.

Right now these call stacks are possible and all of them are wrong. All of them call RemoteRenderingBackendProxy::releaseRemoteResource() while the GPUP is terminated and is being relaunched:

NativeImage:

WebKit::RemoteRenderingBackendProxy::releaseRemoteResource(WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, unsigned long long)
WebKit::RemoteResourceCacheProxy::releaseNativeImage(WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>)
WebCore::NativeImage::~NativeImage()
WebCore::DisplayList::DisplayList::clear()
WebCore::DisplayList::ImageBuffer<WebKit::ImageBufferShareableMappedIOSurfaceBackend>::clearBackend()
WebKit::RemoteResourceCacheProxy::remoteResourceCacheWasDestroyed()
WebKit::RemoteRenderingBackendProxy::gpuProcessConnectionDidClose(WebKit::GPUProcessConnection&)
WebKit::GPUProcessConnection::didClose(IPC::Connection&)
WTF::Detail::CallableWrapper<IPC::Connection::connectionDidClose()::$_8, void>::call()

ImageBuffer:

WebKit::RemoteRenderingBackendProxy::releaseRemoteResource(WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, unsigned long long)
WebKit::RemoteResourceCacheProxy::releaseImageBuffer(WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>)
WebKit::RemoteImageBufferProxy<WebKit::ImageBufferShareableMappedIOSurfaceBackend>::~RemoteImageBufferProxy()
WebKit::RemoteImageBufferProxy<WebKit::ImageBufferShareableMappedIOSurfaceBackend>::~RemoteImageBufferProxy()
WebCore::DisplayList::DisplayList::clear()
WebCore::DisplayList::ImageBuffer<WebKit::ImageBufferShareableMappedIOSurfaceBackend>::clearBackend()
WebKit::RemoteResourceCacheProxy::remoteResourceCacheWasDestroyed()
WebKit::RemoteRenderingBackendProxy::gpuProcessConnectionDidClose(WebKit::GPUProcessConnection&)
WebKit::GPUProcessConnection::didClose(IPC::Connection&)
WTF::Detail::CallableWrapper<IPC::Connection::connectionDidClose()::$_8, void>::call()

Font:

WebKit::RemoteRenderingBackendProxy::releaseRemoteResource(WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, unsigned long long)
WebKit::RemoteResourceCacheProxy::clearFontMap()
WebKit::RemoteResourceCacheProxy::remoteResourceCacheWasDestroyed()
WebKit::RemoteRenderingBackendProxy::gpuProcessConnectionDidClose(WebKit::GPUProcessConnection&)
WebKit::GPUProcessConnection::didClose(IPC::Connection&)
WTF::Detail::CallableWrapper<IPC::Connection::connectionDidClose()::$_8, void>::call()
Comment 1 Radar WebKit Bug Importer 2021-08-10 14:13:19 PDT
<rdar://problem/81761078>
Comment 2 Said Abou-Hallawa 2021-08-10 14:27:19 PDT
Created attachment 435292 [details]
Patch
Comment 3 Said Abou-Hallawa 2021-08-10 14:43:49 PDT
Created attachment 435297 [details]
Patch
Comment 4 Said Abou-Hallawa 2021-08-11 14:12:42 PDT
Created attachment 435373 [details]
Patch
Comment 5 Said Abou-Hallawa 2021-08-12 12:24:04 PDT
Created attachment 435442 [details]
Patch
Comment 6 EWS 2021-08-12 13:28:06 PDT
Committed r280981 (240482@main): <https://commits.webkit.org/240482@main>

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