Bug 266715 - [GStreamer] Fix delayed dispatch of async task post MediaPlayer destruction
Summary: [GStreamer] Fix delayed dispatch of async task post MediaPlayer destruction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Enrique Ocaña
URL:
Keywords: InRadar
Depends on: 266899
Blocks:
  Show dependency treegraph
 
Reported: 2023-12-20 10:12 PST by Enrique Ocaña
Modified: 2023-12-28 01:54 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enrique Ocaña 2023-12-20 10:12:29 PST
When the media player is destroyed, there can still be async tasks (from AbortableTaskQueue) ongoing, some of them related to tracks. Those tasks should be aborted, because they depend on objects that are no longer there.

See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/1231
Comment 1 Enrique Ocaña 2023-12-20 10:19:46 PST
Pull request: https://github.com/WebKit/WebKit/pull/22120
Comment 2 EWS 2023-12-21 03:06:58 PST
Committed 272410@main (b1393655168b): <https://commits.webkit.org/272410@main>

Reviewed commits have been landed. Closing PR #22120 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-12-21 03:08:13 PST
<rdar://problem/119983750>
Comment 4 Philippe Normand 2023-12-26 12:09:42 PST
Looks like this triggered apocalypse on debug test bots... many media failures:

ASSERTION FAILED: !g_signal_handler_find(m_pad.get(), G_SIGNAL_MATCH_UNBLOCKED, 0, 0, nullptr, nullptr, nullptr)

