[Webkit-unassigned] [Bug 259504] New: [GStreamer] Web process deadlock when destroying ~MediaPlayerPrivateGStreamer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 25 15:52:54 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=259504

            Bug ID: 259504
           Summary: [GStreamer] Web process deadlock when destroying
                    ~MediaPlayerPrivateGStreamer
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcatanzaro at redhat.com
                CC: bugs-noreply at webkitgtk.org

Created attachment 467118

  --> https://bugs.webkit.org/attachment.cgi?id=467118&action=review

Backtrace

Here's yet another web process crash when the watchdog thread detects the main thread has hung 10 seconds after the UI process connection closed:

Thread 1 (Thread 0x7fe2027f86c0 (LWP 202)):
#0  g_log_structured_array (log_level=<optimized out>, fields=0x7fe2027f76f0, n_fields=3) at ../glib/gmessages.c:555
#1  0x00007fe2d74c16ec in g_log_default_handler (log_domain=log_domain at entry=0x0, log_level=log_level at entry=6, message=message at entry=0x7fe2de9f07f0 "WebProcess didn't exit as expected after the UI process connection was closed", unused_data=unused_data at entry=0x0) at ../glib/gmessages.c:3284
#2  0x00007fe2d0041242 in trap_handler (log_domain=log_domain at entry=0x0, log_level=log_level at entry=6, message=message at entry=0x7fe2de9f07f0 "WebProcess didn't exit as expected after the UI process connection was closed", user_data=user_data at entry=0x0) at ../lib/ephy-debug.c:104
#3  0x00007fe2d74c1996 in g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args at entry=0x7fe2027f7870) at ../glib/gmessages.c:1391
#4  0x00007fe2d74c1c83 in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at ../glib/gmessages.c:1460
#5  0x00007fe2dc547a9d in WebKit::crashAfter10Seconds(IPC::Connection*)::$_0::operator()() const (this=<optimized out>) at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/WebProcess/WebProcess.cpp:282

At the time of the crash, the main thread appears to be deadlocked deep in GStreamer:

