<?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>263783</bug_id>
          
          <creation_ts>2023-10-27 08:30:53 -0700</creation_ts>
          <short_desc>REGRESSION (Sonoma): ASSERT(m_scrollingStateTree) on fast/scrolling/scroll-snap-crash.html</short_desc>
          <delta_ts>2023-11-08 09:33:51 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=264419</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="Chris Dumez">cdumez</reporter>
          <assigned_to name="Nikos Mouchtaris">nmouchtaris</assigned_to>
          <cc>ap</cc>
    
    <cc>ben_schwartz</cc>
    
    <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>1988013</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-10-27 08:30:53 -0700</bug_when>
    <thetext>fast/scrolling/scroll-snap-crash.html is crashing consistently on my machine with a debug build like so:
run-webkit-tests --debug --no-build --repeat-each=3 fast/scrolling/scroll-snap-crash.html

Crash:
```
Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   JavaScriptCore                	       0x10bd37c44 WTFCrash + 24 (Assertions.cpp:333)
1   WebCore                       	       0x282d67ccc WTFCrashWithInfo(int, char const*, char const*, int) + 36 (Assertions.h:778)
2   WebCore                       	       0x284e407e0 WebCore::ScrollingStateNode::scrollingStateTree() const + 124 (ScrollingStateNode.h:305)
3   WebCore                       	       0x284e4a728 WebCore::ScrollingStateScrollingNode::~ScrollingStateScrollingNode() + 64 (ScrollingStateScrollingNode.cpp:89)
4   WebCore                       	       0x284e3ef44 WebCore::ScrollingStateFrameScrollingNode::~ScrollingStateFrameScrollingNode() + 116 (ScrollingStateFrameScrollingNode.cpp:96)
5   WebCore                       	       0x284e3ef74 WebCore::ScrollingStateFrameScrollingNode::~ScrollingStateFrameScrollingNode() + 32 (ScrollingStateFrameScrollingNode.cpp:96)
6   WebCore                       	       0x284e3efa4 WebCore::ScrollingStateFrameScrollingNode::~ScrollingStateFrameScrollingNode() + 32 (ScrollingStateFrameScrollingNode.cpp:96)
7   WebKit                        	       0x12c5b7210 void WTF::ThreadSafeWeakPtrControlBlock::strongDeref&lt;WebCore::ScrollingStateNode, (WTF::DestructionThread)0&gt;() const::&apos;lambda&apos;()::operator()() const + 104 (ThreadSafeWeakPtr.h:101)
8   WebKit                        	       0x12c5b7190 void WTF::ThreadSafeWeakPtrControlBlock::strongDeref&lt;WebCore::ScrollingStateNode, (WTF::DestructionThread)0&gt;() const + 328 (ThreadSafeWeakPtr.h:107)
9   WebKit                        	       0x12c5b703c WTF::ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr&lt;WebCore::ScrollingStateNode, (WTF::DestructionThread)0&gt;::deref() const + 32 (ThreadSafeWeakPtr.h:170)
10  WebKit                        	       0x12c5b7008 WTF::Ref&lt;WebCore::ScrollingStateFrameScrollingNode, WTF::RawPtrTraits&lt;WebCore::ScrollingStateFrameScrollingNode&gt;&gt;::~Ref() + 80 (Ref.h:61)
11  WebKit                        	       0x12c5b6fa8 WTF::Ref&lt;WebCore::ScrollingStateFrameScrollingNode, WTF::RawPtrTraits&lt;WebCore::ScrollingStateFrameScrollingNode&gt;&gt;::~Ref() + 32 (Ref.h:55)
12  WebKit                        	       0x12dd7ebcc IPC::ArgumentCoder&lt;WebCore::ScrollingStateFrameScrollingNode, void&gt;::decode(IPC::Decoder&amp;) + 2520 (RemoteScrollingCoordinatorTransaction.cpp:367)
13  WebKit                        	       0x12c79f75c std::__1::optional&lt;WTF::RefPtr&lt;WebCore::ScrollingStateFrameScrollingNode, WTF::RawPtrTraits&lt;WebCore::ScrollingStateFrameScrollingNode&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::ScrollingStateFrameScrollingNode&gt;&gt;&gt; IPC::ArgumentCoder&lt;WTF::RefPtr&lt;WebCore::ScrollingStateFrameScrollingNode, WTF::RawPtrTraits&lt;WebCore::ScrollingStateFrameScrollingNode&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::ScrollingStateFrameScrollingNode&gt;&gt;, void&gt;::decode&lt;IPC::Decoder, WebCore::ScrollingStateFrameScrollingNode&gt;(IPC::Decoder&amp;) + 172 (ArgumentCoders.h:294)
14  WebKit                        	       0x12c4bd240 std::__1::optional&lt;WTF::RefPtr&lt;WebCore::ScrollingStateFrameScrollingNode, WTF::RawPtrTraits&lt;WebCore::ScrollingStateFrameScrollingNode&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::ScrollingStateFrameScrollingNode&gt;&gt;&gt; IPC::Decoder::decode&lt;WTF::RefPtr&lt;WebCore::ScrollingStateFrameScrollingNode, WTF::RawPtrTraits&lt;WebCore::ScrollingStateFrameScrollingNode&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::ScrollingStateFrameScrollingNode&gt;&gt;&gt;() + 60 (Decoder.h:137)
15  WebKit                        	       0x12c4bd14c IPC::ArgumentCoder&lt;WebCore::ScrollingStateTree, void&gt;::decode(IPC::Decoder&amp;) + 64 (GeneratedSerializers.mm:41721)
16  WebKit                        	       0x12c79e808 std::__1::optional&lt;WebCore::ScrollingStateTree&gt; IPC::Decoder::decode&lt;WebCore::ScrollingStateTree&gt;() + 60 (Decoder.h:137)
17  WebKit                        	       0x12c79e6b4 std::__1::optional&lt;std::__1::unique_ptr&lt;WebCore::ScrollingStateTree, std::__1::default_delete&lt;WebCore::ScrollingStateTree&gt;&gt;&gt; IPC::ArgumentCoder&lt;std::__1::unique_ptr&lt;WebCore::ScrollingStateTree, std::__1::default_delete&lt;WebCore::ScrollingStateTree&gt;&gt;, void&gt;::decode&lt;IPC::Decoder&gt;(IPC::Decoder&amp;) + 128 (ArgumentCoders.h:336)
18  WebKit                        	       0x12c4bce18 std::__1::optional&lt;std::__1::unique_ptr&lt;WebCore::ScrollingStateTree, std::__1::default_delete&lt;WebCore::ScrollingStateTree&gt;&gt;&gt; IPC::Decoder::decode&lt;std::__1::unique_ptr&lt;WebCore::ScrollingStateTree, std::__1::default_delete&lt;WebCore::ScrollingStateTree&gt;&gt;&gt;() + 60 (Decoder.h:137)
19  WebKit                        	       0x12c4bccec IPC::ArgumentCoder&lt;WebKit::RemoteScrollingCoordinatorTransaction, void&gt;::decode(IPC::Decoder&amp;) + 40 (GeneratedSerializers.mm:41694)
20  WebKit                        	       0x12cc2dd34 std::__1::optional&lt;WebKit::RemoteScrollingCoordinatorTransaction&gt; IPC::Decoder::decode&lt;WebKit::RemoteScrollingCoordinatorTransaction&gt;() + 60 (Decoder.h:137)

```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1988014</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-10-27 08:32:23 -0700</bug_when>
    <thetext>```
CheckedPtr&lt;ScrollingStateTree&gt; m_scrollingStateTree; // Only null between deserialization and attachAfterDeserialization.
```

We crash during destruction because m_scrollingStateTree is null.

The crash does occur during IPC deserialization so it seems it is expected for `m_scrollingStateTree` to be null.

Seems like there may be 2 bugs:
1. IPC deserialization fails
2. The ScrollingStateScrollingNode doesn&apos;t support getting destroyed during IPC deserialization and crashes</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1988015</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-10-27 08:40:45 -0700</bug_when>
    <thetext>For me, it looks like it fails IPC decoding for ScrollingStateNodeProperty::SnapOffsetsInfo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1988016</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-10-27 08:46:07 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #2)
&gt; For me, it looks like it fails IPC decoding for
&gt; ScrollingStateNodeProperty::SnapOffsetsInfo

In particular, horizontalSnapOffsets inside FloatScrollSnapOffsetsInfo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1988017</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-10-27 08:50:07 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #3)
&gt; (In reply to Chris Dumez from comment #2)
&gt; &gt; For me, it looks like it fails IPC decoding for
&gt; &gt; ScrollingStateNodeProperty::SnapOffsetsInfo
&gt; 
&gt; In particular, horizontalSnapOffsets inside FloatScrollSnapOffsetsInfo.

In particular, the snapTargetID of FloatSnapOffset fails decoding.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1988632</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-10-30 13:29:01 -0700</bug_when>
    <thetext>Also frequently crashes on macOS Sonoma bots, but not on older OS versions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1988634</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-10-30 13:29:33 -0700</bug_when>
    <thetext>&lt;rdar://problem/117702748&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990873</commentid>
    <comment_count>7</comment_count>
    <who name="Ben Schwartz">ben_schwartz</who>
    <bug_when>2023-11-08 09:33:51 -0800</bug_when>
    <thetext>I have related this bug to bug #264419, which is an umbrella bug tracking layout test regressions in macOS Sonoma 14.1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>