Bug 240661 - [GStreamer] REGRESSION(r288092): Deadlock when the playback is stopping just right after startup
Summary: [GStreamer] REGRESSION(r288092): Deadlock when the playback is stopping just ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-19 09:43 PDT by Yacine Bandou
Modified: 2022-05-20 01:48 PDT (History)
3 users (show)

See Also:


Attachments
Patch (9.58 KB, patch)
2022-05-19 09:57 PDT, Yacine Bandou
no flags Details | Formatted Diff | Diff
Patch (11.36 KB, patch)
2022-05-19 10:15 PDT, Yacine Bandou
no flags Details | Formatted Diff | Diff
Patch (9.16 KB, patch)
2022-05-19 14:32 PDT, Yacine Bandou
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>