[Webkit-unassigned] [Bug 231681] REGRESSION (2021-10-13): [ iOS MacOS wk2 Release ] 2 fast/canvas tests are flaky failing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 16 12:52:55 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=231681

--- Comment #10 from Wenson Hsieh <wenson_hsieh at apple.com> ---
I understand what's happening now:

```
(UI) Running /Users/whsieh/work/OpenSource/LayoutTests/fast/canvas/gradient-with-clip.html
(WEB) Sent in stream: RemoteRenderingBackend_FinalizeRenderingUpdate @[2096800]
                                                                                (GPU) Dispatching in stream: RemoteRenderingBackend_FinalizeRenderingUpdate
(WEB) Sent in stream: RemoteRenderingBackend_CreateImageBuffer @[2096816]
                                                                                (GPU) Dispatching in stream: RemoteRenderingBackend_CreateImageBuffer
(WEB) Sent in stream: RemoteDisplayListRecorder_Save @[2096904]
(WEB) Sent in stream: RemoteDisplayListRecorder_Save @[2096914]
(WEB) Sent in stream: RemoteDisplayListRecorder_SetState @[2096924]
(WEB) Sent in stream: RemoteDisplayListRecorder_FillRect @[2096946]
(WEB) Sent in stream: RemoteDisplayListRecorder_Restore @[2096968]
(WEB) Sent in stream: RemoteDisplayListRecorder_GetPixelBuffer @[2096978]
(WEB) Sent in stream: RemoteDisplayListRecorder_FlushContext @[2097034]
                                                                                (GPU) Start receiving messages for RemoteDisplayListRecorder(#20899)
                                                                                (GPU) Dispatching in stream: RemoteDisplayListRecorder_Save
                                                                                (GPU) Dispatching in stream: RemoteDisplayListRecorder_Save
                                                                                (GPU) Dispatching in stream: RemoteDisplayListRecorder_SetState
                                                                                (GPU) Dispatching in stream: RemoteDisplayListRecorder_FillRect
                                                                                (GPU) Dispatching in stream: RemoteDisplayListRecorder_Restore
                                                                                (GPU) Dispatching in stream: RemoteDisplayListRecorder_GetPixelBuffer
                                                                                (GPU) Dispatching in stream: RemoteDisplayListRecorder_FlushContext
(WEB) Sent out of stream: RemoteRenderingBackend_CreateImageBuffer
(WEB) Sent in stream: RemoteDisplayListRecorder_Save @[2097088]
                                                                                (GPU) Dispatching out-of-stream: RemoteRenderingBackend_CreateImageBuffer
(WEB) Sent out of stream: RemoteDisplayListRecorder_SetState
                                                                                (GPU) Processing incoming message: RemoteDisplayListRecorder_SetState for RemoteDisplayListRecorder(#20901) 0x0
(WEB) Sent out of stream: RemoteDisplayListRecorder_FillPath
(WEB) Sent in stream: RemoteDisplayListRecorder_SetInlineFillColor @[0]
                                                                                (GPU) Processing incoming message: RemoteDisplayListRecorder_FillPath for RemoteDisplayListRecorder(#20901) 0x0
(WEB) Sent in stream: RemoteDisplayListRecorder_FillRect @[10]
(WEB) Sent in stream: RemoteDisplayListRecorder_GetPixelBuffer @[32]
(WEB) Sent in stream: RemoteDisplayListRecorder_FlushContext @[90]
                                                                                (GPU) Start receiving messages for RemoteDisplayListRecorder(#20901)
                                                                                (GPU) Dispatching in stream: RemoteDisplayListRecorder_Save
(WEB) FAILED TO WAIT FOR GetPixelBuffer!
```

When we are about to run off the end of the stream buffer and (as a result) send out-of-stream messages, it's possible for these OOS IPC messages to be received on the IPC::Connection via the IPC thread, right before we add the RemoteDisplayListRecorder as an IPC receive queue in `StreamServerConnection::startReceivingMessages` when creating a new remote image buffer:

```
void Connection::processIncomingMessage(std::unique_ptr<Decoder> message)
{
    …

    Locker incomingMessagesLocker { m_incomingMessagesLock };
    if (auto* receiveQueue = m_receiveQueues.get(*message)) {
        receiveQueue->enqueueMessage(*this, WTFMove(message));
        return;
    }
```

..as a result, `receiveQueue` above ends up being null, and there is no mechanism for queueing IPC messages for a receive queue that will be added in the future, so we end up missing the OOS message altogether, and stop processing stream messages.

In order to address this, we need to somehow fix the race condition between:
1. Adding RemoteDisplayListRecorder as an IPC receive queue, and
2. Receiving out of stream messages on the IPC thread

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211016/4db1fe06/attachment-0001.htm>


More information about the webkit-unassigned mailing list