Bug 211166 - [GStreamer] webrtc/disable-encryption.html is a crashing flaky
Summary: [GStreamer] webrtc/disable-encryption.html is a crashing flaky
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords: InRadar
: 213329 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-04-28 23:45 PDT by Diego Pino
Modified: 2020-07-20 02:40 PDT (History)
15 users (show)

See Also:


Attachments
Patch (5.24 KB, patch)
2020-05-12 01:06 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (5.44 KB, patch)
2020-05-12 02:42 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (7.29 KB, patch)
2020-05-12 05:10 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (3.75 KB, patch)
2020-06-24 08:06 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Pino 2020-04-28 23:45:16 PDT
The test has started to crash, most of the times, since r260814 (RTCPeerConnection should not remove its created remote MediaStream objects until getting close)

The failure is only reproducible when testing the whole 'LayoutTests/webrtc/' folder. If running the test alone, it passes. Likely the crash is due to a collateral effect with some other test in the same folder.

See: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r260815%20(13522)/webrtc/disable-encryption-crash-log.txt

Thread 1 (Thread 0x7f09878f19c0 (LWP 130430)):
#0  _g_log_abort () at ../../Source/glib-2.58.1/glib/gmessages.c:557
#1  0x00007f098ae6f559 in g_logv () at ../../Source/glib-2.58.1/glib/gmessages.c:1371
#2  0x00007f098ae6f712 in g_log () at ../../Source/glib-2.58.1/glib/gmessages.c:1413
#3  0x00007f098af4dc53 in g_object_unref () at ../../Source/glib-2.58.1/gobject/gobject.c:3309
#4  g_object_unref () at ../../Source/glib-2.58.1/gobject/gobject.c:3238
#5  0x00007f098bf106da in _gst_message_free () at ../../Source/gstreamer-1.16.2/gst/gstmessage.c:212
#6  0x00007f098ae64c2d in g_list_foreach () at ../../Source/glib-2.58.1/glib/glist.c:1013
#7  0x00007f098ae64c5b in g_list_free_full () at ../../Source/glib-2.58.1/glib/glist.c:223
#8  0x00007f098bf283b5 in gst_pipeline_change_state () at ../../Source/gstreamer-1.16.2/gst/gstpipeline.c:545
#9  0x00007f092ad4ed16 in gst_play_bin3_change_state () at ../../Source/gst-plugins-base-1.16.2/gst/playback/gstplaybin3.c:4943
#10 0x00007f098bf00bbe in gst_element_change_state () at ../../Source/gstreamer-1.16.2/gst/gstelement.c:2952
#11 0x00007f098bf00da5 in gst_element_change_state () at ../../Source/gstreamer-1.16.2/gst/gstelement.c:2991
#12 0x00007f098bf012de in gst_element_set_state_func () at ../../Source/gstreamer-1.16.2/gst/gstelement.c:2906
#13 0x00007f0993b62227 in WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#14 0x00007f0993b62a39 in WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#15 0x00007f09934ca474 in WebCore::MediaPlayer::~MediaPlayer() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#16 0x00007f09934ca4f9 in WebCore::MediaPlayer::~MediaPlayer() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#17 0x00007f0993013db6 in WebCore::HTMLMediaElement::clearMediaPlayer() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#18 0x00007f0993013e68 in WebCore::HTMLMediaElement::userCancelledLoad() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#19 0x00007f099301407d in WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#20 0x00007f09930143dc in WebCore::HTMLMediaElement::stop() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#21 0x00007f0992e7c7dd in WTF::Detail::CallableWrapper<WebCore::ScriptExecutionContext::stopActiveDOMObjects()::{lambda(auto:1&)#1}, WebCore::ScriptExecutionContext::ShouldContinue, WebCore::ActiveDOMObject&>::call(WebCore::ActiveDOMObject) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#22 0x00007f0992e7f2be in WebCore::ScriptExecutionContext::forEachActiveDOMObject(WTF::Function<WebCore::ScriptExecutionContext::ShouldContinue (WebCore::ActiveDOMObject&)> const&) const () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#23 0x00007f0992e7f492 in WebCore::ScriptExecutionContext::stopActiveDOMObjects() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#24 0x00007f0992ddae97 in WebCore::Document::stopActiveDOMObjects() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#25 0x00007f0992df0da6 in WebCore::Document::commonTeardown() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#26 0x00007f0992df9818 in WebCore::Document::prepareForDestruction() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#27 0x00007f0993327fe4 in WebCore::Frame::setView(WTF::RefPtr<WebCore::FrameView, WTF::DumbPtrTraits<WebCore::FrameView> >&&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#28 0x00007f099333c12c in WebCore::Frame::createView(WebCore::IntSize const&, WTF::Optional<WebCore::Color> const&, WebCore::IntSize const&, WebCore::IntRect const&, bool, WebCore::ScrollbarMode, bool, WebCore::ScrollbarMode, bool) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#29 0x00007f0992243247 in WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#30 0x00007f0993253783 in WebCore::FrameLoader::transitionToCommitted(WebCore::CachedPage*) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#31 0x00007f09932538e5 in WebCore::FrameLoader::commitProvisionalLoad() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#32 0x00007f0993225f05 in WebCore::DocumentLoader::finishedLoading() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#33 0x00007f099322866b in WebCore::DocumentLoader::maybeLoadEmpty() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#34 0x00007f0993228a8d in WebCore::DocumentLoader::startLoadingMainResource() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#35 0x00007f099324229b in WTF::Detail::CallableWrapper<WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WebCore::FormState*, WebCore::NavigationPolicyDecision, WebCore::AllowNavigationToInvalidURL)::{lambda()#1}, void>::call() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#36 0x00007f0993254747 in WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WebCore::FormState*, WebCore::NavigationPolicyDecision, WebCore::AllowNavigationToInvalidURL) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#37 0x00007f099325aab3 in WTF::Detail::CallableWrapper<WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WebCore::AllowNavigationToInvalidURL, WTF::CompletionHandler<void ()>&&)::{lambda(WebCore::ResourceRequest const&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::NavigationPolicyDecision)#2}, void, WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::NavigationPolicyDecision>::call(WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WebCore::AllowNavigationToInvalidURL, WTF::CompletionHandler<void ()>&&)::{lambda(WebCore::ResourceRequest const&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::NavigationPolicyDecision)#2}, WTF::WeakPtr<WebCore::FormState>&&, WebCore::NavigationPolicyDecision) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#38 0x00007f099326bc25 in WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WebCore::DocumentLoader*, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::NavigationPolicyDecision)>&&, WebCore::PolicyDecisionMode)::{lambda(WebCore::PolicyAction, WebCore::PolicyCheckIdentifier)#1}::operator()(WebCore::PolicyAction, WebCore::PolicyCheckIdentifier) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#39 0x00007f099224dfe3 in WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(WebCore::NavigationAction const&, WebCore::ResourceRequest const&, WebCore::ResourceResponse const&, WebCore::FormState*, WebCore::PolicyDecisionMode, WebCore::PolicyCheckIdentifier, WTF::Function<void (WebCore::PolicyAction, WebCore::PolicyCheckIdentifier)>&&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#40 0x00007f099326f449 in WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WebCore::DocumentLoader*, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::NavigationPolicyDecision)>&&, WebCore::PolicyDecisionMode) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#41 0x00007f0993255015 in WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WebCore::AllowNavigationToInvalidURL, WTF::CompletionHandler<void ()>&&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#42 0x00007f09932576e5 in WebCore::FrameLoader::load(WebCore::DocumentLoader&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#43 0x00007f099325832c in WebCore::FrameLoader::load(WebCore::FrameLoadRequest&&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#44 0x00007f099226bdea in WebKit::WebPage::loadRequest(WebKit::LoadParameters&&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#45 0x00007f0991d51b03 in void IPC::handleMessage<Messages::WebPage::LoadRequest, WebKit::WebPage, void (WebKit::WebPage::*)(WebKit::LoadParameters&&)>(IPC::Decoder&, WebKit::WebPage*, void (WebKit::WebPage::*)(WebKit::LoadParameters&&)) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#46 0x00007f0991d3efbb in WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#47 0x00007f0991e755a2 in IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#48 0x00007f0992101326 in WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#49 0x00007f0991e6e448 in IPC::Connection::dispatchMessage(IPC::Decoder&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#50 0x00007f0991e6f775 in IPC::Connection::dispatchMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#51 0x00007f0991e6fe8b in IPC::Connection::dispatchOneIncomingMessage() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#52 0x00007f098f8f99fd in WTF::RunLoop::performWork() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#53 0x00007f098f95a429 in WTF::RunLoop::RunLoop()::{lambda(void*)#1}::_FUN(void*) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#54 0x00007f098ae686b8 in g_main_dispatch () at ../../Source/glib-2.58.1/glib/gmain.c:3182
#55 g_main_context_dispatch () at ../../Source/glib-2.58.1/glib/gmain.c:3847
#56 0x00007f098ae68a78 in g_main_context_iterate () at ../../Source/glib-2.58.1/glib/gmain.c:3920
#57 0x00007f098ae68d62 in g_main_loop_run () at ../../Source/glib-2.58.1/glib/gmain.c:4116
#58 0x00007f098f95af40 in WTF::RunLoop::run() () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#59 0x00007f099229f25d in int WebKit::AuxiliaryProcessMain<WebKit::WebProcess, WebKit::WebProcessMainGtk>(int, char**) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#60 0x00007f09893b909b in __libc_start_main (main=0x556ab3d2fc10 <main>, argc=4, argv=0x7ffd1f9f73c8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd1f9f73b8) at ../csu/libc-start.c:308
#61 0x0000556ab3d2fc8a in _start ()
Comment 1 Philippe Normand 2020-05-11 04:39:18 PDT
STDERR: (WebKitWebProcess:130430): GStreamer-CRITICAL **: 04:44:26.905: 
STDERR: Trying to dispose element appsrc21, but it is in PLAYING instead of the NULL state.
STDERR: You need to explicitly set elements to the NULL state before
STDERR: dropping the final reference, to allow them to clean up.
STDERR: This problem may also be caused by a refcounting bug in the
STDERR: application or some element.
Comment 2 Philippe Normand 2020-05-11 05:17:34 PDT
I may have a patch. Checking the tests now...
Comment 3 Philippe Normand 2020-05-12 01:06:17 PDT
Created attachment 399109 [details]
Patch
Comment 4 Philippe Normand 2020-05-12 02:08:35 PDT
Issue still reproduces on Debug... I'll check.
Comment 5 Philippe Normand 2020-05-12 02:42:26 PDT
Created attachment 399112 [details]
Patch
Comment 6 Philippe Normand 2020-05-12 05:10:13 PDT
Created attachment 399120 [details]
Patch
Comment 7 Thibault Saunier 2020-05-13 06:35:30 PDT
Comment on attachment 399120 [details]
Patch

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

> Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:200
> +            auto parent = adoptGRef(gst_object_get_parent(GST_OBJECT_CAST(m_src.get())));

Would be cleaner to change that method to `reset(GstBin *parent, bool isVideo)` fmopv.

> Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:591
> +    GRefPtr<GstElement> src = gst_element_factory_make("appsrc", nullptr);

This `ref_sink` now?
Comment 8 Philippe Normand 2020-05-13 06:47:37 PDT
Comment on attachment 399120 [details]
Patch

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

>> Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:591
>> +    GRefPtr<GstElement> src = gst_element_factory_make("appsrc", nullptr);
> 
> This `ref_sink` now?

Yes, through template <> GstElement* refGPtr<GstElement>() (AFAIK)
Comment 9 Philippe Normand 2020-05-13 07:06:19 PDT
Comment on attachment 399120 [details]
Patch

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

>> Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:200
>> +            auto parent = adoptGRef(gst_object_get_parent(GST_OBJECT_CAST(m_src.get())));
> 
> Would be cleaner to change that method to `reset(GstBin *parent, bool isVideo)` fmopv.

But there's not always a parent. In some cases the element is not in any bin. And this argument would always be the same GST_BIN_CAST(self). I don't see how that's cleaner :)
Also the isVideo thing should be reworked at some point, but I didn't want this patch to grow too much...
Comment 10 Thibault Saunier 2020-05-13 07:39:36 PDT
(In reply to Philippe Normand from comment #9)
> Comment on attachment 399120 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=399120&action=review
> 
> >> Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:200
> >> +            auto parent = adoptGRef(gst_object_get_parent(GST_OBJECT_CAST(m_src.get())));
> > 
> > Would be cleaner to change that method to `reset(GstBin *parent, bool isVideo)` fmopv.
> 
> But there's not always a parent. In some cases the element is not in any
> bin. And this argument would always be the same GST_BIN_CAST(self). I don't
> see how that's cleaner :)
> Also the isVideo thing should be reworked at some point, but I didn't want
> this patch to grow too much...

Well, conceptually this is the parent removing its child, not the child removing itself from its parent. Not a big deal
Comment 11 Xabier Rodríguez Calvar 2020-05-14 04:42:56 PDT
Comment on attachment 399120 [details]
Patch

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

>>> Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:591
>>> +    GRefPtr<GstElement> src = gst_element_factory_make("appsrc", nullptr);
>> 
>> This `ref_sink` now?
> 
> Yes, through template <> GstElement* refGPtr<GstElement>() (AFAIK)

Yes, it is correct and this inconsistency between floating/full and not adopting/adopting is something I wanted to change since ages.
Comment 12 EWS 2020-05-14 05:07:22 PDT
Committed r261685: <https://trac.webkit.org/changeset/261685>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 399120 [details].
Comment 13 Radar WebKit Bug Importer 2020-05-14 05:08:16 PDT
<rdar://problem/63223973>
Comment 14 Diego Pino 2020-05-15 02:58:22 PDT
The test is still a flaky crash. These are the results of the test for GTK test bot after the patch landed (r261684):

[r261685-r261686]             UNKNOWN
r261687                       CRASH (Expected: PASS)
[r261688-r261692]             UNKNOWN
r261693                       NOERROR
[r261694-r261701]             UNKNOWN
r261702                       CRASH (Expected: PASS)
[r261703-r261716]             UNKNOWN
r261717                       CRASH (Expected: PASS)
[r261718-r261726]             UNKNOWN
r261727                       NOERROR
r261728                       UNKNOWN
[r261729-r261730]             CRASH (Expected: PASS)

See: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r261717%20(13728)/webrtc/disable-encryption-crash-log.txt

Thread 1 (Thread 0x7fafac6222c0 (LWP 98327)):
#0  0x00007fafae864ee5 in _g_log_abort (breakpoint=1) at ../glib/gmessages.c:554
#1  0x00007fafae8661c9 in g_logv (log_domain=0x7fafaf1e35e0 <g_log_domain_gstreamer> "GStreamer", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffdae8f0380) at ../glib/gmessages.c:1373
#2  0x00007fafae866393 in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at ../glib/gmessages.c:1415
#3  0x00007fafae94fcf3 in g_object_unref (_object=<optimized out>) at ../gobject/gobject.c:3461
#4  0x00007fafae94fcf3 in g_object_unref (_object=0x55e1c9186290) at ../gobject/gobject.c:3391
#5  0x00007fafaf1373b5 in gst_object_unref (object=<optimized out>) at ../gst/gstobject.c:266
#6  0x00007fafaf175afa in _gst_message_free (message=0x7fad4c001e10 [GstMessage]) at ../gst/gstmessage.c:212
#7  0x00007fafae85a940 in g_list_foreach (list=<optimized out>, list@entry=0x7fad74015d80 = {...}, func=0x7fafaf14b440 <gst_message_unref>, user_data=user_data@entry=0x0) at ../glib/glist.c:1085
#8  0x00007fafae85a96f in g_list_free_full (list=0x7fad74015d80 = {...}, free_func=<optimized out>) at ../glib/glist.c:239
#9  0x00007fafaf14c757 in gst_bus_set_flushing (bus=<optimized out>, flushing=<optimized out>) at ../gst/gstbus.c:476
#10 0x00007fafaf18ceed in gst_pipeline_change_state (element=0x55e1c9111090 [GstPlayBin3|mediastream-5], transition=<optimized out>) at ../gst/gstpipeline.c:545
#11 0x00007faf5076412c in gst_play_bin3_change_state (element=0x55e1c9111090 [GstPlayBin3|mediastream-5], transition=GST_STATE_CHANGE_READY_TO_NULL) at ../gst/playback/gstplaybin3.c:4943
#12 0x00007fafaf1653f2 in gst_element_change_state (element=element@entry=0x55e1c9111090 [GstPlayBin3|mediastream-5], transition=GST_STATE_CHANGE_READY_TO_NULL) at ../gst/gstelement.c:2952
#13 0x00007fafaf165e28 in gst_element_continue_state (element=element@entry=0x55e1c9111090 [GstPlayBin3|mediastream-5], ret=ret@entry=GST_STATE_CHANGE_SUCCESS) at ../gst/gstelement.c:2660
#14 0x00007fafaf16543b in gst_element_change_state (element=element@entry=0x55e1c9111090 [GstPlayBin3|mediastream-5], transition=transition@entry=GST_STATE_CHANGE_PAUSED_TO_READY) at ../gst/gstelement.c:2991
#15 0x00007fafaf165b39 in gst_element_set_state_func (element=0x55e1c9111090 [GstPlayBin3|mediastream-5], state=GST_STATE_NULL) at ../gst/gstelement.c:2906
#16 0x00007fafb75a1080 in WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#17 0x00007fafb75a1cd9 in WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#18 0x00007fafb6e2aba8 in WebCore::MediaPlayer::~MediaPlayer() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#19 0x00007fafb6e2ac39 in WebCore::MediaPlayer::~MediaPlayer() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#20 0x00007fafb68cd646 in WebCore::HTMLMediaElement::clearMediaPlayer() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#21 0x00007fafb68cd710 in WebCore::HTMLMediaElement::userCancelledLoad() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#22 0x00007fafb68cd931 in WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#23 0x00007fafb68cddba in non-virtual thunk to WebCore::HTMLMediaElement::stop() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#24 0x00007fafb66f9f3d in WTF::Detail::CallableWrapper<WebCore::ScriptExecutionContext::stopActiveDOMObjects()::{lambda(auto:1&)#1}, WebCore::ScriptExecutionContext::ShouldContinue, WebCore::ActiveDOMObject&>::call(WebCore::ActiveDOMObject) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#25 0x00007fafb67021b6 in WebCore::ScriptExecutionContext::forEachActiveDOMObject(WTF::Function<WebCore::ScriptExecutionContext::ShouldContinue (WebCore::ActiveDOMObject&)> const&) const () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#26 0x00007fafb6702372 in WebCore::ScriptExecutionContext::stopActiveDOMObjects() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#27 0x00007fafb6643397 in WebCore::Document::stopActiveDOMObjects() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#28 0x00007fafb665df56 in WebCore::Document::commonTeardown() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#29 0x00007fafb6667cb6 in WebCore::Document::willBeRemovedFromFrame() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#30 0x00007fafb6c60644 in WebCore::Frame::setView(WTF::RefPtr<WebCore::FrameView, WTF::DumbPtrTraits<WebCore::FrameView> >&&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#31 0x00007fafb6c7786c in WebCore::Frame::createView(WebCore::IntSize const&, WTF::Optional<WebCore::Color> const&, WebCore::IntSize const&, WebCore::IntRect const&, bool, WebCore::ScrollbarMode, bool, WebCore::ScrollbarMode, bool) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#32 0x00007fafb5883bbd in WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#33 0x00007fafb6b67e15 in WebCore::FrameLoader::transitionToCommitted(WebCore::CachedPage*) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#34 0x00007fafb6b67ff1 in WebCore::FrameLoader::commitProvisionalLoad() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#35 0x00007fafb6b31074 in WebCore::DocumentLoader::finishedLoading() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#36 0x00007fafb6b340ba in WebCore::DocumentLoader::maybeLoadEmpty() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#37 0x00007fafb6b345d4 in WebCore::DocumentLoader::startLoadingMainResource() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#38 0x00007fafb6b52c2b in WTF::Detail::CallableWrapper<WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WebCore::FormState*, WebCore::NavigationPolicyDecision, WebCore::AllowNavigationToInvalidURL)::{lambda()#1}, void>::call() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#39 0x00007fafb6b690b3 in WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WebCore::FormState*, WebCore::NavigationPolicyDecision, WebCore::AllowNavigationToInvalidURL) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#40 0x00007fafb6b70623 in WTF::Detail::CallableWrapper<WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WebCore::AllowNavigationToInvalidURL, WTF::CompletionHandler<void ()>&&)::{lambda(WebCore::ResourceRequest const&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::NavigationPolicyDecision)#2}, void, WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::NavigationPolicyDecision>::call(WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WebCore::AllowNavigationToInvalidURL, WTF::CompletionHandler<void ()>&&)::{lambda(WebCore::ResourceRequest const&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::NavigationPolicyDecision)#2}, WTF::WeakPtr<WebCore::FormState>&&, WebCore::NavigationPolicyDecision) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#41 0x00007fafb6b8314d in WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WebCore::DocumentLoader*, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::NavigationPolicyDecision)>&&, WebCore::PolicyDecisionMode)::{lambda(WebCore::PolicyAction, WebCore::PolicyCheckIdentifier)#1}::operator()(WebCore::PolicyAction, WebCore::PolicyCheckIdentifier) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#42 0x00007fafb5892f8c in WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(WebCore::NavigationAction const&, WebCore::ResourceRequest const&, WebCore::ResourceResponse const&, WebCore::FormState*, WebCore::PolicyDecisionMode, WebCore::PolicyCheckIdentifier, WTF::Function<void (WebCore::PolicyAction, WebCore::PolicyCheckIdentifier)>&&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#43 0x00007fafb6b8937d in WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WebCore::DocumentLoader*, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::NavigationPolicyDecision)>&&, WebCore::PolicyDecisionMode) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#44 0x00007fafb6b69a70 in WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WebCore::AllowNavigationToInvalidURL, WTF::CompletionHandler<void ()>&&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#45 0x00007fafb6b6cc67 in WebCore::FrameLoader::load(WebCore::DocumentLoader&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#46 0x00007fafb6b6db3e in WebCore::FrameLoader::load(WebCore::FrameLoadRequest&&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#47 0x00007fafb58b392b in WebKit::WebPage::loadRequest(WebKit::LoadParameters&&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#48 0x00007fafb52ad60a in void IPC::handleMessage<Messages::WebPage::LoadRequest, WebKit::WebPage, void (WebKit::WebPage::*)(WebKit::LoadParameters&&)>(IPC::Decoder&, WebKit::WebPage*, void (WebKit::WebPage::*)(WebKit::LoadParameters&&)) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#49 0x00007fafb529c0bc in WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#50 0x00007fafb5432a60 in IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#51 0x00007fafb56fb577 in WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#52 0x00007fafb542b7a8 in IPC::Connection::dispatchMessage(IPC::Decoder&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#53 0x00007fafb542d2ad in IPC::Connection::dispatchMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#54 0x00007fafb542d98b in IPC::Connection::dispatchOneIncomingMessage() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#55 0x00007fafb2ca0629 in WTF::RunLoop::performWork() () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#56 0x00007fafb2d056b9 in WTF::RunLoop::RunLoop()::{lambda(void*)#1}::_FUN(void*) () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#57 0x00007fafae85ec3e in g_main_dispatch (context=0x55e1c81e7950) at ../glib/gmain.c:3309
#58 0x00007fafae85ec3e in g_main_context_dispatch (context=context@entry=0x55e1c81e7950) at ../glib/gmain.c:3974
#59 0x00007fafae85eff0 in g_main_context_iterate (context=0x55e1c81e7950, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4047
#60 0x00007fafae85f2e3 in g_main_loop_run (loop=0x55e1c8214be0) at ../glib/gmain.c:4241
#61 0x00007fafb2d061c0 in WTF::RunLoop::run() () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#62 0x00007fafb58ee9af in WebKit::WebProcessMain(int, char**) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#63 0x00007fafad495183 in __libc_start_main (main=0x55e1c7615c00 <main>, argc=4, argv=0x7ffdae8f35e8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffdae8f35d8) at ../csu/libc-start.c:308
#64 0x000055e1c7615c8e in _start () at ../sysdeps/x86_64/start.S:120

STDERR: 
STDERR: warning: core file may not match specified executable file.
STDERR: 
STDERR: (WebKitWebProcess:98327): GStreamer-CRITICAL **: 17:06:37.183: 
STDERR: Trying to dispose element appsrc15, but it is in PLAYING instead of the NULL state.
STDERR: You need to explicitly set elements to the NULL state before
STDERR: dropping the final reference, to allow them to clean up.
STDERR: This problem may also be caused by a refcounting bug in the
STDERR: application or some element.
STDERR: 

Perhaps the failure is related to r261683 ([GStreamer] Playbin3 track switch rework), since I see several playbin3 messages in the stacktrace.
Comment 15 Alicia Boya García 2020-05-16 02:53:31 PDT
(In reply to Diego Pino from comment #14)
> Perhaps the failure is related to r261683 ([GStreamer] Playbin3 track switch
> rework), since I see several playbin3 messages in the stacktrace.

I experimented with reverting it but crashes still happened.
Comment 16 Philippe Normand 2020-06-18 00:34:32 PDT
*** Bug 213329 has been marked as a duplicate of this bug. ***
Comment 17 Philippe Normand 2020-06-24 08:06:17 PDT
Created attachment 402650 [details]
Patch
Comment 18 Philippe Normand 2020-06-24 08:07:12 PDT
I can't reproduce this issue, but I uploaded a prospective patch, which I'd like to have run on the bots and see how it goes.
Comment 19 Xabier Rodríguez Calvar 2020-06-24 08:28:35 PDT
Comment on attachment 402650 [details]
Patch

Why would there be anything wrong with the moves? Anyway this patch looks ok.
Comment 20 EWS 2020-06-24 08:36:50 PDT
Committed r263457: <https://trac.webkit.org/changeset/263457>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 402650 [details].
Comment 21 Philippe Normand 2020-06-24 10:57:16 PDT
still floky
Comment 22 Philippe Normand 2020-07-02 07:38:15 PDT
The flaky crash seems gone now, since the mediastreamsrc revamp landed :) https://results.webkit.org/?suite=layout-tests&test=webrtc%2Fdisable-encryption.html
Comment 23 Philippe Normand 2020-07-20 02:36:33 PDT
All four of those are stable pass now:

webkit.org/b/211166 webrtc/disable-encryption.html [ Crash Pass ]
webkit.org/b/211166 webrtc/filtering-ice-candidate-after-reload.html [ Crash Pass ]
webkit.org/b/211166 webrtc/release-after-getting-track.html [ Crash Pass ]
webkit.org/b/211166 webrtc/remove-track.html [ Crash Pass ]

I will update expectations accordingly.
Comment 24 Philippe Normand 2020-07-20 02:40:36 PDT
https://trac.webkit.org/changeset/264594/webkit