Bug 305566

Summary: ASSERTION FAILED: m_wrapper in JSEventListener::ensureJSFunction in HTMLScriptElement::dispatchLoadEvent
Product: WebKit Reporter: Simon Pena <spena>
Component: WPE WebKitAssignee: Fujii Hironori <fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, fujii
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=305570
Attachments:
Description Flags
debug patch to increase the reproduction rate
none
Patch ews-feeder: commit-queue-

Simon Pena
Reported 2026-01-15 08:38:54 PST
When built with assertions enabled, MiniBrowser, for both GTK and WPE, crashes navigating to The Verge ERROR: Failed to make thread real time: GDBus.Error:org.freedesktop.DBus.Error.Failed: No such file or directory ../../../Source/WTF/wtf/linux/RealTimeThreads.cpp(224) : void WTF::RealTimeThreads::realTimeKitMakeThreadRealTime(uint64_t, uint64_t, uint32_t) ERROR: Failed to make thread real time: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code1: Could not map pid: Process ids could not be found: 84564 ../../../Source/WTF/wtf/linux/RealTimeThreads.cpp(224) : void WTF::RealTimeThreads::realTimeKitMakeThreadRealTime(uint64_t, uint64_t, uint32_t) ASSERTION FAILED: m_wrapper ../../../Source/WebCore/bindings/js/JSEventListener.h(168) : JSC::JSObject* WebCore::JSEventListener::ensureJSFunction(WebCore::ScriptExecutionContext&) const 1 0x71f79e5f508a WebCore::JSEventListener::ensureJSFunction(WebCore::ScriptExecutionContext&) const 2 0x71f79e600d1e WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext&, WebCore::Event&) 3 0x71f79ec46bb8 WebCore::EventTarget::innerInvokeEventListeners(WebCore::Event&, WTF::Vector<WTF::Ref<WebCore::RegisteredEventListener, WTF::RawPtrTraits<WebCore::RegisteredEventListener>, WTF::DefaultRefDerefTraits<WebCore::RegisteredEventListener> >, 1ul, WTF::CrashOnOverflow, 2ul, WTF::FastMalloc>, WebCore::EventTarget::EventInvokePhase) 4 0x71f79ec47598 WebCore::EventTarget::fireEventListeners(WebCore::Event&, WebCore::EventTarget::EventInvokePhase) 5 0x71f79ec4796e WebCore::EventContext::handleLocalEvents(WebCore::Event&, WebCore::EventTarget::EventInvokePhase) const 6 0x71f79ec47dff WebCore::dispatchEventInDOM(WebCore::Event&, WebCore::EventPath const&) 7 0x71f79ec557a5 WebCore::EventDispatcher::dispatchEvent(WebCore::Node&, WebCore::Event&) 8 0x71f79f0c1674 WebCore::HTMLScriptElement::dispatchLoadEvent() 9 0x71f79ecfdbcd WebCore::ScriptElement::dispatchLoadEventRespectingUserGestureIndicator() 10 0x71f79ed15271 WebCore::ScriptElement::executeScriptAndDispatchEvent(WebCore::LoadableScript&) 11 0x71f79ed1579f WebCore::ScriptElement::executePendingScript(WebCore::PendingScript&) 12 0x71f79ed1b035 WebCore::ScriptRunner::timerFired() 13 0x71f79f9fa5f0 WebCore::ThreadTimers::sharedTimerFiredInternal() 14 0x71f79c432d1e WTF::RunLoop::TimerBase::TimerBase(WTF::Ref<WTF::RunLoop, WTF::RawPtrTraits<WTF::RunLoop>, WTF::DefaultRefDerefTraits<WTF::RunLoop> >&&, WTF::ASCIILiteral)::{lambda(void*)#1}::_FUN(void*) 15 0x71f79c437b7a WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::_FUN(_GSource*, int (*)(void*), void*) 16 0x71f79330e49e ??? 17 0x71f79330e710 g_main_context_dispatch 18 0x71f79c434694 WTF::RunLoop::runGLibMainLoopIteration(WTF::RunLoop::MayBlock) 19 0x71f79c434ca2 WTF::RunLoop::run() 20 0x71f79a0115a6 int WebKit::AuxiliaryProcessMain<WebKit::WebProcessMainWPE>(int, char**) 21 0x71f7942181ca __libc_start_call_main 22 0x71f79421828b __libc_start_main 23 0x5c3b47c1d725 _start
Attachments
debug patch to increase the reproduction rate (830 bytes, patch)
2026-02-24 00:56 PST, Fujii Hironori
no flags
Patch (2.10 KB, patch)
2026-02-24 04:12 PST, Fujii Hironori
ews-feeder: commit-queue-
Simon Pena
Comment 1 2026-01-21 02:06:13 PST
BBC can occasionally assert with the same trace
Adrian Perez
Comment 2 2026-01-28 02:12:27 PST
*** Bug 305570 has been marked as a duplicate of this bug. ***
Fujii Hironori
Comment 3 2026-02-24 00:56:35 PST
Created attachment 478456 [details] debug patch to increase the reproduction rate
Fujii Hironori
Comment 4 2026-02-24 04:12:10 PST
Fujii Hironori
Comment 5 2026-02-24 04:14:44 PST
*** Bug 254793 has been marked as a duplicate of this bug. ***
Fujii Hironori
Comment 6 2026-02-24 05:24:13 PST
https://ews-build.s3-us-west-2.amazonaws.com/macOS-Tahoe-Debug-WK2-Tests-EWS/478459-15960/http/tests/dom/script-load-event-gc-crash-log.txt ASSERTION FAILED: m_wrapper /Volumes/Data/worker/macOS-Tahoe-Debug-Build-EWS/build/Source/WebCore/bindings/js/JSEventListener.h(168) : JSC::JSObject *WebCore::JSEventListener::ensureJSFunction(ScriptExecutionContext &) const 1 0x304a50060 WebCore::JSEventListener::ensureJSFunction(WebCore::ScriptExecutionContext&) const 2 0x304a4f53c WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext&, WebCore::Event&) 3 0x305a3f980 WebCore::EventTarget::innerInvokeEventListeners(WebCore::Event&, WTF::Vector<WTF::Ref<WebCore::RegisteredEventListener, WTF::RawPtrTraits<WebCore::RegisteredEventListener>, WTF::DefaultRefDerefTraits<WebCore::RegisteredEventListener>>, 1ul, WTF::CrashOnOverflow, 2ul, WTF::FastMalloc>, WebCore::EventTarget::EventInvokePhase) 4 0x305a3f344 WebCore::EventTarget::fireEventListeners(WebCore::Event&, WebCore::EventTarget::EventInvokePhase) 5 0x305a15b08 WebCore::EventContext::handleLocalEvents(WebCore::Event&, WebCore::EventTarget::EventInvokePhase) const 6 0x305a17168 WebCore::dispatchEventInDOM(WebCore::Event&, WebCore::EventPath const&) 7 0x305a1667c WebCore::EventDispatcher::dispatchEvent(WebCore::Node&, WebCore::Event&) 8 0x305adcdd4 WebCore::Node::dispatchEvent(WebCore::Event&) 9 0x306033bd4 WebCore::HTMLScriptElement::dispatchLoadEvent() 10 0x305b4af44 WebCore::ScriptElement::dispatchLoadEventRespectingUserGestureIndicator() 11 0x305b4b2bc WebCore::ScriptElement::executeScriptAndDispatchEvent(WebCore::LoadableScript&) 12 0x305b4b580 WebCore::ScriptElement::executePendingScript(WebCore::PendingScript&) 13 0x305b54284 WebCore::ScriptRunner::timerFired() 14 0x305b80610 WebCore::Timer::Timer<WebCore::ScriptRunner, WebCore::ScriptRunner>(WebCore::ScriptRunner&, void (WebCore::ScriptRunner::*)())::'lambda'()::operator()() const 15 0x305b803c4 WTF::Detail::CallableWrapper<WebCore::Timer::Timer<WebCore::ScriptRunner, WebCore::ScriptRunner>(WebCore::ScriptRunner&, void (WebCore::ScriptRunner::*)())::'lambda'(), void>::call() 16 0x300037434 WTF::Function<void ()>::operator()() const 17 0x300188614 WebCore::Timer::fired() 18 0x30701b604 WebCore::ThreadTimers::sharedTimerFiredInternal() 19 0x30702592c WebCore::ThreadTimers::setSharedTimer(WebCore::SharedTimer*)::$_0::operator()() const 20 0x3070258d8 WTF::Detail::CallableWrapper<WebCore::ThreadTimers::setSharedTimer(WebCore::SharedTimer*)::$_0, void>::call() 21 0x300037434 WTF::Function<void ()>::operator()() const 22 0x306faeedc WebCore::MainThreadSharedTimer::fired() 23 0x307130df0 WebCore::timerFired(__CFRunLoopTimer*, void*) 24 0x19c68318c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ 25 0x19c682e4c __CFRunLoopDoTimer 26 0x19c6829c4 __CFRunLoopDoTimers 27 0x19c67376c __CFRunLoopRun 28 0x19c72de34 _CFRunLoopRunSpecificWithOptions 29 0x19e8c2964 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] 30 0x19dec1a50 -[NSRunLoop(NSRunLoop) run] 31 0x19c2c0e14 _xpc_objc_main com.apple.WebKit.WebContent.Development terminated (pid 4743) for reason: crash
Fujii Hironori
Comment 7 2026-02-24 17:34:33 PST
EWS
Comment 8 2026-03-03 03:19:47 PST
Committed 308535@main (afe50b886de1): <https://commits.webkit.org/308535@main> Reviewed commits have been landed. Closing PR #59383 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.