WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
266571
[WebCodecs] AudioEncoder: ASSERTION FAILED: m_thread.ptr() == &Thread::current()
https://bugs.webkit.org/show_bug.cgi?id=266571
Summary
[WebCodecs] AudioEncoder: ASSERTION FAILED: m_thread.ptr() == &Thread::current()
Vitaly Dyackhov
Reported
2023-12-18 03:06:05 PST
These tests are hitting the assertion in Debug builds: imported/w3c/web-platform-tests/webcodecs/audio-encoder-codec-specific.https.any.html imported/w3c/web-platform-tests/webcodecs/audio-encoder-config.https.any.html imported/w3c/web-platform-tests/webcodecs/audio-encoder-config.https.any.worker.html imported/w3c/web-platform-tests/webcodecs/audio-encoder.https.any.html Stack trace: ``` #0 WTFCrash() () at /app/webkit/Source/WTF/wtf/Assertions.cpp:333 #1 0x00007f8c2fa8a9f5 in WTFCrashWithInfo(int, char const*, char const*, int) () at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Assertions.h:778 #2 0x00007f8c2ff065ca in WTF::SingleThreadIntegralWrapper<unsigned int>::assertThread() const (this=0x7f8c103386c0) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/SingleThreadIntegralWrapper.h:45 #3 0x00007f8c3068e274 in WTF::SingleThreadIntegralWrapper<unsigned int>::operator++() (this=0x7f8c103386c0) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/SingleThreadIntegralWrapper.h:89 #4 0x00007f8c3116f194 in WTF::WeakPtrImplBaseSingleThread<WebCore::WeakPtrImplWithEventTargetData>::ref() const (this=0x7f8c103386c0) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/WeakRef.h:248 #5 0x00007f8c311673ca in WTF::DefaultRefDerefTraits<WebCore::WeakPtrImplWithEventTargetData>::refIfNotNull(WebCore::WeakPtrImplWithEventTargetData*) (ptr=0x7f8c103386c0) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/RefPtr.h:36 #6 0x00007f8c333208e2 in WTF::RefPtr<WebCore::WeakPtrImplWithEventTargetData, WTF::RawPtrTraits<WebCore::WeakPtrImplWithEventTargetData>, WTF::DefaultRefDerefTraits<WebCore::WeakPtrImplWithEventTargetData> >::RefPtr(WTF::RefPtr<WebCore::WeakPtrImplWithEventTargetData, WTF::RawPtrTraits<WebCore::WeakPtrImplWithEventTargetData>, WTF::DefaultRefDerefTraits<WebCore::WeakPtrImplWithEventTargetData> > const&) (this=0x7f8ba17fd660, o=...) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/RefPtr.h:64 #7 0x00007f8c33ae20df in WTF::WeakPtr<WebCore::WebCodecsAudioEncoder, WebCore::WeakPtrImplWithEventTargetData, WTF::RawPtrTraits<WebCore::WeakPtrImplWithEventTargetData> >::WeakPtr(WTF::WeakPtr<WebCore::WebCodecsAudioEncoder, WebCore::WeakPtrImplWithEventTargetData, WTF::RawPtrTraits<WebCore::WeakPtrImplWithEventTargetData> > const&) (this=0x7f8ba17fd660) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/WeakPtr.h:41 #8 0x00007f8c33acc130 in operator()<WTF::Function<void()> >(WTF::Function<void()> &&) const (__closure=0x7f8c103387d0, task=...) at /app/webkit/Source/WebCore/Modules/webcodecs/WebCodecsAudioEncoder.cpp:160 #9 0x00007f8c33acc1fc in WTF::Detail::CallableWrapper<WebCore::WebCodecsAudioEncoder::configure(WebCore::ScriptExecutionContext&, WebCore::WebCodecsAudioEncoderConfig&&)::<lambda()> mutable::<lambda(auto:129&&)>, void, WTF::Function<void()>&&>::call(WTF::Function<void()> &&) (this=0x7f8c103387c0, in#0=...) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:53 #10 0x00007f8c33ad316d in WTF::Function<void (WTF::Function<void ()>&&)>::operator()(WTF::Function<void ()>&&) const (this=0x7f8c10123b98, in#0=...) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:82 #11 0x00007f8c35a186fc in WebCore::GStreamerInternalAudioEncoder::postTask(WTF::Function<void ()>&&) (this=0x7f8c10123b80, task=...) at /app/webkit/Source/WebCore/platform/audio/gstreamer/AudioEncoderGStreamer.cpp:54 #12 0x00007f8c359f9586 in operator()() (__closure=0x7f8c10391728) at /app/webkit/Source/WebCore/platform/audio/gstreamer/AudioEncoderGStreamer.cpp:121 #13 0x00007f8c35a159f0 in WTF::Detail::CallableWrapper<WebCore::GStreamerAudioEncoder::create(const WTF::String&, const WebCore::AudioEncoder::Config&, WebCore::AudioEncoder::CreateCallback&&, WebCore::AudioEncoder::DescriptionCallback&&, WebCore::AudioEncoder::OutputCallback&&, WebCore::AudioEncoder::PostTaskCallback&&)::<lambda()>, void>::call(void) (this=0x7f8c10391720) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:53 #14 0x00007f8c23f61aff in WTF::Function<void ()>::operator()() const (this=0x7f8c10391750) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:82 #15 0x00007f8c256c697a in operator()() const (__closure=0x7f8c10391748) at /app/webkit/Source/WTF/wtf/generic/WorkQueueGeneric.cpp:68 #16 0x00007f8c256c8854 in WTF::Detail::CallableWrapper<WTF::WorkQueueBase::dispatch(WTF::Function<void()>&&)::<lambda()>, void>::call(void) (this=0x7f8c10391740) at /app/webkit/Source/WTF/wtf/Function.h:53 #17 0x00007f8c23f61aff in WTF::Function<void ()>::operator()() const (this=0x7f8ba17fd880) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:82 #18 0x00007f8c2560fa1d in WTF::RunLoop::performWork() (this=0x7f8c10068180) at /app/webkit/Source/WTF/wtf/RunLoop.cpp:147 #19 0x00007f8c256cab10 in operator()(gpointer) const (__closure=0x0, userData=0x7f8c10068180) at /app/webkit/Source/WTF/wtf/glib/RunLoopGLib.cpp:80 #20 0x00007f8c256cab34 in _FUN(gpointer) () at /app/webkit/Source/WTF/wtf/glib/RunLoopGLib.cpp:82 #21 0x00007f8c256caaa3 in operator()(GSource*, GSourceFunc, gpointer) const (__closure=0x0, source=0x7f8b9c000dc0, callback=0x7f8c256cab17 <_FUN(gpointer)>, userData=0x7f8c10068180) at /app/webkit/Source/WTF/wtf/glib/RunLoopGLib.cpp:53 #22 0x00007f8c256caaf1 in _FUN(GSource*, GSourceFunc, gpointer) () at /app/webkit/Source/WTF/wtf/glib/RunLoopGLib.cpp:56 #23 0x00007f8c1e717d36 in g_main_dispatch (context=0x7f8b9c000b70) at ../glib/gmain.c:3460 #24 g_main_context_dispatch (context=0x7f8b9c000b70) at ../glib/gmain.c:4200 #25 0x00007f8c1e7752b8 in g_main_context_iterate.isra.0 (context=0x7f8b9c000b70, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4276 #26 0x00007f8c1e7173ff in g_main_loop_run (loop=0x7f8b9c000da0) at ../glib/gmain.c:4479 #27 0x00007f8c256cb164 in WTF::RunLoop::run() () at /app/webkit/Source/WTF/wtf/glib/RunLoopGLib.cpp:108 #28 0x00007f8c2560f7b1 in operator()() const (__closure=0x7f8c103916e8) at /app/webkit/Source/WTF/wtf/RunLoop.cpp:114 #29 0x00007f8c25610ebe in WTF::Detail::CallableWrapper<WTF::RunLoop::create(char const*, WTF::ThreadType, WTF::Thread::QOS)::<lambda()>, void>::call(void) (this=0x7f8c103916e0) at /app/webkit/Source/WTF/wtf/Function.h:53 #30 0x00007f8c23f61aff in WTF::Function<void ()>::operator()() const (this=0x7f8ba17fdb80) at /app/webkit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Function.h:82 #31 0x00007f8c2561bd97 in WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) (newThreadContext=0x7f8c1032a340) at /app/webkit/Source/WTF/wtf/Threading.cpp:258 #32 0x00007f8c256d8d71 in WTF::wtfThreadEntryPoint(void*) (context=0x7f8c1032a340) at /app/webkit/Source/WTF/wtf/posix/ThreadingPOSIX.cpp:243 #33 0x00007f8c1e1b8e39 in start_thread (arg=<optimized out>) at pthread_create.c:444 #34 0x00007f8c1e2408c4 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100 ```
Attachments
Add attachment
proposed patch, testcase, etc.
Vitaly Dyackhov
Comment 1
2023-12-18 03:20:22 PST
Pull request:
https://github.com/WebKit/WebKit/pull/21959
EWS
Comment 2
2023-12-18 03:24:20 PST
Test gardening commit
272207@main
(471790cb5501): <
https://commits.webkit.org/272207@main
> Reviewed commits have been landed. Closing PR #21959 and removing active labels.
Philippe Normand
Comment 3
2023-12-19 03:28:26 PST
That's a bug in the cross-platform code, we should use a ThreadSafeWeakPtr there, like in the VideoEncoder.
Philippe Normand
Comment 4
2023-12-20 02:54:40 PST
Pull request:
https://github.com/WebKit/WebKit/pull/22090
EWS
Comment 5
2023-12-21 10:10:05 PST
Committed
272419@main
(a7e290017e29): <
https://commits.webkit.org/272419@main
> Reviewed commits have been landed. Closing PR #22090 and removing active labels.
Radar WebKit Bug Importer
Comment 6
2023-12-21 10:11:15 PST
<
rdar://problem/120001846
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug