Bug 197230 - [REGRESSION(r243197)][GStreamer] http/tests/media/clearkey/collect-webkit-media-session.html hits an ASSERT
Summary: [REGRESSION(r243197)][GStreamer] http/tests/media/clearkey/collect-webkit-med...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-24 03:26 PDT by Philippe Normand
Modified: 2019-04-25 00:48 PDT (History)
2 users (show)

See Also:


Attachments
Patch (5.46 KB, patch)
2019-04-24 05:07 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (4.99 KB, patch)
2019-04-24 07:39 PDT, Philippe Normand
calvaris: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2019-04-24 03:26:41 PDT
Thread 1 (Thread 0x7f3fdb7fe700 (LWP 31235)):
#0  WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:305
#1  0x00007f40a8893f3d in _ZN7WebCore26ContextDestructionObserver14observeContextEPNS_22ScriptExecutionContextE (this=0x7f402e82d090, scriptExecutionContext=0x0) at ../../Source/WebCore/dom/ContextDestructionObserver.cpp:48
#2  0x00007f40a8893ea7 in _ZN7WebCore26ContextDestructionObserverD2Ev (this=0x7f402e82d090, __in_chrg=<optimized out>) at ../../Source/WebCore/dom/ContextDestructionObserver.cpp:42
#3  0x00007f40a8f5c754 in _ZN7WebCore19MediaResourceLoaderD2Ev (this=0x7f402e82d078, __in_chrg=<optimized out>) at ../../Source/WebCore/loader/MediaResourceLoader.cpp:52
#4  0x00007f40a8f5c794 in _ZN7WebCore19MediaResourceLoaderD0Ev (this=0x7f402e82d078, __in_chrg=<optimized out>) at ../../Source/WebCore/loader/MediaResourceLoader.cpp:55
#5  0x00007f40a75238ef in _ZNK3WTF20ThreadSafeRefCountedIN7WebCore27PlatformMediaResourceLoaderELNS_17DestructionThreadE0EE5derefEv (this=0x7f402e82d080) at DerivedSources/ForwardingHeaders/wtf/ThreadSafeRefCounted.h:76
#6  0x00007f40a7522f98 in _ZN3WTF14derefIfNotNullIN7WebCore27PlatformMediaResourceLoaderEEEvPT_ (ptr=0x7f402e82d078) at DerivedSources/ForwardingHeaders/wtf/RefPtr.h:44
#7  0x00007f40a7521fd1 in _ZN3WTF6RefPtrIN7WebCore27PlatformMediaResourceLoaderENS_13DumbPtrTraitsIS2_EEED2Ev (this=0x7f3fb0004ff8, __in_chrg=<optimized out>) at DerivedSources/ForwardingHeaders/wtf/RefPtr.h:69
#8  0x00007f40a7521d60 in _ZN20_WebKitWebSrcPrivateD2Ev (this=0x7f3fb0004fc0, __in_chrg=<optimized out>) at ../../Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:79
#9  0x00007f40a751a4c7 in webKitWebSrcFinalize (object=0x7f3fb0005160) at ../../Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:260
#10 0x00007f40948b3b62 in g_object_unref () at ../../Source/glib-2.58.1/gobject/gobject.c:3346
#11 g_object_unref () at ../../Source/glib-2.58.1/gobject/gobject.c:3238
#12 0x00007f40955bb806 in gst_bin_remove_func () at ../../Source/gstreamer-1.16.0/gst/gstbin.c:1809
#13 0x00007f40955ba8f8 in gst_bin_remove () at ../../Source/gstreamer-1.16.0/gst/gstbin.c:1871
#14 0x00007f40955bab83 in gst_bin_dispose () at ../../Source/gstreamer-1.16.0/gst/gstbin.c:527
#15 0x00007f40948b3af3 in g_object_unref () at ../../Source/glib-2.58.1/gobject/gobject.c:3309
#16 g_object_unref () at ../../Source/glib-2.58.1/gobject/gobject.c:3238
#17 0x00007f40955bb806 in gst_bin_remove_func () at ../../Source/gstreamer-1.16.0/gst/gstbin.c:1809
#18 0x00007f40955ba8f8 in gst_bin_remove () at ../../Source/gstreamer-1.16.0/gst/gstbin.c:1871
#19 0x00007f402dd456a4 in gst_adaptive_demux_stream_download_loop () at ../../Source/gst-plugins-bad-1.16.0/gst-libs/gst/adaptivedemux/gstadaptivedemux.c:3968
#20 0x00007f409562d9f1 in gst_task_func () at ../../Source/gstreamer-1.16.0/gst/gsttask.c:328
#21 0x00007f40947f5993 in g_thread_pool_thread_proxy () at ../../Source/glib-2.58.1/glib/gthreadpool.c:307
#22 0x00007f40947f5035 in g_thread_proxy () at ../../Source/glib-2.58.1/glib/gthread.c:784
#23 0x00007f4094feffa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#24 0x00007f40938d482f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

