<?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>307303</bug_id>
          
          <creation_ts>2026-02-08 17:50:13 -0800</creation_ts>
          <short_desc>AX: Deadlock involving s_storeLock when ENABLE_ACCESSIBILITY_LOCAL_FRAME is enabled</short_desc>
          <delta_ts>2026-02-08 19:43:38 -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>Accessibility</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Dominic Mazzoni">dm_mazzoni</reporter>
          <assigned_to name="Dominic Mazzoni">dm_mazzoni</assigned_to>
          <cc>andresg_22</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2179290</commentid>
    <comment_count>0</comment_count>
    <who name="Dominic Mazzoni">dm_mazzoni</who>
    <bug_when>2026-02-08 17:50:13 -0800</bug_when>
    <thetext>WebProcess::accessibilityFocusedUIElement iterates over isolated trees to see which one is focused, and it uses findAXTree, which acquires s_storeLock.

When ENABLE_ACCESSIBILITY_LOCAL_FRAME is enabled, it also calls typedTree-&gt;focusedNode() on each tree because it needs to check whether that frame is the specific frame within a page that&apos;s focused - the flags like ActivityState::IsFocused only tell us about the page, not the frame.

This results in a call to AXIsolatedTree::focusedNodeID(), which calls AXIsolatedTree::applyPendingChanges.

This is call fine so far, but if the tree happens to be queued for destruction, then it calls AXTreeStore::remove(), which also needs s_storeLock, leading to deadlock.

This manifests when running accessibility layout tests in parallel with ENABLE_ACCESSIBILITY_LOCAL_FRAME enabled - even if the tests don&apos;t involve iframes, sooner or later the deadlock occurs and causes tests to timeout.

The simplest fix is to just call the existing applyPendingChangesUnlessQueuedForDestruction method. We should also consider if there&apos;s a safer time to trigger AXTreeStore::remove().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2179292</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-02-08 17:50:19 -0800</bug_when>
    <thetext>&lt;rdar://problem/169934927&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2179301</commentid>
    <comment_count>2</comment_count>
    <who name="Dominic Mazzoni">dm_mazzoni</who>
    <bug_when>2026-02-08 18:17:42 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/58168</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2179308</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-02-08 19:43:36 -0800</bug_when>
    <thetext>Committed 307050@main (653381a67bbf): &lt;https://commits.webkit.org/307050@main&gt;

Reviewed commits have been landed. Closing PR #58168 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>