<?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>314243</bug_id>
          
          <creation_ts>2026-05-06 15:14:58 -0700</creation_ts>
          <short_desc>RELEASE ASSERT: http/tests/security/contentSecurityPolicy/multipart-three-part.py is a flaky crash</short_desc>
          <delta_ts>2026-05-12 18:53:15 -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>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Brent Fulgham">bfulgham</reporter>
          <assigned_to name="Chris Dumez">cdumez</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2208300</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2026-05-06 15:14:58 -0700</bug_when>
    <thetext>This issue can be reproduced using command:
run-webkit-tests --no-build --no-retry --no-show-results --exit-after-n-failures=1 --expect-pass --iterations=1000 --force -f --clobber-old-results --release http/tests/security/contentSecurityPolicy/multipart-three-part.py

&lt;rdar://169360779&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2208302</commentid>
    <comment_count>1</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2026-05-06 15:18:07 -0700</bug_when>
    <thetext>This crash has nothing to do with CSP — it is happening because the multi-part load happens in rapid succession, causing the first completion handler to be dropped when the second arrives. This triggers NSURLSession to fire a release assert that crashes the network process.

  if (willWaitForContinueDidReceiveResponse) {                                                                                                      
      m_responseCompletionHandler = WTF::move(completionHandler);                                                                                   
      return;                                                                                                                                       
  }                                                                                                                                                 

The most conservative (from a loading standpoint) fix is to process the completion handler. I think that PolicyAction::Use is the correct argument (rather than PolicyAction::Ignore) because by the time we get a follow-up response, we have decided to proceed with the load and will need to accept the first (and all subsequent) loads to complete the process.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2208306</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2026-05-06 15:22:54 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/64404</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2209537</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2026-05-10 17:39:49 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/64646</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2210352</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-05-12 18:53:13 -0700</bug_when>
    <thetext>Committed 313118@main (071edf4eff8a): &lt;https://commits.webkit.org/313118@main&gt;

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

    </bug>

</bugzilla>