Thread 5 (Thread 0x7fe2d383af40 (LWP 2)):
#0  futex_wait (private=0, expected=2, futex_word=0x7fe0f8013170) at ../sysdeps/nptl/futex-internal.h:146
#1  __GI___lll_lock_wait (futex=futex at entry=0x7fe0f8013170, private=0) at lowlevellock.c:49
#2  0x00007fe2db6a5477 in lll_mutex_lock_optimized (mutex=0x7fe0f8013170) at pthread_mutex_lock.c:48
#3  ___pthread_mutex_lock (mutex=0x7fe0f8013170) at pthread_mutex_lock.c:128
#4  0x00007fe2d751634d in g_rec_mutex_lock (mutex=mutex at entry=0x7fe0f801d470) at ../glib/gthread-posix.c:397
#5  0x00007fe2d80bee4a in post_activate (new_mode=<optimized out>, pad=<optimized out>) at ../gst/gstpad.c:1050
#6  activate_mode_internal (pad=pad at entry=0x7fe0f801d400 [GstProxyPad|proxypad92], parent=parent at entry=0x7fe0f801d190 [GstGhostPad|audio_0], mode=mode at entry=GST_PAD_MODE_PUSH, active=active at entry=0) at ../gst/gstpad.c:1228
#7  0x00007fe2d80bfc87 in gst_pad_activate_mode (pad=0x7fe0f801d400 [GstProxyPad|proxypad92], mode=GST_PAD_MODE_PUSH, active=0) at ../gst/gstpad.c:1326
#8  0x00007fe2d80aca39 in gst_ghost_pad_activate_push_default (pad=<optimized out>, parent=<optimized out>, active=0) at ../gst/gstghostpad.c:371
#9  0x00007fe2d80bee07 in activate_mode_internal (pad=pad at entry=0x7fe0f801d190 [GstGhostPad|audio_0], parent=parent at entry=0x560e4f7bea30 [GstURIDecodeBin3|uridecodebin3], mode=mode at entry=GST_PAD_MODE_PUSH, active=active at entry=0) at ../gst/gstpad.c:1221
#10 0x00007fe2d80bf93b in gst_pad_set_active (pad=0x7fe0f801d190 [GstGhostPad|audio_0], active=0) at ../gst/gstpad.c:1119
#11 0x00007fe2d8078f9b in activate_pads (vpad=<optimized out>, ret=0x7ffcb91ec2c0, active=0x7ffcb91ec2bc) at ../gst/gstbin.c:2630
#12 0x00007fe2d80b0b15 in gst_iterator_fold (it=0x560e4f769db0, func=0x7fe2d8078f70 <activate_pads>, ret=0x7ffcb91ec2c0, user_data=0x7ffcb91ec2bc) at ../gst/gstiterator.c:617
#13 0x00007fe2d80790b0 in iterator_activate_fold_with_resync (user_data=0x7ffcb91ec2bc, iter=0x560e4f769db0) at ../gst/gstbin.c:2653
#14 gst_bin_src_pads_activate (bin=bin at entry=0x560e4f7bea30 [GstURIDecodeBin3|uridecodebin3], active=<optimized out>, active at entry=0) at ../gst/gstbin.c:2687
#15 0x00007fe2d807a88c in gst_bin_change_state_func (element=0x560e4f7bea30 [GstURIDecodeBin3|uridecodebin3], transition=GST_STATE_CHANGE_PAUSED_TO_READY) at ../gst/gstbin.c:2881
#16 0x00007fe24fb98fa3 in gst_uri_decode_bin3_change_state (element=0x560e4f7bea30 [GstURIDecodeBin3|uridecodebin3], transition=<optimized out>) at ../gst/playback/gsturidecodebin3.c:1990
#17 0x00007fe2d80a25c4 in gst_element_change_state (element=element at entry=0x560e4f7bea30 [GstURIDecodeBin3|uridecodebin3], transition=transition at entry=GST_STATE_CHANGE_PAUSED_TO_READY) at ../gst/gstelement.c:3093
#18 0x00007fe2d80a2b79 in gst_element_set_state_func (element=0x560e4f7bea30 [GstURIDecodeBin3|uridecodebin3], state=GST_STATE_READY) at ../gst/gstelement.c:3047
#19 0x00007fe2d807adb8 in gst_bin_element_set_state (next=<optimized out>, current=<optimized out>, start_time=0 [0:00:00.000000000], base_time=0 [0:00:00.000000000], element=0x560e4f7bea30 [GstURIDecodeBin3|uridecodebin3], bin=<optimized out>) at ../gst/gstbin.c:2582
#20 gst_bin_change_state_func (element=0x560e4f7bde10 [GstPlayBin3|MSE-ndp_video_player_1690325110275-5], transition=GST_STATE_CHANGE_PAUSED_TO_READY) at ../gst/gstbin.c:2931
#21 0x00007fe24fbbd059 in gst_play_bin3_change_state (element=0x560e4f7bde10 [GstPlayBin3|MSE-ndp_video_player_1690325110275-5], transition=GST_STATE_CHANGE_PAUSED_TO_READY) at ../gst/playback/gstplaybin3.c:2701
#22 0x00007fe2d80a25c4 in gst_element_change_state (element=element at entry=0x560e4f7bde10 [GstPlayBin3|MSE-ndp_video_player_1690325110275-5], transition=transition at entry=GST_STATE_CHANGE_PAUSED_TO_READY) at ../gst/gstelement.c:3093
#23 0x00007fe2d80a2b79 in gst_element_set_state_func (element=0x560e4f7bde10 [GstPlayBin3|MSE-ndp_video_player_1690325110275-5], state=GST_STATE_NULL) at ../gst/gstelement.c:3047
#24 0x00007fe2ddf0aefb in WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer() (this=0x7fe209d2de80) at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:247

All-threads backtrace is attached. The other relevant threads are thread 26 and thread 36.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230725/0c4b930c/attachment-0001.htm>


More information about the webkit-unassigned mailing list