<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>238391</bug_id>
          
          <creation_ts>2022-03-25 14:12:38 -0700</creation_ts>
          <short_desc>With DOM Rendering in GPUP enabled, tests sometimes assert in GPUConnectionToWebProcess::didReceiveMessage()</short_desc>
          <delta_ts>2022-04-11 23:41:11 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Process Model</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=237674</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>kkinnunen</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1855232</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-03-25 14:12:38 -0700</bug_when>
    <thetext>Running fast/css tests in iOS simulator with DOM Rendering enabled, tests will sometimes assert here:

14:08:21.497 71433   1   0x14233d1a9 WTFCrash
14:08:21.497 71433   2   0x12ddf0e4b WTFCrashWithInfo(int, char const*, char const*, int)
14:08:21.497 71433   3   0x12e85e412 WebKit::GPUConnectionToWebProcess::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;)
14:08:21.497 71433   4   0x12f1e93a0 IPC::Connection::dispatchMessage(IPC::Decoder&amp;)
14:08:21.497 71433   5   0x12f1e9a95 IPC::Connection::dispatchMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;)
14:08:21.497 71433   6   0x12f1e3003 IPC::Connection::SyncMessageState::ConnectionAndIncomingMessage::dispatch()
14:08:21.497 71433   7   0x12f1e3298 IPC::Connection::SyncMessageState::dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection(IPC::Connection&amp;)
14:08:21.497 71433   8   0x12f1fa8ec IPC::Connection::SyncMessageState::processIncomingMessage(IPC::Connection&amp;, std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;&amp;)::$_5::operator()()
14:08:21.497 71433   9   0x12f1fa819 WTF::Detail::CallableWrapper&lt;IPC::Connection::SyncMessageState::processIncomingMessage(IPC::Connection&amp;, std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;&amp;)::$_5, void&gt;::call()
14:08:21.497 71433   10  0x142368852 WTF::Function&lt;void ()&gt;::operator()() const
14:08:21.497 71433   11  0x1423f2602 WTF::RunLoop::performWork()
14:08:21.497 71433   12  0x1423f5f2e WTF::RunLoop::performWork(void*)
14:08:21.497 71433   13  0x10a468833 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
14:08:21.497 71433   14  0x10a46872b __CFRunLoopDoSource0
14:08:21.497 71433   15  0x10a467bf8 __CFRunLoopDoSources0
14:08:21.497 71433   16  0x10a4622f4 __CFRunLoopRun
14:08:21.497 71433   17  0x10a461a90 CFRunLoopRunSpecific
14:08:21.497 71433   18  0x10adb1e31 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
14:08:21.497 71433   19  0x10adb204f -[NSRunLoop(NSRunLoop) run]
14:08:21.497 71433   20  0x10b8bffeb _xpc_objc_main
14:08:21.497 71433   21  0x10b8c1fd4 xpc_main
14:08:21.497 71433   22  0x12ea9c3ea WebKit::XPCServiceMain(int, char const**)
14:08:21.497 71433   23  0x1309acdcb WKXPCServiceMain
14:08:21.497 71433   24  0x109e14d32 main
14:08:21.497 71433   25  0x10a02af21
14:08:21.497 71433   26  0x1197f150e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1855233</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-03-25 14:13:06 -0700</bug_when>
    <thetext>Logging says:

