RESOLVED FIXED276266
[WebDriver] MessageReceiverMap assertion failure for WebAutomationSessionProxy messages in debug builds
https://bugs.webkit.org/show_bug.cgi?id=276266
Summary [WebDriver] MessageReceiverMap assertion failure for WebAutomationSessionProx...
Lauro Moura
Reported 2024-07-05 13:51:19 PDT
WPE WebDriver debug builds are hitting an assertion in the WPEWebProcess when processing messages: ASSERTION FAILED: !decoder.destinationID() <snip WTF headers> #2 0x0000750e2a6fafbe in IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) (this=0x750e0d038138, connection=..., decoder=...) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WebKit/Platform/IPC/MessageReceiverMap.cpp:122 #3 0x0000750e2ae01f1c in WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) (this=0x750e0d038100, connection=..., decoder=...) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WebKit/WebProcess/WebProcess.cpp:967 <snip> Context of the assertion: bool MessageReceiverMap::dispatchMessage(Connection& connection, Decoder& decoder) { if (auto messageReceiver = m_globalMessageReceivers.get(decoder.messageReceiverName())) { ASSERT(!decoder.destinationID()); This happens at least for both `WebAutomationSessionProxy::EvaluateJavaScriptFunction` and `WebAutomationSessionProxy::TakeScreenshot` messages. Looks like the WebAutomationSessionProxy receiver, while being stored on the globals receiver map, is being sent messages containing a destination ID. Full trace: #0 WTFCrash() () at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WTF/wtf/Assertions.cpp:350 #1 0x0000750e29877a6a in WTFCrashWithInfo(int, char const*, char const*, int) () at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/WebKitBuild/WPE/Debug/WTF/Headers/wtf/Assertions.h:845 #2 0x0000750e2a6fafbe in IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) (this=0x750e0d038138, connection=..., decoder=...) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WebKit/Platform/IPC/MessageReceiverMap.cpp:122 #3 0x0000750e2ae01f1c in WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) (this=0x750e0d038100, connection=..., decoder=...) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WebKit/WebProcess/WebProcess.cpp:967 #4 0x0000750e2a6cee59 in IPC::Connection::dispatchMessage(IPC::Decoder&) (this=0x750e0d064200, decoder=...) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WebKit/Platform/IPC/Connection.cpp:1332 #5 0x0000750e2a6cf0ac in IPC::Connection::dispatchMessage(WTF::UniqueRef<IPC::Decoder>) (this=0x750e0d064200, message=...) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WebKit/Platform/IPC/Connection.cpp:1380 #6 0x0000750e2a6cf599 in IPC::Connection::dispatchOneIncomingMessage() (this=0x750e0d064200) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WebKit/Platform/IPC/Connection.cpp:1445 #7 0x0000750e2a6cea86 in operator()() const (__closure=0x750e0d0681e8) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WebKit/Platform/IPC/Connection.cpp:1294 #8 0x0000750e2a6f8282 in WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(WTF::UniqueRef<IPC::Decoder>)::<lambda()>, void>::call(void) (this=0x750e0d0681e0) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/WebKitBuild/WPE/Debug/WTF/Headers/wtf/Function.h:53 #9 0x0000750e2a1ff1f4 in WTF::Function<void ()>::operator()() const (this=0x7ffc400ad670) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/WebKitBuild/WPE/Debug/WTF/Headers/wtf/Function.h:82 #10 0x0000750e2d91cbe9 in WTF::RunLoop::performWork() (this=0x750e0d01c0c0) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WTF/wtf/RunLoop.cpp:147 #11 0x0000750e2d9e17f8 in operator()(gpointer) const (__closure=0x0, userData=0x750e0d01c0c0) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WTF/wtf/glib/RunLoopGLib.cpp:80 #12 0x0000750e2d9e1820 in _FUN(gpointer) () at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WTF/wtf/glib/RunLoopGLib.cpp:82 #13 0x0000750e2d9e1727 in operator()(GSource*, GSourceFunc, gpointer) const (__closure=0x0, source=0x642cf09471a0, callback=0x750e2d9e17ff <_FUN(gpointer)>, userData=0x750e0d01c0c0) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WTF/wtf/glib/RunLoopGLib.cpp:53 #14 0x0000750e2d9e1779 in _FUN(GSource*, GSourceFunc, gpointer) () at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WTF/wtf/glib/RunLoopGLib.cpp:56 #15 0x0000750e1e5143df in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #16 0x0000750e1e56f2f8 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #17 0x0000750e1e513c4f in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #18 0x0000750e2d9e1e9d in WTF::RunLoop::run() () at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WTF/wtf/glib/RunLoopGLib.cpp:108 #19 0x0000750e2b2afbc9 in WebKit::AuxiliaryProcessMainBase<WebKit::WebProcess, true>::run(int, char**) (this=0x7ffc400ad920, argc=3, argv=0x7ffc400adad8) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WebKit/Shared/AuxiliaryProcessMain.h:72 #20 0x0000750e2b2af7c7 in WebKit::AuxiliaryProcessMain<WebKit::WebProcessMainWPE>(int, char**) (argc=3, argv=0x7ffc400adad8) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WebKit/Shared/AuxiliaryProcessMain.h:98 #21 0x0000750e2b2af584 in WebKit::WebProcessMain(int, char**) (argc=3, argv=0x7ffc400adad8) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp:83 #22 0x0000642cefd230ad in main(int, char**) (argc=3, argv=0x7ffc400adad8) at /home/lauro/wkdev-shared/dev/wk-webdriver/WebKit-WebDriver/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp:31
Attachments
Lauro Moura
Comment 1 2025-01-16 16:08:40 PST
EWS
Comment 2 2025-01-21 14:28:53 PST
Committed 289203@main (22bf12a5c4f8): <https://commits.webkit.org/289203@main> Reviewed commits have been landed. Closing PR #39158 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-01-21 14:29:23 PST
Note You need to log in before you can comment on or make changes to this bug.