[Webkit-unassigned] [Bug 263846] New: REGRESSION(269844 at main): WebCodecs encoders/decoders now closing from non-main thread
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Oct 29 04:09:59 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=263846
Bug ID: 263846
Summary: REGRESSION(269844 at main): WebCodecs encoders/decoders
now closing from non-main thread
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Media
Assignee: webkit-unassigned at lists.webkit.org
Reporter: philn at igalia.com
Leading to crashes when the encoder or decoder has pending flush promises:
(gdb) bt
#0 0x00007f49d8f6ba3e in WTFCrash() () at /var/home/phil/WebKit/Source/WTF/wtf/Assertions.cpp:333
#1 0x00007f49e080a24b in WTFCrashWithInfo(int, char const*, char const*, int) () at WTF/Headers/wtf/Assertions.h:778
#2 0x00007f49e148ebb7 in WebCore::Node::ref() const (this=0x7f496e120000) at WebCore/PrivateHeaders/WebCore/Node.h:801
#3 0x00007f49e4ed2035 in WebCore::Document::refScriptExecutionContext() (this=0x7f496e120000) at /var/home/phil/WebKit/Source/WebCore/dom/Document.h:1895
#4 0x00007f49e20ab7a9 in WebCore::ScriptExecutionContext::ref() (this=0x7f496e1200e0) at /var/home/phil/WebKit/Source/WebCore/dom/ScriptExecutionContext.h:194
#5 0x00007f49e20ab77e in WTF::DefaultRefDerefTraits<WebCore::ScriptExecutionContext>::refIfNotNull(WebCore::ScriptExecutionContext*) (ptr=0x7f496e1200e0) at WTF/Headers/wtf/RefPtr.h:36
#6 0x00007f49e20aac71 in WTF::RefPtr<WebCore::ScriptExecutionContext, WTF::RawPtrTraits<WebCore::ScriptExecutionContext>, WTF::DefaultRefDerefTraits<WebCore::ScriptExecutionContext> >::RefPtr(WebCore::ScriptExecutionContext*) (this=0x7f431ffe090, ptr=0x7f496e1200e0) at WTF/Headers/wtf/RefPtr.h:63
#7 0x00007f49e4e5ffa1 in WebCore::ActiveDOMCallback::activeDOMObjectsAreSuspended() const (this=0x7f49c3394f60) at /var/home/phil/WebKit/Source/WebCore/dom/ActiveDOMCallback.cpp:53
#8 0x00007f49e4789a7e in WebCore::DeferredPromise::callFunction(JSC::JSGlobalObject&, WebCore::DeferredPromise::ResolveMode, JSC::JSValue)
(this=0x7f49c3394f60, lexicalGlobalObject=..., mode=WebCore::DeferredPromise::ResolveMode::Reject, resolution=...) at /var/home/phil/WebKit/Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp:68
#9 0x00007f49e22276cd in WebCore::DeferredPromise::reject(JSC::JSGlobalObject&, JSC::JSValue, WebCore::RejectAsHandled)
(this=0x7f49c3394f60, lexicalGlobalObject=..., resolution=..., rejectAsHandled=WebCore::RejectAsHandled::No) at /var/home/phil/WebKit/Source/WebCore/bindings/js/JSDOMPromiseDeferred.h:223
#10 0x00007f49e478a6c8 in WebCore::DeferredPromise::reject(WebCore::Exception, WebCore::RejectAsHandled) (this=0x7f49c3394f60, exception=..., rejectAsHandled=WebCore::RejectAsHandled::No)
at /var/home/phil/WebKit/Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp:176
#11 0x00007f49e43e73d8 in WebCore::WebCodecsVideoEncoder::resetEncoder(WebCore::Exception const&) (this=0x7f4932005bd0, exception=...)
at /var/home/phil/WebKit/Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp:357
#12 0x00007f49e43e74e4 in WebCore::WebCodecsVideoEncoder::closeEncoder(WebCore::Exception&&) (this=0x7f4932005bd0, exception=...)
at /var/home/phil/WebKit/Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp:331
#13 0x00007f49e440bc04 in WebCore::WebCodecsVideoEncoder::configure(WebCore::ScriptExecutionContext&, WebCore::WebCodecsVideoEncoderConfig&&)::$_1::operator()()::{lambda(auto:1&&)#2}::operator()<std::experimental::fundamentals_v3::expected<WTF::UniqueRef<WebCore::VideoEncoder>, WTF::String> >(std::experimental::fundamentals_v3::expected<WTF::UniqueRef<WebCore::VideoEncoder>, WTF::String>&&) const
(this=0x7f49c333b338, result=...) at /var/home/phil/WebKit/Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp:170
#14 0x00007f49e440bb91 in WTF::Detail::CallableWrapper<WebCore::WebCodecsVideoEncoder::configure(WebCore::ScriptExecutionContext&, WebCore::WebCodecsVideoEncoderConfig&&)::$_1::operator()()::{lambda(auto:1&&)#2}, void, std::experimental::fundamentals_v3::expected<WTF::UniqueRef<WebCore::VideoEncoder>, WTF::String>&&>::call(std::experimental::fundamentals_v3::expected<WTF::UniqueRef<WebCore::VideoEncoder>, WTF::String>&&) (this=0x7f49c333b330, in=...) at WTF/Headers/wtf/Function.h:53
#15 0x00007f49e62cc4fa in WTF::Function<void (std::experimental::fundamentals_v3::expected<WTF::UniqueRef<WebCore::VideoEncoder>, WTF::String>&&)>::operator()(std::experimental::fundamentals_v3::expected<WTF::UniqueRef<WebCore::VideoEncoder>, WTF::String>&&) const (this=0x7f49c3409fa8, in=...) at WTF/Headers/wtf/Function.h:82
#16 0x00007f49e62bf202 in WebCore::GStreamerVideoEncoder::create(WTF::String const&, WebCore::VideoEncoder::Config const&, WTF::Function<void (std::experimental::fundamentals_v3::expected<WTF::UniqueRef<WebCore::VideoEncoder>, WTF::String>&&)>&&, WTF::Function<void (WebCore::VideoEncoderActiveConfiguration&&)>&&, WTF::Function<void (WebCore::VideoEncoder::EncodedFrame&&)>&&, WTF::Function<void (WTF::Function<void ()>&&)>&&)::$_1::operator()() (this=0x7f49c3409fa8) at /var/home/phil/WebKit/Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.cpp:94
#17 0x00007f49e62bf189 in WTF::Detail::CallableWrapper<WebCore::GStreamerVideoEncoder::create(WTF::String const&, WebCore::VideoEncoder::Config const&, WTF::Function<void (std::experimental::fundamentals_v3::expected<WTF::UniqueRef<WebCore::VideoEncoder>, WTF::String>&&)>&&, WTF::Function<void (WebCore::VideoEncoderActiveConfiguration&&)>&&, WTF::Function<void (WebCore::VideoEncoder::EncodedFrame&&)>&&, WTF::Function<void (WTF::Function<void ()>&&)>&&)::$_1, void>::call() (this=0x7f49c3409fa0) at WTF/Headers/wtf/Function.h:53
#18 0x00007f49d7a01552 in WTF::Function<void ()>::operator()() const (this=0x7f49c3409fd0) at WTF/Headers/wtf/Function.h:82
#19 0x00007f49d92b5479 in WTF::WorkQueueBase::dispatch(WTF::Function<void ()>&&)::$_0::operator()() const (this=0x7f49c3409fc8) at /var/home/phil/WebKit/Source/WTF/wtf/generic/WorkQueueGeneric.cpp:68
#20 0x00007f49d92b5459 in WTF::Detail::CallableWrapper<WTF::WorkQueueBase::dispatch(WTF::Function<void ()>&&)::$_0, void>::call() (this=0x7f49c3409fc0) at /var/home/phil/WebKit/Source/WTF/wtf/Function.h:53
#21 0x00007f49d7a01552 in WTF::Function<void ()>::operator()() const (this=0x7f4931ffe620) at WTF/Headers/wtf/Function.h:82
#22 0x00007f49d9209f0e in WTF::RunLoop::performWork() (this=0x7f49c34380c0) at /var/home/phil/WebKit/Source/WTF/wtf/RunLoop.cpp:147
#23 0x00007f49d92b8f69 in WTF::RunLoop::RunLoop()::$_0::operator()(void*) const (this=0x7f4931ffe6d7, userData=0x7f49c34380c0) at /var/home/phil/WebKit/Source/WTF/wtf/glib/RunLoopGLib.cpp:80
#24 0x00007f49d92b8f49 in WTF::RunLoop::RunLoop()::$_0::__invoke(void*) (userData=0x7f49c34380c0) at /var/home/phil/WebKit/Source/WTF/wtf/glib/RunLoopGLib.cpp:79
#25 0x00007f49d92b8ef9 in WTF::RunLoop::$_0::operator()(_GSource*, int (*)(void*), void*) const
(this=0x7f4931ffe747, source=0x7f4928000dc0, callback=0x7f49d92b8f30 <WTF::RunLoop::RunLoop()::$_0::__invoke(void*)>, userData=0x7f49c34380c0) at /var/home/phil/WebKit/Source/WTF/wtf/glib/RunLoopGLib.cpp:53
#26 0x00007f49d92b80f9 in WTF::RunLoop::$_0::__invoke(_GSource*, int (*)(void*), void*) (source=0x7f4928000dc0, callback=0x7f49d92b8f30 <WTF::RunLoop::RunLoop()::$_0::__invoke(void*)>, userData=0x7f49c34380c0)
at /var/home/phil/WebKit/Source/WTF/wtf/glib/RunLoopGLib.cpp:45
#27 0x00007f49d2f5be1c in g_main_dispatch (context=0x7f4928000b70) at ../glib/gmain.c:3476
#28 g_main_context_dispatch_unlocked (context=0x7f4928000b70) at ../glib/gmain.c:4284
#29 0x00007f49d2fb6d78 in g_main_context_iterate_unlocked.isra.0 (context=0x7f4928000b70, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at ../glib/gmain.c:4349
#30 0x00007f49d2f5d407 in g_main_loop_run (loop=0x7f4928000da0) at ../glib/gmain.c:4551
#31 0x00007f49d92b8678 in WTF::RunLoop::run() () at /var/home/phil/WebKit/Source/WTF/wtf/glib/RunLoopGLib.cpp:108
#32 0x00007f49d920a694 in WTF::RunLoop::create(char const*, WTF::ThreadType, WTF::Thread::QOS)::$_0::operator()() const (this=0x7f49c34087c8) at /var/home/phil/WebKit/Source/WTF/wtf/RunLoop.cpp:114
#33 0x00007f49d920a659 in WTF::Detail::CallableWrapper<WTF::RunLoop::create(char const*, WTF::ThreadType, WTF::Thread::QOS)::$_0, void>::call() (this=0x7f49c34087c0)
at /var/home/phil/WebKit/Source/WTF/wtf/Function.h:53
#34 0x00007f49d7a01552 in WTF::Function<void ()>::operator()() const (this=0x7f4931ffe990) at WTF/Headers/wtf/Function.h:82
#35 0x00007f49d92155d8 in WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) (newThreadContext=0x7f49c3428630) at /var/home/phil/WebKit/Source/WTF/wtf/Threading.cpp:258
#36 0x00007f49d92c5ea5 in WTF::wtfThreadEntryPoint(void*) (context=0x7f49c3428630) at /var/home/phil/WebKit/Source/WTF/wtf/posix/ThreadingPOSIX.cpp:243
#37 0x00007f49d2984897 in start_thread (arg=<optimized out>) at pthread_create.c:444
#38 0x00007f49d2a0b6bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231029/ea3bbfe8/attachment-0001.htm>
More information about the webkit-unassigned
mailing list