Bug 248688

Summary: REGRESSION (257229@main): ASSERTION FAILED: !encoder->isAllowedWhenWaitingForSyncReply() && !encoder->isAllowedWhenWaitingForUnboundedSyncReply()
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: gavin.p, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=247673

Description Ryan Haddad 2022-12-02 14:38:49 PST
The following API test is consistently asserting after https://commits.webkit.org/257229@main

    TestWebKitAPI.IPCTestingAPI.CanSendInvalidAsyncMessageToGPUProcessWithoutTermination
        ERROR: Error while launching com.apple.WebKit.Networking: Connection invalid
        /Volumes/Data/worker/Apple-Monterey-Debug-Build/build/Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm(212) : auto WebKit::ProcessLauncher::launchProcess()::(anonymous class)::operator()(xpc_object_t) const
        ASSERTION FAILED: !encoder->isAllowedWhenWaitingForSyncReply() && !encoder->isAllowedWhenWaitingForUnboundedSyncReply()
        /Volumes/Data/worker/Apple-Monterey-Debug-Build/build/Source/WebKit/Platform/IPC/Connection.cpp(553) : bool IPC::Connection::sendMessage(UniqueRef<IPC::Encoder> &&, OptionSet<IPC::SendOption>, std::optional<Thread::QOS>)
        1   0x41f3e0169 WTFCrash
        2   0x40a3a29ab WTFCrashWithInfo(int, char const*, char const*, int)
        3   0x40d102506 IPC::Connection::sendMessage(WTF::UniqueRef<IPC::Encoder>&&, WTF::OptionSet<IPC::SendOption>, std::__1::optional<WTF::Thread::QOS>)
        4   0x40c926fd4 WebKit::IPCTestingAPI::sendMessageWithJSArguments(IPC::Connection&, OpaqueJSContext const*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**)
        5   0x40c92f191 WebKit::IPCTestingAPI::JSIPC::sendMessage(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**)
        6   0x41fceadc4 long long JSC::APICallbackFunction::callImpl<JSC::JSCallbackFunction>(JSC::JSGlobalObject*, JSC::CallFrame*)
        7   0x41fcdfcad JSC::callJSCallbackFunction(JSC::JSGlobalObject*, JSC::CallFrame*)
        8   0x4dadf5e04027 (null)
        9   0x41fb9eb58 llint_entry
        10  0x41fb9eb58 llint_entry
        11  0x41fb9eb58 llint_entry
        12  0x41fb9eb58 llint_entry
        13  0x41fb7a3dd vmEntryToJavaScript
        14  0x4207a1432 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
        15  0x420c1aa7a JSC::Interpreter::executeProgram(JSC::SourceCode const&, JSC::JSGlobalObject*, JSC::JSObject*)
        16  0x421070e05 JSC::evaluate(JSC::JSGlobalObject*, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&)
        17  0x421070f4c JSC::profiledEvaluate(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&)
        18  0x3e6593eb8 WebCore::JSExecState::profiledEvaluate(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&)
        19  0x3e659392e WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld&)
        20  0x3e65936e9 WebCore::ScriptController::evaluateInWorldIgnoringException(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld&)
        21  0x3e6594135 WebCore::ScriptController::evaluateIgnoringException(WebCore::ScriptSourceCode const&)
        22  0x3e6fa532d WebCore::ScriptElement::executeClassicScript(WebCore::ScriptSourceCode const&)
        23  0x3e6fa30e7 WebCore::ScriptElement::prepareScript(WTF::TextPosition const&, WebCore::ScriptElement::LegacyTypeSupport)
        24  0x3e75ea2ce WebCore::HTMLScriptRunner::runScript(WebCore::ScriptElement&, WTF::TextPosition const&)
        25  0x3e75ea0d4 WebCore::HTMLScriptRunner::execute(WTF::Ref<WebCore::ScriptElement, WTF::RawPtrTraits<WebCore::ScriptElement> >&&, WTF::TextPosition const&)
        26  0x3e75c3a14 WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder()
        27  0x3e75c3ec1 WebCore::HTMLDocumentParser::pumpTokenizerLoop(WebCore::HTMLDocumentParser::SynchronousMode, bool, WebCore::PumpSession&)
        28  0x3e75c3218 WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode)
        29  0x3e75c29e0 WebCore::HTMLDocumentParser::pumpTokenizerIfPossible(WebCore::HTMLDocumentParser::SynchronousMode)
        30  0x3e75c4a4c WebCore::HTMLDocumentParser::append(WTF::RefPtr<WTF::StringImpl, WTF::RawPtrTraits<WTF::StringImpl>, WTF::DefaultRefDerefTraits<WTF::StringImpl> >&&, WebCore::HTMLDocumentParser::SynchronousMode)
        31  0x3e75c482f WebCore::HTMLDocumentParser::append(WTF::RefPtr<WTF::StringImpl, WTF::RawPtrTraits<WTF::StringImpl>, WTF::DefaultRefDerefTraits<WTF::StringImpl> >&&)


https://results.webkit.org/?suite=api-tests&test=TestWebKitAPI.IPCTestingAPI.CanSendInvalidAsyncMessageToGPUProcessWithoutTermination
Comment 1 Radar WebKit Bug Importer 2022-12-02 14:39:01 PST
<rdar://problem/102918462>
Comment 2 Ryan Haddad 2022-12-02 14:42:29 PST
The assert was added by the commit in question.
Comment 3 Ryan Haddad 2022-12-02 15:35:16 PST
Reverted the cause in https://commits.webkit.org/257309@main