[webkit-changes] [WebKit/WebKit] 53e6c2: [GStreamer][WebRTC] Deadlock when closing PeerConn...

Philippe Normand noreply at github.com
Wed May 3 03:02:51 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 53e6c2557ae992b7f08012d57473b1a9640b4f84
      https://github.com/WebKit/WebKit/commit/53e6c2557ae992b7f08012d57473b1a9640b4f84
  Author: Philippe Normand <philn at igalia.com>
  Date:   2023-05-03 (Wed, 03 May 2023)

  Changed paths:
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerDtlsTransportBackend.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerDtlsTransportBackend.h
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerIceTransportBackend.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerIceTransportBackend.h
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerRtpReceiverBackend.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerRtpSenderBackend.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerSctpTransportBackend.cpp
    M Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.cpp

  Log Message:
  -----------
  [GStreamer][WebRTC] Deadlock when closing PeerConnection
https://bugs.webkit.org/show_bug.cgi?id=256161

Reviewed by Xabier Rodriguez-Calvar.

The main issue here was that the end-point closing from the main thread ends up waiting on the dtls
decoder sink pad to unlock its stream lock that has been locked by the DtlsTransportBackend, also from
the main thread and blocking.

This patch also aligns the DtlsTransportBackend GStreamer implementation a bit more with the
libwebrtc one and makes GstWebRTCDTLSTransport pointers ownership more explicit.

Also while debugging this I noticed outgoing sources kept being notified of buffers even after
shutdown, they weren't stopped from the source destructor.

* Source/WebCore/Modules/mediastream/gstreamer/GStreamerDtlsTransportBackend.cpp:
(WebCore::GStreamerDtlsTransportBackend::stateChanged const):
* Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingMediaSourceGStreamer.cpp:
(WebCore::RealtimeOutgoingMediaSourceGStreamer::~RealtimeOutgoingMediaSourceGStreamer):

Canonical link: https://commits.webkit.org/263627@main




More information about the webkit-changes mailing list