Bug 258132
| Summary: | [GStreamer] MediaPlayerPrivateGStreamer::sourceSetup() can be called from a non-main thread in some cases | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Alicia Boya García <aboya> |
| Component: | WebKitGTK | Assignee: | Philippe Normand <philn> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bugs-noreply, philn |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Alicia Boya García
Reproducible in Debug with http/tests/media/video-cross-site.html:
ASSERTION FAILED: !m_impl || !m_shouldEnableAssertions || Thread::mayBeGCThread() || m_impl->wasConstructedOnMainThread() == isMainThread()
#0 0x00007f20a70be1fe in WTFCrash() () at /app/webkit/Source/WTF/wtf/Assertions.cpp:327
#1 0x00007f20aec1395b in WTFCrashWithInfo(int, char const*, char const*, int) () at WTF/Headers/wtf/Assertions.h:762
#2 0x00007f20b0925f87 in WTF::WeakPtr<WebCore::MediaPlayer, WTF::DefaultWeakPtrImpl>::get() const (this=0x7f2093125c40) at WTF/Headers/wtf/WeakPtr.h:126
#3 0x00007f20b0908603 in WebCore::MediaPlayerPrivateGStreamer::sourceSetup(_GstElement*) (this=0x7f2093125c00, sourceElement=0x7f05fc0389e0) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:891
#4 0x00007f20b0908781 in WebCore::MediaPlayerPrivateGStreamer::sourceSetupCallback(WebCore::MediaPlayerPrivateGStreamer*, _GstElement*) (player=0x7f2093125c00, sourceElement=0x7f05fc0389e0) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:903
#5 0x00007f20a35b27d7 in g_cclosure_marshal_VOID__OBJECTv (closure=0x265cab0, return_value=<optimized out>, instance=0x265bcf0, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=<optimized out>) at ../gobject/gmarshal.c:1910
#6 0x00007f20a35d2480 in _g_closure_invoke_va (param_types=<optimized out>, n_params=<optimized out>, args=0x7f071d7f8020, instance=0x265bcf0, return_value=<optimized out>, closure=0x265cab0) at ../gobject/gclosure.c:893
#7 g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7f071d7f8020) at ../gobject/gsignal.c:3440
#8 0x00007f20a35d25b3 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../gobject/gsignal.c:3587
#9 0x00007f205032ce26 in source_setup_cb (uridecodebin=0x7f05e002d140, source=0x7f05fc0389e0, group=0x265beb8) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gst-plugins-base/gst/playback/gstplaybin2.c:5245
#10 0x00007f20a35b27d7 in g_cclosure_marshal_VOID__OBJECTv (closure=0x7f05fc023af0, return_value=<optimized out>, instance=0x7f05e002d140, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=<optimized out>) at ../gobject/gmarshal.c:1910
#11 0x00007f20a35d2480 in _g_closure_invoke_va (param_types=<optimized out>, n_params=<optimized out>, args=0x7f071d7f8310, instance=0x7f05e002d140, return_value=<optimized out>, closure=0x7f05fc023af0) at ../gobject/gclosure.c:893
#12 g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7f071d7f8310) at ../gobject/gsignal.c:3440
#13 0x00007f20a35d25b3 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../gobject/gsignal.c:3587
#14 0x00007f20502fadbb in gen_source_element (decoder=0x7f05e002d140) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gst-plugins-base/gst/playback/gsturidecodebin.c:1433
#15 0x00007f20502f9a7e in setup_source (decoder=0x7f05e002d140) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gst-plugins-base/gst/playback/gsturidecodebin.c:2285
#16 0x00007f20502f8132 in gst_uri_decode_bin_change_state (element=0x7f05e002d140, transition=GST_STATE_CHANGE_READY_TO_PAUSED) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gst-plugins-base/gst/playback/gsturidecodebin.c:2920
#17 0x00007f20a01c9c53 in gst_element_change_state (element=0x7f05e002d140, transition=GST_STATE_CHANGE_READY_TO_PAUSED) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstelement.c:3101
#18 0x00007f20a01c9950 in gst_element_continue_state (element=0x7f05e002d140, ret=GST_STATE_CHANGE_SUCCESS) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstelement.c:2809
#19 0x00007f20a01c9fe0 in gst_element_change_state (element=0x7f05e002d140, transition=GST_STATE_CHANGE_NULL_TO_READY) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstelement.c:3140
#20 0x00007f20a01cc545 in gst_element_set_state_func (element=0x7f05e002d140, state=GST_STATE_PAUSED) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstelement.c:3055
#21 0x00007f20a01c92d2 in gst_element_set_state (element=0x7f05e002d140, state=GST_STATE_PAUSED) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstelement.c:2956
#22 0x00007f2050329b33 in activate_group (playbin=0x265bcf0, group=0x265beb8, target=GST_STATE_PAUSED) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gst-plugins-base/gst/playback/gstplaybin2.c:5490
#23 0x00007f20503280ee in setup_next_source (playbin=0x265bcf0, target=GST_STATE_PAUSED) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gst-plugins-base/gst/playback/gstplaybin2.c:5715
#24 0x00007f2050325eb7 in gst_play_bin_handle_message (bin=0x265bcf0, msg=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gst-plugins-base/gst/playback/gstplaybin2.c:3038
#25 0x00007f20a0197bc6 in bin_bus_handler (bus=0x22861e0, message=0x7f05fc013f40 [None], bin=0x265bcf0) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstbin.c:3263
#26 0x00007f20a01a37aa in gst_bus_post (bus=0x22861e0, message=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstbus.c:357
#27 0x00007f20a01cd3f1 in gst_element_post_message_default (element=0x230a290, message=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstelement.c:2127
#28 0x00007f20a018eff8 in gst_bin_post_message (element=0x230a290, msg=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstbin.c:2789
#29 0x00007f20a01c83e9 in gst_element_post_message (element=0x230a290, message=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstelement.c:2170
#30 0x00007f20a0192a46 in gst_bin_handle_message_func (bin=0x230a290, message=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstbin.c:4041
#31 0x00007f20502f866f in handle_message (bin=0x230a290, msg=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gst-plugins-base/gst/playback/gsturidecodebin.c:2614
#32 0x00007f20a0197bc6 in bin_bus_handler (bus=0x1faaf30, message=0x7f05fc013f40 [None], bin=0x230a290) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstbin.c:3263
#33 0x00007f20a01a37aa in gst_bus_post (bus=0x1faaf30, message=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstbus.c:357
#34 0x00007f20a01cd3f1 in gst_element_post_message_default (element=0x22bb2b0, message=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstelement.c:2127
#35 0x00007f20a018eff8 in gst_bin_post_message (element=0x22bb2b0, msg=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstbin.c:2789
#36 0x00007f20a01c83e9 in gst_element_post_message (element=0x22bb2b0, message=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstelement.c:2170
#37 0x00007f20a0192a46 in gst_bin_handle_message_func (bin=0x22bb2b0, message=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstbin.c:4041
#38 0x00007f20502d4215 in gst_decode_bin_handle_message (bin=0x22bb2b0, msg=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gst-plugins-base/gst/playback/gstdecodebin2.c:5653
#39 0x00007f20a0197bc6 in bin_bus_handler (bus=0x2385aa0, message=0x7f05fc013f40 [None], bin=0x22bb2b0) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstbin.c:3263
#40 0x00007f20a01a37aa in gst_bus_post (bus=0x2385aa0, message=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstbus.c:357
#41 0x00007f20a01cd3f1 in gst_element_post_message_default (element=0x7f05ec086ab0, message=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstelement.c:2127
#42 0x00007f20a01c83e9 in gst_element_post_message (element=0x7f05ec086ab0, message=0x7f05fc013f40 [None]) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstelement.c:2170
#43 0x00007f20a01c8a27 in gst_element_message_full_with_details (element=0x7f05ec086ab0, type=GST_MESSAGE_ERROR, domain=3860, code=9, text=0x7f05fc01c860 "This file contains no playable streams.", debug=0x7f05fc01c8c0 "\214\337^\f\002\177", file=0x7f202c403403 "../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c", function=0x7f202c40a9af "gst_qtdemux_post_no_playable_stream_error", line=510, structure=0x7f05fc01ee30) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gstelement.c:2306
#44 0x00007f202c37cbdc in gst_qtdemux_post_no_playable_stream_error (qtdemux=0x7f05ec086ab0) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c:507
#45 0x00007f202c377d9c in gst_qtdemux_loop (pad=0x7f05e00965c0) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c:7353
#46 0x00007f20a024bca5 in gst_task_func (task=0x1e9e710) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gsttask.c:384
#47 0x00007f20a024ccda in default_func (tdata=0x7f05e00714c0, pool=0x262b900) at ../../Tools/flatpak/local-projects/subprojects/gstreamer-full/subprojects/gstreamer/gst/gsttaskpool.c:70
#48 0x00007f20a1353692 in g_thread_pool_thread_proxy (data=<optimized out>) at ../glib/gthreadpool.c:350
#49 0x00007f20a1350722 in g_thread_proxy (data=0x7f05ec00c0c0) at ../glib/gthread.c:827
#50 0x00007f20a088f1da in start_thread (arg=<optimized out>) at pthread_create.c:442
#51 0x00007f20a0917f44 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Philippe Normand
Looking at the trace, might be fixed by the patch in bug 258129.
Philippe Normand
(In reply to Philippe Normand from comment #1)
> Looking at the trace, might be fixed by the patch in bug 258129.
Nope. New trace is:
(gdb) bt
#0 0x00007f0b723518ee in WTFCrash() () at /var/home/phil/WebKit/Source/WTF/wtf/Assertions.cpp:327
#1 0x00007f0b758d0e2b in WTFCrashWithInfo(int, char const*, char const*, int) () at WTF/Headers/wtf/Assertions.h:762
#2 0x00007f0b7accae9b in WTF::WeakPtr<WebCore::MediaPlayer, WTF::DefaultWeakPtrImpl>::operator->() const (this=0x7f0b5e520140) at WTF/Headers/wtf/WeakPtr.h:138
#3 0x00007f0b7af776b4 in WebCore::MediaPlayerPrivateGStreamer::sourceSetup(_GstElement*) (this=0x7f0b5e520100, sourceElement=0x7f098c008760)
at /var/home/phil/WebKit/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:883
#4 0x00007f0b7af77841 in WebCore::MediaPlayerPrivateGStreamer::sourceSetupCallback(WebCore::MediaPlayerPrivateGStreamer*, _GstElement*) (player=0x7f0b5e520100, sourceElement=0x7f098c008760)
at /var/home/phil/WebKit/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:896
#5 0x00007f0b741d3e27 in g_cclosure_marshal_VOID__OBJECTv
(closure=0x1e5bda0, return_value=<optimized out>, instance=0x1e58480, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x1e53030) at ../gobject/gmarshal.c:1910
#6 0x00007f0b741f3608 in _g_closure_invoke_va (param_types=0x1e53030, n_params=<optimized out>, args=0x7f099cfadd50, instance=0x1e58480, return_value=0x0, closure=0x1e5bda0) at ../gobject/gclosure.c:895
#7 g_signal_emit_valist (instance=0x1e58480, signal_id=249, detail=0, var_args=var_args@entry=0x7f099cfadd50) at ../gobject/gsignal.c:3462
#8 0x00007f0b741f36f3 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../gobject/gsignal.c:3612
#9 0x00007f0b741d3e27 in g_cclosure_marshal_VOID__OBJECTv
(closure=0x7f098c007b10, return_value=<optimized out>, instance=0x7f098c0074d0, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x1e966b0)
at ../gobject/gmarshal.c:1910
#10 0x00007f0b741f3608 in _g_closure_invoke_va (param_types=0x1e966b0, n_params=<optimized out>, args=0x7f099cfae010, instance=0x7f098c0074d0, return_value=0x0, closure=0x7f098c007b10)
at ../gobject/gclosure.c:895
#11 g_signal_emit_valist (instance=0x7f098c0074d0, signal_id=271, detail=0, var_args=var_args@entry=0x7f099cfae010) at ../gobject/gsignal.c:3462
#12 0x00007f0b741f36f3 in g_signal_emit (instance=instance@entry=0x7f098c0074d0, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3612
#13 0x00007f09fc04928a in gen_source_element (decoder=0x7f098c0074d0) at ../gst/playback/gsturidecodebin.c:1433
#14 setup_source (decoder=<optimized out>) at ../gst/playback/gsturidecodebin.c:2285
#15 gst_uri_decode_bin_change_state (element=0x7f098c0074d0, transition=<optimized out>) at ../gst/playback/gsturidecodebin.c:2920
#16 0x00007f0b6c9ba5b4 in gst_element_change_state (element=element@entry=0x7f098c0074d0, transition=GST_STATE_CHANGE_READY_TO_PAUSED) at ../gst/gstelement.c:3093
#17 0x00007f0b6c9ba361 in gst_element_continue_state (element=element@entry=0x7f098c0074d0, ret=ret@entry=GST_STATE_CHANGE_SUCCESS) at ../gst/gstelement.c:2801
#18 0x00007f0b6c9ba5f8 in gst_element_change_state (element=element@entry=0x7f098c0074d0, transition=transition@entry=GST_STATE_CHANGE_NULL_TO_READY) at ../gst/gstelement.c:3132
#19 0x00007f0b6c9bab69 in gst_element_set_state_func (element=0x7f098c0074d0, state=GST_STATE_PAUSED) at ../gst/gstelement.c:3047
#20 0x00007f09fc083a24 in activate_group (target=GST_STATE_PAUSED, group=0x1e58648, playbin=0x1e58480) at ../gst/playback/gstplaybin2.c:5490
#21 setup_next_source.constprop.0 (playbin=0x1e58480, target=<optimized out>) at ../gst/playback/gstplaybin2.c:5715
#22 0x00007f09fc06322c in gst_play_bin_handle_message (bin=0x1e58480, msg=0x7f098c002480 [None]) at ../gst/playback/gstplaybin2.c:3038
#23 0x00007f0b6c98992c in bin_bus_handler (bus=<optimized out>, message=<optimized out>, bin=<optimized out>) at ../gst/gstbin.c:3260
#24 0x00007f0b6c9a0d9b in gst_bus_post (bus=0x185d080, message=0x7f098c002480 [None]) at ../gst/gstbus.c:357
#25 0x00007f0b6c9b5427 in gst_element_post_message_default (element=element@entry=0x1e96010, message=0x7f098c002480 [None]) at ../gst/gstelement.c:2127
#26 0x00007f0b6c993ee3 in gst_bin_post_message (element=0x1e96010, msg=0x7f098c002480 [None]) at ../gst/gstbin.c:2789
#27 0x00007f0b6c9b28e7 in gst_element_post_message (element=0x1e96010, message=0x7f098c002480 [None]) at ../gst/gstelement.c:2170
#28 0x00007f0b6c98992c in bin_bus_handler (bus=<optimized out>, message=<optimized out>, bin=<optimized out>) at ../gst/gstbin.c:3260
#29 0x00007f0b6c9a0d9b in gst_bus_post (bus=0x1e962a0, message=0x7f098c002480 [None]) at ../gst/gstbus.c:357
#30 0x00007f0b6c9b5427 in gst_element_post_message_default (element=element@entry=0x7f09c8007060, message=0x7f098c002480 [None]) at ../gst/gstelement.c:2127
#31 0x00007f0b6c993ee3 in gst_bin_post_message (element=0x7f09c8007060, msg=0x7f098c002480 [None]) at ../gst/gstbin.c:2789
#32 0x00007f0b6c9b28e7 in gst_element_post_message (element=0x7f09c8007060, message=0x7f098c002480 [None]) at ../gst/gstelement.c:2170
#33 0x00007f09fc023e30 in gst_decode_bin_handle_message (bin=0x7f09c8007060, msg=<optimized out>) at ../gst/playback/gstdecodebin2.c:5653
#34 0x00007f0b6c98992c in bin_bus_handler (bus=<optimized out>, message=<optimized out>, bin=<optimized out>) at ../gst/gstbin.c:3260
#35 0x00007f0b6c9a0d9b in gst_bus_post (bus=0x7f09c8007380, message=0x7f098c002480 [None]) at ../gst/gstbus.c:357
#36 0x00007f0b6c9b5427 in gst_element_post_message_default (element=0x7f0998275270, message=0x7f098c002480 [None]) at ../gst/gstelement.c:2127
#37 0x00007f0b6c9b28e7 in gst_element_post_message (element=element@entry=0x7f0998275270, message=0x7f098c002480 [None]) at ../gst/gstelement.c:2170
#38 0x00007f0b6c9b9d43 in gst_element_message_full_with_details
(element=0x7f0998275270, type=GST_MESSAGE_ERROR, domain=4835, code=9, text=<optimized out>, debug=<optimized out>, file=0x7f099d0322b4 "../gst/isomp4/qtdemux.c", function=0x7f099d035bc0 <__func__.97> "gst_qtde
mux_post_no_playable_stream_error", line=504, structure=0x7f098c001ed0) at ../gst/gstelement.c:2306
#39 0x00007f099cfd5d25 in gst_qtdemux_post_no_playable_stream_error (qtdemux=0x7f0998275270) at ../gst/isomp4/qtdemux.c:504
#40 0x00007f099cfe4dfe in gst_qtdemux_loop (pad=<optimized out>) at ../gst/isomp4/qtdemux.c:6918
#41 0x00007f0b6ca14ee4 in gst_task_func (task=0x7f09980012f0) at ../gst/gsttask.c:384
#42 0x00007f0b6d85db02 in g_thread_pool_thread_proxy (data=<optimized out>) at ../glib/gthreadpool.c:350
#43 0x00007f0b6d85b373 in g_thread_proxy (data=0x7f09d80011b0) at ../glib/gthread.c:831
#44 0x00007f0b6d262c57 in start_thread (arg=<optimized out>) at pthread_create.c:444
#45 0x00007f0b6d2e8a70 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Philippe Normand
Pull request: https://github.com/WebKit/WebKit/pull/15057
EWS
Committed 265298@main (d39df7316b4a): <https://commits.webkit.org/265298@main>
Reviewed commits have been landed. Closing PR #15057 and removing active labels.