WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
235636
[GPU Process] Remove the resource use counters from the remote resource cache
https://bugs.webkit.org/show_bug.cgi?id=235636
Summary
[GPU Process] Remove the resource use counters from the remote resource cache
Said Abou-Hallawa
Reported
2022-01-26 03:07:17 PST
The display list items and the resource caching messages are both communicated from the WebProcess and the GPUProcess through the stream connection. The resources will be sent to the GPUProcess, consumed by the display items and then released in the right order. So there is no need anymore for the resource use counters. They were added in
bug 228216
to synchronize properly the use and the release of the resources.
Attachments
Patch
(37.06 KB, patch)
2022-01-26 03:14 PST
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Said Abou-Hallawa
Comment 1
2022-01-26 03:14:41 PST
Created
attachment 450010
[details]
Patch
Said Abou-Hallawa
Comment 2
2022-01-26 10:16:56 PST
The reason for filing this bug is I found the following crash when running the layout tests with "--use-gpu-process". So instead of trying to investigate this crash, I think it is better to remove this unnecessary code. No crash log found for GPUProcess:51290. stdout: stderr: ASSERTION FAILED: iterator != m_resourceUseCounters.end() /Volumes/Data/WebKit/OpenSource/Source/WebKit/GPUProcess/graphics/RemoteResourceCache.cpp(165) : void WebKit::RemoteResourceCache::recordResourceUse(WebKit::QualifiedRenderingResourceIdentifier) 1 0x13b13ef59 WTFCrash 2 0x1277b8d1b WTFCrashWithInfo(int, char const*, char const*, int) 3 0x1284fa36e WebKit::RemoteResourceCache::recordResourceUse(WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType> >) 4 0x1284fbb86 WebKit::RemoteDisplayListRecorder::drawImageBufferWithQualifiedIdentifier(WebCore::ProcessQualified<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType> >, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ImagePaintingOptions const&) 5 0x1284fba3a WebKit::RemoteDisplayListRecorder::drawImageBuffer(WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ImagePaintingOptions const&) 6 0x128273d75 void IPC::callMemberFunctionImpl<WebKit::RemoteDisplayListRecorder, void (WebKit::RemoteDisplayListRecorder::*)(WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ImagePaintingOptions const&), std::__1::tuple<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WebCore::FloatRect, WebCore::FloatRect, WebCore::ImagePaintingOptions>, 0ul, 1ul, 2ul, 3ul>(WebKit::RemoteDisplayListRecorder*, void (WebKit::RemoteDisplayListRecorder::*)(WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ImagePaintingOptions const&), std::__1::tuple<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WebCore::FloatRect, WebCore::FloatRect, WebCore::ImagePaintingOptions>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>) 7 0x12827188d void IPC::callMemberFunction<WebKit::RemoteDisplayListRecorder, void (WebKit::RemoteDisplayListRecorder::*)(WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ImagePaintingOptions const&), std::__1::tuple<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WebCore::FloatRect, WebCore::FloatRect, WebCore::ImagePaintingOptions>, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul> >(std::__1::tuple<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WebCore::FloatRect, WebCore::FloatRect, WebCore::ImagePaintingOptions>&&, WebKit::RemoteDisplayListRecorder*, void (WebKit::RemoteDisplayListRecorder::*)(WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ImagePaintingOptions const&)) 8 0x12823549a void IPC::handleMessage<Messages::RemoteDisplayListRecorder::DrawImageBuffer, WebKit::RemoteDisplayListRecorder, void (WebKit::RemoteDisplayListRecorder::*)(WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ImagePaintingOptions const&)>(IPC::Connection&, IPC::Decoder&, WebKit::RemoteDisplayListRecorder*, void (WebKit::RemoteDisplayListRecorder::*)(WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ImagePaintingOptions const&)) 9 0x1282328cf WebKit::RemoteDisplayListRecorder::didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) 10 0x128ca73bb IPC::StreamServerConnection::dispatchStreamMessage(IPC::Decoder&&, IPC::StreamMessageReceiver&) 11 0x128ca6d60 IPC::StreamServerConnection::dispatchStreamMessages(unsigned long) 12 0x128ca56b8 IPC::StreamConnectionWorkQueue::processStreams() 13 0x128cad8b0 IPC::StreamConnectionWorkQueue::startProcessingThread()::$_0::operator()() 14 0x128cad869 WTF::Detail::CallableWrapper<IPC::StreamConnectionWorkQueue::startProcessingThread()::$_0, void>::call() 15 0x13b169942 WTF::Function<void ()>::operator()() const 16 0x13b231f18 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) 17 0x13b23e375 WTF::wtfThreadEntryPoint(void*) 18 0x10c1d84bc _pthread_start 19 0x10c1d3ebf thread_start
Wenson Hsieh
Comment 3
2022-01-26 10:17:49 PST
(In reply to Said Abou-Hallawa from
comment #2
)
> The reason for filing this bug is I found the following crash when running > the layout tests with "--use-gpu-process". So instead of trying to > investigate this crash, I think it is better to remove this unnecessary code.
+1!
Said Abou-Hallawa
Comment 4
2022-01-26 10:44:16 PST
The above crash seems to happen because the m_resourceHeap of RemoteResourceCache got out of sync from its m_resourceUseCounters. When RemoteDisplayListRecorder::drawImageBufferWithQualifiedIdentifier() calls resourceCache().cachedImageBuffer() with the given imageBufferIdentifier, it finds an ImageBuffer in its m_resourceHeap but when it calls resourceCache().recordResourceUse() with the same imageBufferIdentifier, it does not find a counter in its m_resourceUseCounters.
Said Abou-Hallawa
Comment 5
2022-01-26 10:46:10 PST
I meant to say the "assertion" not the "crash".
Said Abou-Hallawa
Comment 6
2022-01-31 13:58:57 PST
rdar://86150540
EWS
Comment 7
2022-01-31 14:53:26 PST
Committed
r288847
(
246608@main
): <
https://commits.webkit.org/246608@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 450010
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug