Bug 265489

Summary: REGRESSION (269598@main?): [ macOS Debug ] ASSERTION FAILED: m_networkProcessToKeepAliveUntilDataStoreIsCreated == networkProcess.ptr() in TestWebKitAPI.WKWebsiteDataStoreConfiguration.TotalQuotaRatio result of constant crash
Product: WebKit Reporter: Marta Darbinyan <darbinyan>
Component: WebKit Misc.Assignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, sihui_liu, webkit-bot-watchers-bugzilla, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Marta Darbinyan 2023-11-28 16:36:55 PST
REGRESSION (269598@main): [ macOS Debug ] ASSERTION FAILED: m_networkProcessToKeepAliveUntilDataStoreIsCreated == networkProcess.ptr() in TestWebKitAPI.WKWebsiteDataStoreConfiguration.TotalQuotaRatio to result of constant crash

Description:
TestWebKitAPI.WKWebsiteDataStoreConfiguration.TotalQuotaRatio is constant crashing on macOS Debug on ToT since 269598@main.

This issue can be bisected to 269598@main using the command: 
run-api-tests --root --exit-after-n-failures 1 --debug TestWebKitAPI.WKWebsiteDataStoreConfiguration.TotalQuotaRatio

History:
https://results.webkit.org/?style=debug&suite=api-tests&test=TestWebKitAPI.WKWebsiteDataStoreConfiguration.TotalQuotaRatio&version_name=Monterey&version_name=Sonoma&version_name=Ventura

Result:
TestWebKitAPI.WKWebsiteDataStoreConfiguration.TotalQuotaRatio
        ASSERTION FAILED: m_networkProcessToKeepAliveUntilDataStoreIsCreated == networkProcess.ptr()
        /Volumes/Data/worker/Apple-Sonoma-Debug-Build/build/Source/WebKit/UIProcess/WebProcessProxy.cpp(414) : void WebKit::WebProcessProxy::setWebsiteDataStore(WebsiteDataStore &)
        1   0x119f23d80 WTFCrash
        2   0x147e96810 std::__1::span<unsigned char const, 18446744073709551615ul>::span[abi:v160006]<unsigned char const*>(unsigned char const*, unsigned long)
        3   0x149d5e738 WebKit::WebProcessProxy::setWebsiteDataStore(WebKit::WebsiteDataStore&)
        4   0x149d5e468 WebKit::WebProcessPool::tryTakePrewarmedProcess(WebKit::WebsiteDataStore&, WebKit::WebProcessProxy::LockdownMode)
        5   0x149d6120c WebKit::WebProcessPool::processForRegistrableDomain(WebKit::WebsiteDataStore&, WebCore::RegistrableDomain const&, WebKit::WebProcessProxy::LockdownMode, API::PageConfiguration const&)
        6   0x149d69710 WebKit::WebProcessPool::processForNavigationInternal(WebKit::WebPageProxy&, API::Navigation const&, WTF::Ref<WebKit::WebProcessProxy, WTF::RawPtrTraits<WebKit::WebProcessProxy>>&&, WTF::URL const&, WebKit::ProcessSwapRequestedByClient, WebKit::WebProcessProxy::LockdownMode, WebKit::FrameInfoData const&, WTF::Ref<WebKit::WebsiteDataStore, WTF::RawPtrTraits<WebKit::WebsiteDataStore>>&&)::$_45::operator()() const
        7   0x149d68f18 WebKit::WebProcessPool::processForNavigationInternal(WebKit::WebPageProxy&, API::Navigation const&, WTF::Ref<WebKit::WebProcessProxy, WTF::RawPtrTraits<WebKit::WebProcessProxy>>&&, WTF::URL const&, WebKit::ProcessSwapRequestedByClient, WebKit::WebProcessProxy::LockdownMode, WebKit::FrameInfoData const&, WTF::Ref<WebKit::WebsiteDataStore, WTF::RawPtrTraits<WebKit::WebsiteDataStore>>&&)
        8   0x149d67a84 WebKit::WebProcessPool::processForNavigation(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Navigation const&, WTF::Ref<WebKit::WebProcessProxy, WTF::RawPtrTraits<WebKit::WebProcessProxy>>&&, WTF::URL const&, WebKit::ProcessSwapRequestedByClient, WebKit::WebProcessProxy::LockdownMode, WebKit::FrameInfoData const&, WTF::Ref<WebKit::WebsiteDataStore, WTF::RawPtrTraits<WebKit::WebsiteDataStore>>&&, WTF::CompletionHandler<void (WTF::Ref<WebKit::WebProcessProxy, WTF::RawPtrTraits<WebKit::WebProcessProxy>>&&, WebKit::SuspendedPageProxy*, WTF::ASCIILiteral)>&&)
        9   0x149c2a850 WebKit::WebPageProxy::receivedNavigationPolicyDecision(WebKit::WebProcessProxy&, WebKit::WebProcessProxy&, WebCore::PolicyAction, API::Navigation*, WTF::Ref<API::NavigationAction, WTF::RawPtrTraits<API::NavigationAction>>&&, WebKit::ProcessSwapRequestedByClient, WebKit::WebFrameProxy&, WebKit::FrameInfoData const&, WebKit::WasNavigationIntercepted, WTF::Ref<WebKit::WebPageProxy::PolicyDecisionSender, WTF::RawPtrTraits<WebKit::WebPageProxy::PolicyDecisionSender>>&&)
        10  0x149ce5c1c WebKit::WebPageProxy::decidePolicyForNavigationAction(WTF::Ref<WebKit::WebProcessProxy, WTF::RawPtrTraits<WebKit::WebProcessProxy>>&&, WTF::ObjectIdentifierGeneric<WebCore::PageIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits>, WebKit::WebFrameProxy&, WebKit::FrameInfoData&&, unsigned long long, WebKit::NavigationActionData&&, WebKit::FrameInfoData&&, std::__1::optional<WTF::ObjectIdentifierGeneric<WebKit::WebPageProxyIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits>>, WebCore::ResourceRequest const&, WebCore::ResourceRequest&&, IPC::FormDataReference&&, WTF::Ref<WebKit::WebPageProxy::PolicyDecisionSender, WTF::RawPtrTraits<WebKit::WebPageProxy::PolicyDecisionSender>>&&)::$_56::operator()(WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)::'lambda'(WebCore::PolicyAction)::operator()(WebCore::PolicyAction)
        11  0x149ce5850 WebKit::WebPageProxy::decidePolicyForNavigationAction(WTF::Ref<WebKit::WebProcessProxy, WTF::RawPtrTraits<WebKit::WebProcessProxy>>&&, WTF::ObjectIdentifierGeneric<WebCore::PageIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits>, WebKit::WebFrameProxy&, WebKit::FrameInfoData&&, unsigned long long, WebKit::NavigationActionData&&, WebKit::FrameInfoData&&, std::__1::optional<WTF::ObjectIdentifierGeneric<WebKit::WebPageProxyIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits>>, WebCore::ResourceRequest const&, WebCore::ResourceRequest&&, IPC::FormDataReference&&, WTF::Ref<WebKit::WebPageProxy::PolicyDecisionSender, WTF::RawPtrTraits<WebKit::WebPageProxy::PolicyDecisionSender>>&&)::$_56::operator()(WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)
        12  0x149ce5130 WTF::Detail::CallableWrapper<WebKit::WebPageProxy::decidePolicyForNavigationAction(WTF::Ref<WebKit::WebProcessProxy, WTF::RawPtrTraits<WebKit::WebProcessProxy>>&&, WTF::ObjectIdentifierGeneric<WebCore::PageIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits>, WebKit::WebFrameProxy&, WebKit::FrameInfoData&&, unsigned long long, WebKit::NavigationActionData&&, WebKit::FrameInfoData&&, std::__1::optional<WTF::ObjectIdentifierGeneric<WebKit::WebPageProxyIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits>>, WebCore::ResourceRequest const&, WebCore::ResourceRequest&&, IPC::FormDataReference&&, WTF::Ref<WebKit::WebPageProxy::PolicyDecisionSender, WTF::RawPtrTraits<WebKit::WebPageProxy::PolicyDecisionSender>>&&)::$_56, void, WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted>::call(WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)
        13  0x149b84d78 WTF::Function<void (WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)>::operator()(WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted) const
        14  0x149b7765c WTF::CompletionHandler<void (WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)>::operator()(WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)
        15  0x149b8ae6c WebKit::WebFrameProxy::setUpPolicyListenerProxy(WTF::CompletionHandler<void (WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)>&&, WebKit::ShouldExpectSafeBrowsingResult, WebKit::ShouldExpectAppBoundDomainResult, WebKit::ShouldWaitForInitialLinkDecorationFilteringData)::$_6::operator()(WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)
        16  0x149b8ac58 WTF::Detail::CallableWrapper<WebKit::WebFrameProxy::setUpPolicyListenerProxy(WTF::CompletionHandler<void (WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)>&&, WebKit::ShouldExpectSafeBrowsingResult, WebKit::ShouldExpectAppBoundDomainResult, WebKit::ShouldWaitForInitialLinkDecorationFilteringData)::$_6, void, WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted>::call(WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)
        17  0x149b84d78 WTF::Function<void (WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)>::operator()(WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted) const
        18  0x149b7765c WTF::CompletionHandler<void (WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)>::operator()(WebCore::PolicyAction, API::WebsitePolicies*, WebKit::ProcessSwapRequestedByClient, WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&, std::__1::optional<WebKit::NavigatingToAppBoundDomain>, WebKit::WasNavigationIntercepted)
        19  0x149b76f98 WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults(WTF::RefPtr<WebKit::SafeBrowsingWarning, WTF::RawPtrTraits<WebKit::SafeBrowsingWarning>, WTF::DefaultRefDerefTraits<WebKit::SafeBrowsingWarning>>&&)
        20  0x1496bf888 WebKit::WebPageProxy::beginSafeBrowsingCheck(WTF::URL const&, bool, WebKit::WebFramePolicyListenerProxy&)::$_4::operator()(SSBLookupResult*, NSError*)::'lambda'()::operator()() const
        21  0x1496bf3a8 WTF::Detail::CallableWrapper<WebKit::WebPageProxy::beginSafeBrowsingCheck(WTF::URL const&, bool, WebKit::WebFramePolicyListenerProxy&)::$_4::operator()(SSBLookupResult*, NSError*)::'lambda'(), void>::call()
        22  0x11bcd493c WTF::Function<void ()>::operator()() const
        23  0x119fe2024 WTF::RunLoop::performWork()
        24  0x119fe6670 WTF::RunLoop::performWork(void*)
        25  0x18b089cfc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
        26  0x18b089c90 __CFRunLoopDoSource0
        27  0x18b089a00 __CFRunLoopDoSources0
        28  0x18b0885f0 __CFRunLoopRun
        29  0x18b087c5c CFRunLoopRunSpecific
        30  0x18c190a78 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
        31  0x1051bbaf4 TestWebKitAPI::Util::run(bool*)
Comment 1 Radar WebKit Bug Importer 2023-11-28 16:37:21 PST
<rdar://problem/118904784>
Comment 2 Sihui Liu 2023-11-29 17:34:44 PST
Pull request: https://github.com/WebKit/WebKit/pull/21088
Comment 3 EWS 2023-12-01 09:25:50 PST
Committed 271385@main (b2ed5aecee27): <https://commits.webkit.org/271385@main>

Reviewed commits have been landed. Closing PR #21088 and removing active labels.
Comment 4 Alexey Proskuryakov 2023-12-02 10:35:33 PST
*** Bug 265622 has been marked as a duplicate of this bug. ***