RESOLVED FIXED Bug 221920
[GPUP] Ignore an IPC message if the message receiver has been destroyed
https://bugs.webkit.org/show_bug.cgi?id=221920
Summary [GPUP] Ignore an IPC message if the message receiver has been destroyed
Peng Liu
Reported 2021-02-15 13:24:56 PST
[GPUP] Ignore an IPC message if the message receiver has been destroyed
Attachments
Patch (5.82 KB, patch)
2021-02-15 13:27 PST, Peng Liu
eric.carlson: review+
Revise the patch based on Eric's comment (4.17 KB, patch)
2021-02-15 14:36 PST, Peng Liu
no flags
Peng Liu
Comment 1 2021-02-15 13:27:09 PST
Eric Carlson
Comment 2 2021-02-15 14:04:33 PST
Comment on attachment 420358 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420358&action=review > Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:110 > +Logger& GPUProcessConnection::logger() > +{ > + if (!m_logger) > + m_logger = Logger::create(this); > + > + return *m_logger; > +} > + It looks like this is unused, `RELEASE_LOG_ERROR` does not use a Logger.
Peng Liu
Comment 3 2021-02-15 14:32:02 PST
Comment on attachment 420358 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420358&action=review >> Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:110 >> + > > It looks like this is unused, `RELEASE_LOG_ERROR` does not use a Logger. Right, will fix it. Thanks!
Peng Liu
Comment 4 2021-02-15 14:36:53 PST
Created attachment 420374 [details] Revise the patch based on Eric's comment
EWS
Comment 5 2021-02-15 15:49:07 PST
Committed r272887: <https://commits.webkit.org/r272887> All reviewed patches have been landed. Closing bug and clearing flags on attachment 420374 [details].
Radar WebKit Bug Importer
Comment 6 2021-02-15 15:50:15 PST
Truitt Savell
Comment 7 2021-02-17 10:37:04 PST
We are still seeing these two tests crashing even after this change: imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-origin.sub.html http/tests/navigation/parsed-iframe-dynamic-form-back-entry.html history: https://results.webkit.org/?suite=layout-tests&suite=layout-tests&test=http%2Ftests%2Fnavigation%2Fparsed-iframe-dynamic-form-back-entry.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fcanvas%2Felement%2Fimagebitmap%2FcreateImageBitmap-origin.sub.html
Truitt Savell
Comment 8 2021-02-17 10:39:13 PST
Truitt Savell
Comment 9 2021-02-17 10:39:31 PST
Reopening for continuing issues
Peng Liu
Comment 10 2021-02-17 11:04:52 PST
(In reply to Truitt Savell from comment #8) > Crash log for > imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/ > createImageBitmap-origin.sub.html > > https://build.webkit.org/results/Apple-BigSur-Debug-WK2-Tests/ > r272998%20(200)/imported/w3c/web-platform-tests/html/canvas/element/ > imagebitmap/createImageBitmap-origin.sub-crash-log.txt > > > Crash log for > http/tests/navigation/parsed-iframe-dynamic-form-back-entry.html > > https://build.webkit.org/results/Apple-BigSur-Debug-WK2-Tests/ > r272998%20(200)/http/tests/navigation/parsed-iframe-dynamic-form-back-entry- > crash-log.txt These are GPU Process crashes.
Peng Liu
Comment 11 2021-02-17 15:30:05 PST
Filed bug 222079 to fix the crash of http/tests/navigation/parsed-iframe-dynamic-form-back-entry.html.
Peng Liu
Comment 12 2021-02-20 10:28:41 PST
Bug 221989 tracks the crash of imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-origin.sub.html.
Peng Liu
Comment 13 2021-02-20 10:29:03 PST
Let's close this bug.
Kimmo Kinnunen
Comment 14 2021-03-05 01:57:55 PST
Comment on attachment 420374 [details] Revise the patch based on Eric's comment View in context: https://bugs.webkit.org/attachment.cgi?id=420374&action=review > Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:181 > + RELEASE_LOG_ERROR(WebGL, "The RemoteGraphicsContextGLProxy object has beed destroyed"); From WebGL perspective this is incorrect. This is not an error. This is expected, the sender cannot know when the receiver decides to stop listening.
Peng Liu
Comment 15 2021-03-05 10:26:16 PST
Comment on attachment 420374 [details] Revise the patch based on Eric's comment View in context: https://bugs.webkit.org/attachment.cgi?id=420374&action=review >> Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:181 >> + RELEASE_LOG_ERROR(WebGL, "The RemoteGraphicsContextGLProxy object has beed destroyed"); > > From WebGL perspective this is incorrect. > This is not an error. This is expected, the sender cannot know when the receiver decides to stop listening. Hmm, but this log message is from GPUProcessConnection's perspective?
Jer Noble
Comment 16 2021-03-05 10:36:14 PST
(In reply to Kimmo Kinnunen from comment #14) > Comment on attachment 420374 [details] > Revise the patch based on Eric's comment > > View in context: > https://bugs.webkit.org/attachment.cgi?id=420374&action=review > > > Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:181 > > + RELEASE_LOG_ERROR(WebGL, "The RemoteGraphicsContextGLProxy object has beed destroyed"); > > From WebGL perspective this is incorrect. > This is not an error. This is expected, the sender cannot know when the > receiver decides to stop listening. This is immaterial to whether the receiver is a WebGL object or not; this is a bug in our XPC implementation. And it's not true that the sender cannot know when the receiver decides to stop listening. The receiver can send an async message to the remote process and wait for a response before stopping listening.
Kimmo Kinnunen
Comment 17 2021-03-05 11:12:05 PST
(In reply to Jer Noble from comment #16) > And it's not true that the sender cannot > know when the receiver decides to stop listening. The receiver can send an > async message to the remote process and wait for a response before stopping > listening. Web process sends "do something" for destination id 7. GPU process receives "do something". GPU process sends "something done". Web process sends "do something" else for destination id 7. Web process notices GPU process timed out. Web process removes all references to anything related to id 7. Web process receives "something done" for id 7. In general, in asynchronous communication you cannot know if the other party will get the message you send.
Kimmo Kinnunen
Comment 18 2021-03-05 11:23:19 PST
> The receiver can send an > async message to the remote process and wait for a response before stopping > listening. The destruction is not a sync operation. Would it be useful as as sync operation? Here's a sequence that might trigger the error message WebContent: Send CreateRemoteGraphicsContextGL id 7 Send ReleaseRemoteGraphicsContextGL id 7 GPU Process: Got CreateRemoteGraphicsContextGL id 7 Send WasCreated id 7 Got ReleaseRemoteGraphicsContextGL id 7
Kimmo Kinnunen
Comment 19 2021-03-05 11:28:46 PST
(In reply to Kimmo Kinnunen from comment #18) > The destruction is not a sync operation. Would it be useful as as sync > operation? Sync or async with a reply would fit here better -- does not matter. Destruction is not usually something you compute a result with.
Note You need to log in before you can comment on or make changes to this bug.