<?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>258502</bug_id>
          
          <creation_ts>2023-06-25 14:50:29 -0700</creation_ts>
          <short_desc>REGRESSION (264242@main): http/tests/workers/service/postmessage-after-terminating-hung-worker.html is frequently hitting ASSERTION FAILED: state == ServiceWorkerState::Activating</short_desc>
          <delta_ts>2023-06-27 09:58:40 -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>WebCore Misc.</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=258021</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=256893</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="Fujii Hironori">fujii</reporter>
          <assigned_to name="youenn fablet">youennf</assigned_to>
          <cc>cdumez</cc>
    
    <cc>nham</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1963523</commentid>
    <comment_count>0</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-06-25 14:50:29 -0700</bug_when>
    <thetext>http/tests/workers/service/postmessage-after-terminating-hung-worker.html is randomly crashing recently

https://results.webkit.org/?suite=layout-tests&amp;test=http%2Ftests%2Fworkers%2Fservice%2Fpostmessage-after-terminating-hung-worker.html

This seems to be the first crash test run.

Buildbot: builder Apple-iOS-16-Simulator-Debug-WK2-Tests build 1207 (264242@main)
https://build.webkit.org/#/builders/663/builds/1207

No crash log found for com.apple.WebKit.Networking.Development:47779.

stdout:

stderr:
ASSERTION FAILED: state == ServiceWorkerState::Activating
/Volumes/Data/worker/Apple-iOS-16-Simulator-Debug-Build/build/Source/WebCore/workers/service/server/SWServerWorker.cpp(216) : void WebCore::SWServerWorker::didFinishActivation()
1   0x10e9e9df8 WTFCrash
2   0x14a647260 WebCore::AudioWorkletProcessor::buildJSArguments(JSC::VM&amp;, JSC::JSGlobalObject&amp;, JSC::MarkedVector&lt;JSC::JSValue, 8ul, WTF::RecordOverflow&gt;&amp;, WTF::Vector&lt;WTF::RefPtr&lt;WebCore::AudioBus, WTF::RawPtrTraits&lt;WebCore::AudioBus&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::AudioBus&gt;&gt;, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt; const&amp;, WTF::Vector&lt;WTF::Ref&lt;WebCore::AudioBus, WTF::RawPtrTraits&lt;WebCore::AudioBus&gt;&gt;, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;, WTF::HashMap&lt;WTF::String, std::__1::unique_ptr&lt;WebCore::AudioArray&lt;float&gt;, std::__1::default_delete&lt;WebCore::AudioArray&lt;float&gt;&gt;&gt;, WTF::DefaultHash&lt;WTF::String&gt;, WTF::HashTraits&lt;WTF::String&gt;, WTF::HashTraits&lt;std::__1::unique_ptr&lt;WebCore::AudioArray&lt;float&gt;, std::__1::default_delete&lt;WebCore::AudioArray&lt;float&gt;&gt;&gt;&gt;, WTF::MemoryCompactLookupOnlyRobinHoodHashTableTraits&gt; const&amp;)
3   0x14d4af31c WebCore::SWServerWorker::didFinishActivation()
4   0x14d4af210 WebCore::SWServerToContextConnection::didFinishActivation(WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;)
5   0x135b100ac auto void IPC::callMemberFunction&lt;WebKit::WebSWServerToContextConnection, WebCore::SWServerToContextConnection, void (WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;), std::__1::tuple&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;&gt;(WebKit::WebSWServerToContextConnection*, void (WebCore::SWServerToContextConnection::*)(WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;), std::__1::tuple&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;&amp;&amp;)::&apos;lambda&apos;(auto&amp;&amp;...)::operator()&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;(auto&amp;&amp;...) const
6   0x135b10014 decltype(std::declval&lt;WebKit::WebSWServerToContextConnection&gt;()(std::declval&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;())) std::__1::__invoke[abi:v15006]&lt;void IPC::callMemberFunction&lt;WebKit::WebSWServerToContextConnection, WebCore::SWServerToContextConnection, void (WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;), std::__1::tuple&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;&gt;(WebKit::WebSWServerToContextConnection*, void (WebCore::SWServerToContextConnection::*)(WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;), std::__1::tuple&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;&amp;&amp;)::&apos;lambda&apos;(auto&amp;&amp;...), WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;(WebKit::WebSWServerToContextConnection&amp;&amp;, WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&amp;&amp;)
7   0x135b0ffe8 decltype(auto) std::__1::__apply_tuple_impl[abi:v15006]&lt;void IPC::callMemberFunction&lt;WebKit::WebSWServerToContextConnection, WebCore::SWServerToContextConnection, void (WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;), std::__1::tuple&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;&gt;(WebKit::WebSWServerToContextConnection*, void (WebCore::SWServerToContextConnection::*)(WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;), std::__1::tuple&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;&amp;&amp;)::&apos;lambda&apos;(auto&amp;&amp;...), std::__1::tuple&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;, 0ul&gt;(WebKit::WebSWServerToContextConnection&amp;&amp;, WebCore::SWServerToContextConnection&amp;&amp;, std::__1::__tuple_indices&lt;0ul&gt;)
8   0x135b0ffac decltype(auto) std::__1::apply[abi:v15006]&lt;void IPC::callMemberFunction&lt;WebKit::WebSWServerToContextConnection, WebCore::SWServerToContextConnection, void (WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;), std::__1::tuple&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;&gt;(WebKit::WebSWServerToContextConnection*, void (WebCore::SWServerToContextConnection::*)(WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;), std::__1::tuple&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;&amp;&amp;)::&apos;lambda&apos;(auto&amp;&amp;...), std::__1::tuple&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;&gt;(WebKit::WebSWServerToContextConnection&amp;&amp;, WebCore::SWServerToContextConnection&amp;&amp;)
9   0x135b0fe2c void IPC::callMemberFunction&lt;WebKit::WebSWServerToContextConnection, WebCore::SWServerToContextConnection, void (WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;), std::__1::tuple&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;&gt;(WebKit::WebSWServerToContextConnection*, void (WebCore::SWServerToContextConnection::*)(WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;), std::__1::tuple&lt;WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;&gt;&amp;&amp;)
10  0x135b0a834 void IPC::handleMessage&lt;Messages::WebSWServerToContextConnection::DidFinishActivation, WebKit::WebSWServerToContextConnection, WebCore::SWServerToContextConnection, void (WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;)&gt;(IPC::Connection&amp;, IPC::Decoder&amp;, WebKit::WebSWServerToContextConnection*, void (WebCore::SWServerToContextConnection::*)(WTF::ObjectIdentifierGeneric&lt;WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits&gt;))
11  0x135b09f9c WebKit::WebSWServerToContextConnection::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;)
12  0x133e28944 WebKit::NetworkConnectionToWebProcess::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;)
13  0x135c0a57c IPC::Connection::dispatchMessage(IPC::Decoder&amp;)
14  0x135c0a9ac IPC::Connection::dispatchMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt;&gt;)
15  0x135c0ace4 IPC::Connection::dispatchOneIncomingMessage()
16  0x135c2722c IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt;&gt;)::$_17::operator()() const
17  0x135c27188 WTF::Detail::CallableWrapper&lt;IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt;&gt;)::$_17, void&gt;::call()
18  0x1106eadec WTF::Function&lt;void ()&gt;::operator()() const
19  0x10eaa41b4 WTF::RunLoop::performWork()
20  0x10eaa87bc WTF::RunLoop::performWork(void*)
21  0x105e15c6c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
22  0x105e15bb4 __CFRunLoopDoSource0
23  0x105e15324 __CFRunLoopDoSources0
24  0x105e0f958 __CFRunLoopRun
25  0x105e0f254 CFRunLoopRunSpecific
26  0x10807b4bc -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
27  0x10807b690 -[NSRunLoop(NSRunLoop) run]
28  0x106f0f080 _xpc_objc_main
29  0x106f1119c xpc_main
30  0x133c8a930 WebKit::XPCServiceMain(int, char const**)
31  0x135bdf274 WKXPCServiceMain
com.apple.WebKit.Networking.Development terminated (pid 47779) for reason: crash</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963527</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-06-25 15:55:30 -0700</bug_when>
    <thetext>The assertion failure is flaky, but very frequent, about half of the time.

Looking at commit history, this almost certainly started with 264242@main, there were no related changes before it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963528</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-06-25 15:55:41 -0700</bug_when>
    <thetext>&lt;rdar://problem/111299016&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963752</commentid>
    <comment_count>3</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2023-06-27 00:50:32 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/15321</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963838</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-06-27 09:58:38 -0700</bug_when>
    <thetext>Committed 265553@main (42b406d0e2bc): &lt;https://commits.webkit.org/265553@main&gt;

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

    </bug>

</bugzilla>