<?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>298025</bug_id>
          
          <creation_ts>2025-08-28 04:50:43 -0700</creation_ts>
          <short_desc>[GTK][WPE] Web process sometimes gets locked on exit</short_desc>
          <delta_ts>2025-08-29 02:52:18 -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>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=260856</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Carlos Garcia Campos">cgarcia</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2139323</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2025-08-28 04:50:43 -0700</bug_when>
    <thetext>It happens when the network connection is closed before WebPage::close is called. In that case WebPage::close() tries to get a network process connection to send ClearPageSpecificData message, but WebProcess::ensureNetworkProcessConnection() fails causing a process exit. In the exit handlers PlatformDisplay::invalidateSkiaGLContexts() is called, which tries to invalidate the GL contexts of the painting threads that are still running. We use RunLoop::dispatch() and a semaphore to wait to clear context from painting threads, but that doesn&apos;t work because painting threads don&apos;t run a loop. We should avoid the early exit first by not calling WebProcess::ensureNetworkProcessConnection() from WebPage::close(), but we should also stop trying to invalidate the skia gl contexts from the main thread. LayerTreeHost is the owner of the WorkerPool that runs the painting tasks, so the gl contexts will be released when the threads finish on LayerTreeHost destructor. We only need to care about the main thread gl context for which we can just set to nullptr.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2139325</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2025-08-28 04:53:18 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/50002</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2139618</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-08-29 02:52:14 -0700</bug_when>
    <thetext>Committed 299312@main (5a0e48592bf4): &lt;https://commits.webkit.org/299312@main&gt;

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

    </bug>

</bugzilla>