Bug 252270

Summary: [GStreamer] Unresponsive web process when playing HLS video, hang when calling gst_pad_set_active?
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: MediaAssignee: Philippe Normand <philn>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, mcatanzaro, philn, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
All-threads backtrace none

Description Michael Catanzaro 2023-02-14 15:13:13 PST
Created attachment 464990 [details]
All-threads backtrace

Today when trying to take a debug log for bug #252266, I noticed the crash we added in bug #249272 to catch unresponsive web processes that fail to quit within 10 seconds of UI process termination. (This is the first time I've noticed this happen since bug #247057 was fixed.) Probably it is deadlocked, although we can only be certain that it's failing to continue iterating main thread runloop. Presumably this happened when playing reddit video.

I'm attaching a backtrace showing all threads. Every interesting thread is doing something with GStreamer. Notably, there are five different threads running GstHLSDemux, although HLS is supposed to be disabled!

I think the main thread is thread 31, which seems to have got stuck when calling gst_pad_set_active() inside the MediaPlayerPrivateGStreamer destructor.
Comment 1 Philippe Normand 2023-02-15 07:57:23 PST
> Notably, there are five different threads running GstHLSDemux, although HLS is supposed to be disabled!

I suspect this website just loaded an HLS playlist in a media element without even checking it's supported... I think we'll just need to set the hlsdemux rank to NONE so that it's no longer auto-plugged...
Comment 2 Philippe Normand 2023-02-15 08:22:11 PST
Pull request: https://github.com/WebKit/WebKit/pull/10147
Comment 3 EWS 2023-02-16 05:44:56 PST
Committed 260362@main (e3f0ed64c816): <https://commits.webkit.org/260362@main>

Reviewed commits have been landed. Closing PR #10147 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2023-02-16 05:45:20 PST
<rdar://problem/105545361>