Thread 1 (Thread 0x7f50985a6a40 (LWP 64974)):
#0  WTFCrash() () at /app/webkit/Source/WTF/wtf/Assertions.cpp:333
#1  0x00007f50ae0ac085 in WTFCrashWithInfo(int, char const*, char const*, int) () at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Assertions.h:778
#2  0x00007f50b43c254e in WebCore::TrackPrivateBaseGStreamer::disconnect() (this=0x7f508e22cae8) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:190
#3  0x00007f50b4374546 in WebCore::AudioTrackPrivateGStreamer::disconnect() (this=0x7f508e22ca90) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:158
#4  0x00007f50b43a7984 in WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer() (this=0x7f508e3d6900, __in_chrg=<optimized out>) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:195
#5  0x00007f50b43a8334 in WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer() (this=0x7f508e3d6900, __in_chrg=<optimized out>) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:250
#6  0x00007f50b43f2e44 in std::default_delete<WebCore::MediaPlayerPrivateGStreamer>::operator()(WebCore::MediaPlayerPrivateGStreamer*) const (this=0x7ffffbbf1d87, __ptr=0x7f508e3d6900) at /usr/include/c++/13.2.0/bits/unique_ptr.h:99
#7  0x00007f50b43e9912 in WTF::RefCounted<WebCore::MediaPlayerPrivateGStreamer, std::default_delete<WebCore::MediaPlayerPrivateGStreamer> >::deref() const (this=0x7f508e3d6928) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/RefCounted.h:190
#8  0x00007f50b43e68e6 in WebCore::MediaPlayerPrivateGStreamer::deref() (this=0x7f508e3d6900) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:132
#9  0x00007f50b41fd96d in WTF::DefaultRefDerefTraits<WebCore::MediaPlayerPrivateInterface>::derefIfNotNull(WebCore::MediaPlayerPrivateInterface*) (ptr=0x7f508e3d6900) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/RefPtr.h:43
#10 0x00007f50b41fba36 in WTF::RefPtr<WebCore::MediaPlayerPrivateInterface, WTF::RawPtrTraits<WebCore::MediaPlayerPrivateInterface>, WTF::DefaultRefDerefTraits<WebCore::MediaPlayerPrivateInterface> >::~RefPtr() (this=0x7f508e314ac0, __in_chrg=<optimized out>) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/RefPtr.h:75
#11 0x00007f50b41f27fc in WebCore::MediaPlayer::~MediaPlayer() (this=0x7f508e314a60, __in_chrg=<optimized out>) at /app/webkit/Source/WebCore/platform/graphics/MediaPlayer.cpp:479
#12 0x00007f50b2108aac in WTF::ThreadSafeWeakPtrControlBlock::strongDeref<WebCore::MediaPlayer, (WTF::DestructionThread)1>() const::{lambda()#1}::operator()() const (__closure=0x7f508e6e0268) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/ThreadSafeWeakPtr.h:101
#13 0x00007f50b210b9a0 in WTF::Detail::CallableWrapper<WTF::ThreadSafeWeakPtrControlBlock::strongDeref<WebCore::MediaPlayer, (WTF::DestructionThread)1>() const::{lambda()#1}, void>::call() (this=0x7f508e6e0260) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:53
#14 0x00007f50a25636cb in WTF::Function<void ()>::operator()() const (this=0x7ffffbbf1ee0) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:82
#15 0x00007f50a3be57b8 in WTF::ensureOnMainThread(WTF::Function<void ()>&&) (function=...) at /app/webkit/Source/WTF/wtf/MainThread.cpp:95
#16 0x00007f50b2108c0b in WTF::ThreadSafeWeakPtrControlBlock::strongDeref<WebCore::MediaPlayer, (WTF::DestructionThread)1>() const (this=0x7f508e97b800) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/ThreadSafeWeakPtr.h:110
#17 0x00007f50b2106d83 in WTF::ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr<WebCore::MediaPlayer, (WTF::DestructionThread)1>::deref() const (this=0x7f508e314a60) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/ThreadSafeWeakPtr.h:170
#18 0x00007f50b21045c7 in WTF::DefaultRefDerefTraits<WebCore::MediaPlayer>::derefIfNotNull(WebCore::MediaPlayer*) (ptr=0x7f508e314a60) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/RefPtr.h:43
#19 0x00007f50b32cde86 in WTF::RefPtr<WebCore::MediaPlayer, WTF::RawPtrTraits<WebCore::MediaPlayer>, WTF::DefaultRefDerefTraits<WebCore::MediaPlayer> >::operator=(decltype(nullptr)) (this=0x7f502a04a870) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/RefPtr.h:170
#20 0x00007f50b32a9563 in WebCore::HTMLMediaElement::clearMediaPlayer() (this=0x7f502a04a2f0) at /app/webkit/Source/WebCore/html/HTMLMediaElement.cpp:6243
#21 0x00007f50b32a993a in WebCore::HTMLMediaElement::stop() (this=0x7f502a04a2f0) at /app/webkit/Source/WebCore/html/HTMLMediaElement.cpp:6329
#22 0x00007f50b2f2330b in operator()<WebCore::ActiveDOMObject>(WebCore::ActiveDOMObject&) const (__closure=0x7f508e9990d8, activeDOMObject=...) at /app/webkit/Source/WebCore/dom/ScriptExecutionContext.cpp:389
#23 0x00007f50b2f23342 in WTF::Detail::CallableWrapper<WebCore::ScriptExecutionContext::stopActiveDOMObjects()::<lambda(auto:141&)>, WebCore::ScriptExecutionContext::ShouldContinue, WebCore::ActiveDOMObject&>::call(WebCore::ActiveDOMObject &) (this=0x7f508e9990d0, in#0=...) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:53
#24 0x00007f50b2f273eb in WTF::Function<WebCore::ScriptExecutionContext::ShouldContinue (WebCore::ActiveDOMObject&)>::operator()(WebCore::ActiveDOMObject&) const (this=0x7ffffbbf2150, in#0=...) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:82
#25 0x00007f50b2f18cea in WebCore::ScriptExecutionContext::forEachActiveDOMObject(WTF::Function<WebCore::ScriptExecutionContext::ShouldContinue (WebCore::ActiveDOMObject&)> const&) const (this=0x7f503e1000e0, apply=...) at /app/webkit/Source/WebCore/dom/ScriptExecutionContext.cpp:294
#26 0x00007f50b2f190f1 in WebCore::ScriptExecutionContext::stopActiveDOMObjects() (this=0x7f503e1000e0) at /app/webkit/Source/WebCore/dom/ScriptExecutionContext.cpp:388
#27 0x00007f50b2cd2e84 in WebCore::Document::stopActiveDOMObjects() (this=0x7f503e100000) at /app/webkit/Source/WebCore/dom/Document.cpp:3021
#28 0x00007f50b2cc7af0 in WebCore::Document::commonTeardown() (this=0x7f503e100000) at /app/webkit/Source/WebCore/dom/Document.cpp:863
#29 0x00007f50b2cd26c2 in WebCore::Document::willBeRemovedFromFrame() (this=0x7f503e100000) at /app/webkit/Source/WebCore/dom/Document.cpp:2887
#30 0x00007f50b3cc3650 in WebCore::LocalFrame::setView(WTF::RefPtr<WebCore::LocalFrameView, WTF::RawPtrTraits<WebCore::LocalFrameView>, WTF::DefaultRefDerefTraits<WebCore::LocalFrameView> >&&) (this=0x7f508e088340, view=...) at /app/webkit/Source/WebCore/page/LocalFrame.cpp:264
#31 0x00007f50b3cc7215 in WebCore::LocalFrame::createView(WebCore::IntSize const&, std::optional<WebCore::Color> const&, WebCore::IntSize const&, WebCore::IntRect const&, bool, WebCore::ScrollbarMode, bool, WebCore::ScrollbarMode, bool) (this=0x7f508e088340, viewportSize=..., backgroundColor=std::optional<WebCore::Color> [no contained value], fixedLayoutSize=..., fixedVisibleContentRect=..., useFixedLayout=false, horizontalScrollbarMode=WebCore::ScrollbarMode::Auto, horizontalLock=false, verticalScrollbarMode=WebCore::ScrollbarMode::Auto, verticalLock=false) at /app/webkit/Source/WebCore/page/LocalFrame.cpp:926
#32 0x00007f50afac9b92 in WebKit::WebLocalFrameLoaderClient::transitionToCommittedForNewPage() (this=0x7f508e0388b0) at /app/webkit/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:1522
#33 0x00007f50b3a6fc5e in WebCore::FrameLoader::transitionToCommitted(WebCore::CachedPage*) (this=0x7f508e0605a0, cachedPage=0x0) at /app/webkit/Source/WebCore/loader/FrameLoader.cpp:2381
#34 0x00007f50b3a6e7d3 in WebCore::FrameLoader::commitProvisionalLoad() (this=0x7f508e0605a0) at /app/webkit/Source/WebCore/loader/FrameLoader.cpp:2190
#35 0x00007f50b3a12b3b in WebCore::DocumentLoader::commitIfReady() (this=0x7f503e1e6000) at /app/webkit/Source/WebCore/loader/DocumentLoader.cpp:412
#36 0x00007f50b3a132b8 in WebCore::DocumentLoader::finishedLoading() (this=0x7f503e1e6000) at /app/webkit/Source/WebCore/loader/DocumentLoader.cpp:483
#37 0x00007f50b3a1dbec in WebCore::DocumentLoader::maybeLoadEmpty() (this=0x7f503e1e6000) at /app/webkit/Source/WebCore/loader/DocumentLoader.cpp:2060
#38 0x00007f50b3a1e81d in WebCore::DocumentLoader::startLoadingMainResource() (this=0x7f503e1e6000) at /app/webkit/Source/WebCore/loader/DocumentLoader.cpp:2121
#39 0x00007f50b3a78d5e in operator()() (__closure=0x7f508e6e0388) at /app/webkit/Source/WebCore/loader/FrameLoader.cpp:3871
#40 0x00007f50b3a854d4 in WTF::Detail::CallableWrapper<WebCore::FrameLoader::continueLoadAfterNavigationPolicy(const WebCore::ResourceRequest&, WebCore::FormState*, WebCore::NavigationPolicyDecision, WebCore::AllowNavigationToInvalidURL)::<lambda()>, void>::call(void) (this=0x7f508e6e0380) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:53
#41 0x00007f50aeabd001 in WTF::Function<void ()>::operator()() const (this=0x7ffffbbf2e70) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:82
#42 0x00007f50aeabc698 in WTF::CompletionHandler<void ()>::operator()() (this=0x7ffffbbf2ed0) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/CompletionHandler.h:75
#43 0x00007f50b3a79bc2 in WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WebCore::FormState*, WebCore::NavigationPolicyDecision, WebCore::AllowNavigationToInvalidURL) (this=0x7f508e0605a0, request=..., formState=0x0, navigationPolicyDecision=WebCore::NavigationPolicyDecision::ContinueLoad, allowNavigationToInvalidURL=WebCore::AllowNavigationToInvalidURL::Yes) at /app/webkit/Source/WebCore/loader/FrameLoader.cpp:3875
#44 0x00007f50b3a6a26a in operator()(WebCore::ResourceRequest const&, WTF::WeakPtr<WebCore::FormState, WTF::DefaultWeakPtrImpl, WTF::RawPtrTraits<WTF::DefaultWeakPtrImpl> >&&, WebCore::NavigationPolicyDecision) (__closure=0x7f508e9cbd28, request=..., formState=..., navigationPolicyDecision=WebCore::NavigationPolicyDecision::ContinueLoad) at /app/webkit/Source/WebCore/loader/FrameLoader.cpp:1769
#45 0x00007f50b3a855fc in WTF::Detail::CallableWrapper<WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr<WebCore::FormState>&&, WebCore::AllowNavigationToInvalidURL, WTF::CompletionHandler<void()>&&)::<lambda(const WebCore::ResourceRequest&, WTF::WeakPtr<WebCore::FormState, WTF::DefaultWeakPtrImpl, WTF::RawPtrTraits<WTF::DefaultWeakPtrImpl> >&&, WebCore::NavigationPolicyDecision)>, void, WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState, WTF::DefaultWeakPtrImpl, WTF::RawPtrTraits<WTF::DefaultWeakPtrImpl> >&&, WebCore::NavigationPolicyDecision>::call(WebCore::ResourceRequest &&, WTF::WeakPtr<WebCore::FormState, WTF::DefaultWeakPtrImpl, WTF::RawPtrTraits<WTF::DefaultWeakPtrImpl> > &&, WebCore::NavigationPolicyDecision) (this=0x7f508e9cbd20, in#0=..., in#1=..., in#2=WebCore::NavigationPolicyDecision::ContinueLoad) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:53
#46 0x00007f50b3adc467 in WTF::Function<void (WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState, WTF::DefaultWeakPtrImpl, WTF::RawPtrTraits<WTF::DefaultWeakPtrImpl> >&&, WebCore::NavigationPolicyDecision)>::operator()(WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState, WTF::DefaultWeakPtrImpl, WTF::RawPtrTraits<WTF::DefaultWeakPtrImpl> >&&, WebCore::NavigationPolicyDecision) const (this=0x7ffffbbf3380, in#0=..., in#1=..., in#2=WebCore::NavigationPolicyDecision::ContinueLoad) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:82
#47 0x00007f50b3ada6e6 in WTF::CompletionHandler<void (WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState, WTF::DefaultWeakPtrImpl, WTF::RawPtrTraits<WTF::DefaultWeakPtrImpl> >&&, WebCore::NavigationPolicyDecision)>::operator()(WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState, WTF::DefaultWeakPtrImpl, WTF::RawPtrTraits<WTF::DefaultWeakPtrImpl> >&&, WebCore::NavigationPolicyDecision) (this=0x7f508e5640d0, in#0=..., in#1=..., in#2=WebCore::NavigationPolicyDecision::ContinueLoad) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/CompletionHandler.h:75
#48 0x00007f50b3acdc7a in operator()(WebCore::PolicyAction, WebCore::PolicyCheckIdentifier) (__closure=0x7f508e5640c8, policyAction=WebCore::PolicyAction::Use, responseIdentifier=...) at /app/webkit/Source/WebCore/loader/PolicyChecker.cpp:238
#49 0x00007f50b3ad98b5 in WTF::Detail::CallableWrapper<WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest&&, const WebCore::ResourceResponse&, WebCore::DocumentLoader*, WTF::RefPtr<WebCore::FormState>&&, NavigationPolicyDecisionFunction&&, WebCore::PolicyDecisionMode)::<lambda(WebCore::PolicyAction, WebCore::PolicyCheckIdentifier)>, void, WebCore::PolicyAction, WebCore::ProcessQualified<WTF::ObjectIdentifierGeneric<WebCore::PolicyCheckIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits> > >::call(WebCore::PolicyAction, WebCore::ProcessQualified<WTF::ObjectIdentifierGeneric<WebCore::PolicyCheckIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits> >) (this=0x7f508e5640c0, in#0=WebCore::PolicyAction::Use, in#1=...) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:53
#50 0x00007f50afada784 in WTF::Function<void (WebCore::PolicyAction, WebCore::ProcessQualified<WTF::ObjectIdentifierGeneric<WebCore::PolicyCheckIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits> >)>::operator()(WebCore::PolicyAction, WebCore::ProcessQualified<WTF::ObjectIdentifierGeneric<WebCore::PolicyCheckIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits> >) const (this=0x7ffffbbf35b0, in#0=WebCore::PolicyAction::Use, in#1=...) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:82
#51 0x00007f50afbe8db9 in WebKit::WebFrame::didReceivePolicyDecision(unsigned long, WebCore::ProcessQualified<WTF::ObjectIdentifierGeneric<WebCore::PolicyCheckIdentifierType, WTF::ObjectIdentifierMainThreadAccessTraits> >, WebKit::PolicyDecision&&) (this=0x7f508e010ae0, listenerID=7, identifier=..., policyDecision=...) at /app/webkit/Source/WebKit/WebProcess/WebPage/WebFrame.cpp:504
#52 0x00007f50afabeebf in operator()(WebKit::PolicyDecision&&) const (__closure=0x7f508e9cbd58, policyDecision=...) at /app/webkit/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:190
#53 0x00007f50afad39bb in std::__invoke_impl<void, WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const WebCore::NavigationAction&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, WebCore::FormState*, WebCore::PolicyDecisionMode, WebCore::PolicyCheckIdentifier, WebCore::FramePolicyFunction&&)::<lambda(WebKit::PolicyDecision&&)>, WebKit::PolicyDecision>(std::__invoke_other, struct {...} &&) (__f=...) at /usr/include/c++/13.2.0/bits/invoke.h:61
#54 0x00007f50afad2adf in std::__invoke<WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const WebCore::NavigationAction&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, WebCore::FormState*, WebCore::PolicyDecisionMode, WebCore::PolicyCheckIdentifier, WebCore::FramePolicyFunction&&)::<lambda(WebKit::PolicyDecision&&)>, WebKit::PolicyDecision>(struct {...} &&) (__fn=...) at /usr/include/c++/13.2.0/bits/invoke.h:96
#55 0x00007f50afad1413 in std::__apply_impl<WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const WebCore::NavigationAction&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, WebCore::FormState*, WebCore::PolicyDecisionMode, WebCore::PolicyCheckIdentifier, WebCore::FramePolicyFunction&&)::<lambda(WebKit::PolicyDecision&&)>, std::tuple<WebKit::PolicyDecision>, 0>(struct {...} &&, std::tuple<WebKit::PolicyDecision> &&, std::index_sequence) (__f=..., __t=...) at /usr/include/c++/13.2.0/tuple:2288
#56 0x00007f50afad1451 in std::apply<WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const WebCore::NavigationAction&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, WebCore::FormState*, WebCore::PolicyDecisionMode, WebCore::PolicyCheckIdentifier, WebCore::FramePolicyFunction&&)::<lambda(WebKit::PolicyDecision&&)>, std::tuple<WebKit::PolicyDecision> >(struct {...} &&, std::tuple<WebKit::PolicyDecision> &&) (__f=..., __t=...) at /usr/include/c++/13.2.0/tuple:2299
#57 0x00007f50afad14e1 in IPC::Connection::callReply<Messages::WebPageProxy::DecidePolicyForNavigationActionAsync, WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const WebCore::NavigationAction&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, WebCore::FormState*, WebCore::PolicyDecisionMode, WebCore::PolicyCheckIdentifier, WebCore::FramePolicyFunction&&)::<lambda(WebKit::PolicyDecision&&)> >(IPC::Decoder &, struct {...} &&) (decoder=..., completionHandler=...) at /app/webkit/Source/WebKit/Platform/IPC/Connection.h:823
#58 0x00007f50afacf8df in operator()(IPC::Decoder*) (__closure=0x7f508e9cbd58, decoder=0x7f508e1e1dc0) at /app/webkit/Source/WebKit/Platform/IPC/Connection.h:806
#59 0x00007f50afad6dd5 in WTF::Detail::CallableWrapper<IPC::Connection::makeAsyncReplyHandler<Messages::WebPageProxy::DecidePolicyForNavigationActionAsync, WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const WebCore::NavigationAction&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, WebCore::FormState*, WebCore::PolicyDecisionMode, WebCore::PolicyCheckIdentifier, WebCore::FramePolicyFunction&&)::<lambda(WebKit::PolicyDecision&&)> >(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const WebCore::NavigationAction&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, WebCore::FormState*, WebCore::PolicyDecisionMode, WebCore::PolicyCheckIdentifier, WebCore::FramePolicyFunction&&)::<lambda(WebKit::PolicyDecision&&)>&&, WTF::ThreadLikeAssertion)::<lambda(IPC::Decoder*)>, void, IPC::Decoder*>::call(IPC::Decoder *) (this=0x7f508e9cbd50, in#0=0x7f508e1e1dc0) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:53
#60 0x00007f50aefa5602 in WTF::Function<void (IPC::Decoder*)>::operator()(IPC::Decoder*) const (this=0x7ffffbbf38e0, in#0=0x7f508e1e1dc0) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:82
#61 0x00007f50aef9dc92 in WTF::CompletionHandler<void (IPC::Decoder*)>::operator()(IPC::Decoder*) (this=0x7ffffbbf3920, in#0=0x7f508e1e1dc0) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/CompletionHandler.h:75
#62 0x00007f50aef903fb in IPC::Connection::dispatchMessage(IPC::Decoder&) (this=0x7f508e0601e0, decoder=...) at /app/webkit/Source/WebKit/Platform/IPC/Connection.cpp:1214
#63 0x00007f50aef9067e in IPC::Connection::dispatchMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >) (this=0x7f508e0601e0, message=std::unique_ptr<IPC::Decoder> = {...}) at /app/webkit/Source/WebKit/Platform/IPC/Connection.cpp:1280
#64 0x00007f50aef90a3c in IPC::Connection::dispatchOneIncomingMessage() (this=0x7f508e0601e0) at /app/webkit/Source/WebKit/Platform/IPC/Connection.cpp:1345
#65 0x00007f50aef90076 in operator()() const (__closure=0x7f508e514cc8) at /app/webkit/Source/WebKit/Platform/IPC/Connection.cpp:1194
#66 0x00007f50aef977f0 in WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::unique_ptr<IPC::Decoder>)::<lambda()>, void>::call(void) (this=0x7f508e514cc0) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:53
#67 0x00007f50a25636cb in WTF::Function<void ()>::operator()() const (this=0x7ffffbbf3ad0) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:82
#68 0x00007f50a3c132bf in WTF::RunLoop::performWork() (this=0x7f508e0180c0) at /app/webkit/Source/WTF/wtf/RunLoop.cpp:147
#69 0x00007f50a3cce2be in operator()(gpointer) const (__closure=0x0, userData=0x7f508e0180c0) at /app/webkit/Source/WTF/wtf/glib/RunLoopGLib.cpp:80
#70 0x00007f50a3cce2e2 in _FUN(gpointer) () at /app/webkit/Source/WTF/wtf/glib/RunLoopGLib.cpp:82
#71 0x00007f50a3cce251 in operator()(GSource*, GSourceFunc, gpointer) const (__closure=0x0, source=0x557a3fca8ad0, callback=0x7f50a3cce2c5 <_FUN(gpointer)>, userData=0x7f508e0180c0) at /app/webkit/Source/WTF/wtf/glib/RunLoopGLib.cpp:53
#72 0x00007f50a3cce29f in _FUN(GSource*, GSourceFunc, gpointer) () at /app/webkit/Source/WTF/wtf/glib/RunLoopGLib.cpp:56
#73 0x00007f509f517d36 in g_main_dispatch (context=0x557a3fc7ed90) at ../glib/gmain.c:3460
#74 g_main_context_dispatch (context=0x557a3fc7ed90) at ../glib/gmain.c:4200
#75 0x00007f509f5752b8 in g_main_context_iterate.isra.0 (context=0x557a3fc7ed90, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4276
#76 0x00007f509f5173ff in g_main_loop_run (loop=0x557a3fca8ab0) at ../glib/gmain.c:4479
#77 0x00007f50a3cce912 in WTF::RunLoop::run() () at /app/webkit/Source/WTF/wtf/glib/RunLoopGLib.cpp:108
#78 0x00007f50afc513b9 in WebKit::AuxiliaryProcessMainBase<WebKit::WebProcess, true>::run(int, char**) (this=0x7ffffbbf3da0, argc=4, argv=0x7ffffbbf3f68) at /app/webkit/Source/WebKit/Shared/AuxiliaryProcessMain.h:72
#79 0x00007f50afc51210 in WebKit::AuxiliaryProcessMain<WebKit::WebProcessMainGtk>(int, char**) (argc=4, argv=0x7ffffbbf3f68) at /app/webkit/Source/WebKit/Shared/AuxiliaryProcessMain.h:98
#80 0x00007f50afc510f6 in WebKit::WebProcessMain(int, char**) (argc=4, argv=0x7ffffbbf3f68) at /app/webkit/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp:90
#81 0x0000557a3dd92969 in main(int, char**) (argc=4, argv=0x7ffffbbf3f68) at /app/webkit/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp:31
Comment 5 WebKit Commit Bot 2023-12-26 12:09:50 PST
Re-opened since this is blocked by bug 266899
Comment 6 Enrique Ocaña 2023-12-27 05:51:34 PST
Thanks for noticing this and sorry for the mess. Indeed, the g_signal_handler_find() call is looking for any registered handler, regardless of the userdata used to register it. There may be legitimate third party handlers still registered for that m_stream or that m_pad.

I think it would be reasonable to just remove the assert. I'm going to prepare a new patch without the assert.
Comment 7 Enrique Ocaña 2023-12-27 10:14:51 PST
Pull request: https://github.com/WebKit/WebKit/pull/22253
Comment 8 EWS 2023-12-28 01:54:57 PST
Committed 272517@main (bda86858ca81): <https://commits.webkit.org/272517@main>

Reviewed commits have been landed. Closing PR #22253 and removing active labels.