14:08:21.496 71433 worker/0 fast/css/computed-image-width-with-percent-height-expected.html crashed, (stderr lines):
14:08:21.496 71433   StreamServerConnection::dispatchOutOfStreamMessage - no receiver for destination 8
14:08:21.496 71433   RemoteRenderingBackendProxy 0x7fba92a06c50 createRemoteImageBuffer 2854
14:08:21.496 71433   RemoteRenderingBackend 0x1540840c0 createImageBufferWithQualifiedIdentifier 2854
14:08:21.496 71433   RemoteDisplayListRecorder 0x154048950 RemoteDisplayListRecorder - RemoteRenderingBackend 0x1540840c0
14:08:21.496 71433   RemoteDisplayListRecorder 0x154048950 startListeningForIPC destination 2854
14:08:21.496 71433   StreamServerConnectionBase::startReceivingMessagesImpl destination 2854
14:08:21.496 71433    main thread: addMessageReceiveQueue destination 2854
14:08:21.496 71433   MessageReceiveQueueMap 0x15403c3d0 addImpl receiver RemoteDisplayListRecorder destination 2854
14:08:21.496 71433    done destination 2854
14:08:21.496 71433   create RemoteImageBuffer 0x15409c100 2854
14:08:21.496 71433   StreamServerConnection 0x154020220 processSetStreamDestinationID - current 8, new 2854
14:08:21.496 71433   StreamServerConnection 0x154020220 processSetStreamDestinationID - current 2854, new 8
14:08:21.496 71433   StreamServerConnection::dispatchOutOfStreamMessage - no receiver for destination 8
14:08:21.496 71433   StreamServerConnection::dispatchOutOfStreamMessage - no receiver for destination 8
14:08:21.496 71433   StreamServerConnection::dispatchOutOfStreamMessage - no receiver for destination 8
14:08:21.496 71433   StreamServerConnection 0x154020220 processSetStreamDestinationID - current 8, new 2851
14:08:21.496 71433   StreamServerConnection 0x154020220 processSetStreamDestinationID - current 2851, new 8
14:08:21.496 71433   StreamServerConnection 0x154020220 processSetStreamDestinationID - current 8, new 2854
14:08:21.496 71433   StreamServerConnection 0x154020220 processSetStreamDestinationID - current 2854, new 8
14:08:21.496 71433   destroy RemoteImageBuffer 0x15409c100 2854
14:08:21.496 71433   StreamServerConnection::dispatchOutOfStreamMessage - no receiver for destination 8
14:08:21.496 71433   MessageReceiveQueueMap 0x15403c3d0 remove receiver RemoteDisplayListRecorder destination 2854
14:08:21.496 71433   RemoteRenderingBackendProxy 0x7fba92a06c50 createRemoteImageBuffer 2860
14:08:21.496 71433   RemoteRenderingBackend 0x1540840c0 createImageBufferWithQualifiedIdentifier 2860
14:08:21.496 71433   RemoteDisplayListRecorder 0x154048a90 RemoteDisplayListRecorder - RemoteRenderingBackend 0x1540840c0
14:08:21.496 71433   RemoteDisplayListRecorder 0x154048a90 startListeningForIPC destination 2860
14:08:21.497 71433   StreamServerConnectionBase::startReceivingMessagesImpl destination 2860
14:08:21.497 71433    main thread: addMessageReceiveQueue destination 2860
14:08:21.497 71433   MessageReceiveQueueMap 0x15403c3d0 addImpl receiver RemoteDisplayListRecorder destination 2860
14:08:21.497 71433    done destination 2860
14:08:21.497 71433   create RemoteImageBuffer 0x15409c180 2860
14:08:21.497 71433   StreamServerConnection 0x154020220 processSetStreamDestinationID - current 8, new 2860
14:08:21.497 71433   StreamServerConnection 0x154020220 processSetStreamDestinationID - current 2860, new 2851
14:08:21.497 71433   StreamServerConnection 0x154020220 processSetStreamDestinationID - current 2851, new 8
14:08:21.497 71433   destroy RemoteImageBuffer 0x15409c980 2851
14:08:21.497 71433   MessageReceiveQueueMap 0x15403c3d0 remove receiver RemoteDisplayListRecorder destination 2851
14:08:21.497 71433   StreamServerConnection::dispatchOutOfStreamMessage - no receiver for destination 8
14:08:21.497 71433   RemoteRenderingBackendProxy 0x7fba92a06c50 createRemoteImageBuffer 2867
14:08:21.497 71433   RemoteRenderingBackend 0x1540840c0 createImageBufferWithQualifiedIdentifier 2867
14:08:21.497 71433   StreamClientConnection::send - failed to send inline message to stream
14:08:21.497 71433   SyncMessageState::processIncomingMessage: RemoteDisplayListRecorder message will be dispatched to the main thread
14:08:21.497 71433   Unhandled message RemoteDisplayListRecorder_DrawGlyphs to 2867
14:08:21.497 71433   SHOULD NEVER BE REACHED</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1855235</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-03-25 14:15:16 -0700</bug_when>
    <thetext>So:
1. StreamClientConnection fails to send an &quot;createRemoteImageBuffer&quot; inline message in-stream, and falls back to  out-of-stream
2. This message gets handled in SyncMessageState::processIncomingMessage(), so we bounce it to the main thread
3. We then receive a in-stream message that tries to target this image buffer, but its IPC receiver hasn&apos;t been registered yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1855236</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-03-25 14:15:47 -0700</bug_when>
    <thetext>&lt;rdar://problem/90856029&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1855238</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-03-25 14:29:47 -0700</bug_when>
    <thetext>This is with the fix for bug 237674.

MessageReceiveQueueMap::get() has special code for the pair&lt;receiverName, 0&gt; so that patch may have changed behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1855252</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-03-25 15:21:51 -0700</bug_when>
    <thetext>The patch in bug 237674 ensured that we never use a std::pair&lt;receiverName, 0&gt; because you can only have one per IPC::Connection, and we need these per RemoteRenderingBackend.

So I&apos;m not sure if it&apos;s valid for MessageReceiveQueueMap::get() to use the destinationID of 0 when looking for entries in the queues.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1855516</commentid>
    <comment_count>6</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2022-03-28 01:19:47 -0700</bug_when>
    <thetext>you&apos;re seeing this problem because you removed the very thing that &quot;fixed&quot; this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1855648</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-03-28 09:48:00 -0700</bug_when>
    <thetext>It wasn&apos;t at all clear that zero was a magic number.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>