STDERR: ASSERTION FAILED: m_scriptExecutionContext->isContextThread()
STDERR: ../../Source/WebCore/dom/ContextDestructionObserver.cpp(48) : void WebCore::ContextDestructionObserver::observeContext(WebCore::ScriptExecutionContext*)
STDERR: 1   0x7f409b09d949 /home/phil/WebKit/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(WTFCrash+0x9) [0x7f409b09d949]
STDERR: 2   0x7f40a8893f3d /home/phil/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::ContextDestructionObserver::observeContext(WebCore::ScriptExecutionContext*)+0x67) [0x7f40a8893f3d]
STDERR: 3   0x7f40a8893ea7 /home/phil/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::ContextDestructionObserver::~ContextDestructionObserver()+0x2f) [0x7f40a8893ea7]
STDERR: 4   0x7f40a8f5c754 /home/phil/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::MediaResourceLoader::~MediaResourceLoader()+0xcc) [0x7f40a8f5c754]
STDERR: 5   0x7f40a8f5c794 /home/phil/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::MediaResourceLoader::~MediaResourceLoader()+0x18) [0x7f40a8f5c794]
STDERR: 6   0x7f40a75238ef /home/phil/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WTF::ThreadSafeRefCounted<WebCore::PlatformMediaResourceLoader, (WTF::DestructionThread)0>::deref() const+0x4b) [0x7f40a75238ef]
STDERR: 7   0x7f40a7522f98 /home/phil/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(void WTF::derefIfNotNull<WebCore::PlatformMediaResourceLoader>(WebCore::PlatformMediaResourceLoader*)+0x2c) [0x7f40a7522f98]
STDERR: 8   0x7f40a7521fd1 /home/phil/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WTF::RefPtr<WebCore::PlatformMediaResourceLoader, WTF::DumbPtrTraits<WebCore::PlatformMediaResourceLoader> >::~RefPtr()+0x2f) [0x7f40a7521fd1]
STDERR: 9   0x7f40a7521d60 /home/phil/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(_WebKitWebSrcPrivate::~_WebKitWebSrcPrivate()+0x72) [0x7f40a7521d60]
STDERR: 10  0x7f40a751a4c7 /home/phil/WebKit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0xabfc4c7) [0x7f40a751a4c7]
STDERR: 11  0x7f40948b3b62 /home/phil/WebKit/WebKitBuild/DependenciesGTK/Root/lib/libgobject-2.0.so.0(g_object_unref+0x1a2) [0x7f40948b3b62]
STDERR: 12  0x7f40955bb806 /home/phil/WebKit/WebKitBuild/DependenciesGTK/Root/lib/libgstreamer-1.0.so.0(+0x43806) [0x7f40955bb806]
STDERR: 13  0x7f40955ba8f8 /home/phil/WebKit/WebKitBuild/DependenciesGTK/Root/lib/libgstreamer-1.0.so.0(gst_bin_remove+0xf8) [0x7f40955ba8f8]
STDERR: 14  0x7f40955bab83 /home/phil/WebKit/WebKitBuild/DependenciesGTK/Root/lib/libgstreamer-1.0.so.0(+0x42b83) [0x7f40955bab83]
STDERR: 15  0x7f40948b3af3 /home/phil/WebKit/WebKitBuild/DependenciesGTK/Root/lib/libgobject-2.0.so.0(g_object_unref+0x133) [0x7f40948b3af3]
STDERR: 16  0x7f40955bb806 /home/phil/WebKit/WebKitBuild/DependenciesGTK/Root/lib/libgstreamer-1.0.so.0(+0x43806) [0x7f40955bb806]
STDERR: 17  0x7f40955ba8f8 /home/phil/WebKit/WebKitBuild/DependenciesGTK/Root/lib/libgstreamer-1.0.so.0(gst_bin_remove+0xf8) [0x7f40955ba8f8]
STDERR: 18  0x7f402dd456a4 /home/phil/WebKit/WebKitBuild/DependenciesGTK/Root/lib/libgstadaptivedemux-1.0.so.0(+0x106a4) [0x7f402dd456a4]
STDERR: 19  0x7f409562d9f1 /home/phil/WebKit/WebKitBuild/DependenciesGTK/Root/lib/libgstreamer-1.0.so.0(+0xb59f1) [0x7f409562d9f1]
STDERR: 20  0x7f40947f5993 /home/phil/WebKit/WebKitBuild/DependenciesGTK/Root/lib/libglib-2.0.so.0(+0x74993) [0x7f40947f5993]
STDERR: 21  0x7f40947f5035 /home/phil/WebKit/WebKitBuild/DependenciesGTK/Root/lib/libglib-2.0.so.0(+0x74035) [0x7f40947f5035]
STDERR: 22  0x7f4094feffa3 /lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7f4094feffa3]
STDERR: 23  0x7f40938d482f /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f40938d482f]
Comment 1 Philippe Normand 2019-04-24 05:07:31 PDT
Created attachment 368120 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2019-04-24 05:57:20 PDT
Comment on attachment 368120 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=368120&action=review

> Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:618
> +            auto nullClient = std::make_unique<PlatformMediaResourceClient>();
> +            priv->resource->setClient(WTFMove(nullClient));

why this pattern instead of the former?
Comment 3 Philippe Normand 2019-04-24 07:37:58 PDT
Ah that was a change I had early in the branch to prevent another crash but with the finished patch I can't reproduce that specific crash. Will revert.
Comment 4 Philippe Normand 2019-04-24 07:39:21 PDT
Created attachment 368123 [details]
Patch
Comment 5 Philippe Normand 2019-04-25 00:47:41 PDT
Committed r244640: <https://trac.webkit.org/changeset/244640>
Comment 6 Radar WebKit Bug Importer 2019-04-25 00:48:18 PDT
<rdar://problem/50197751>