Summary: | [GStreamer] webrtc/disable-encryption.html is a crashing flaky | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Diego Pino <dpino> | ||||||||||
Component: | WebRTC | Assignee: | Philippe Normand <pnormand> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | aboya, calvaris, eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, pnormand, sergio, tommyw, tsaunier, vjaquez, webkit-bug-importer, youennf | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Diego Pino
2020-04-28 23:45:16 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. I may have a patch. Checking the tests now... Created attachment 399109 [details]
Patch
Issue still reproduces on Debug... I'll check. Created attachment 399112 [details]
Patch
Created attachment 399120 [details]
Patch
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 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 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... (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 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. Committed r261685: <https://trac.webkit.org/changeset/261685> All reviewed patches have been landed. Closing bug and clearing flags on attachment 399120 [details]. 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. (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. *** Bug 213329 has been marked as a duplicate of this bug. *** Created attachment 402650 [details]
Patch
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 on attachment 402650 [details]
Patch
Why would there be anything wrong with the moves? Anyway this patch looks ok.
Committed r263457: <https://trac.webkit.org/changeset/263457> All reviewed patches have been landed. Closing bug and clearing flags on attachment 402650 [details]. still floky The flaky crash seems gone now, since the mediastreamsrc revamp landed :) https://results.webkit.org/?suite=layout-tests&test=webrtc%2Fdisable-encryption.html 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. |