Bug 240661

Summary: [GStreamer] REGRESSION(r288092): Deadlock when the playback is stopping just right after startup
Product: WebKit Reporter: Yacine Bandou <bandou.yacine>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: olivier.blin, pnormand, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Yacine Bandou 2022-05-19 09:43:25 PDT
r288092 causes a deadlock with the "28. ChangeType.H264.VP9" test in "https://ytlr-cert.appspot.com/2020/main.html".
    
The background thread locks the GStPad and sends a notify::caps signal which is caught by
VideoTrackPrivateGStreamer that calls callOnMainThreadAndWait.
    
At the same time the main thread destroys MediaPlayerPrivateGStreamer and sets the pipeline to NULL
that calls "gst_pad_set_active" which wants to lock the GStPad.

See https://bugs.webkit.org/show_bug.cgi?id=234084
Comment 1 Yacine Bandou 2022-05-19 09:57:23 PDT
Created attachment 459597 [details]
Patch
Comment 2 Yacine Bandou 2022-05-19 10:15:11 PDT
Created attachment 459598 [details]
Patch
Comment 3 Philippe Normand 2022-05-19 10:39:35 PDT
Comment on attachment 459598 [details]
Patch

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

> Source/WebCore/ChangeLog:1
> +2022-05-19  Yacine Bandou  <yacine.bandou@softathome.com>

We don't use ChangeLogs anymore. Please remove this :)
Comment 4 Yacine Bandou 2022-05-19 14:32:14 PDT
Created attachment 459603 [details]
Patch
Comment 5 EWS 2022-05-20 01:47:15 PDT
Committed r294537 (250792@main): <https://commits.webkit.org/250792@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 459603 [details].
Comment 6 Radar WebKit Bug Importer 2022-05-20 01:48:14 PDT
<rdar://problem/93641733>