GNOME Bugzilla – Bug 795166
Last DTLS handshake packets may not be sent to the wire at all
Last modified: 2018-11-03 14:21:14 UTC
Sometimes FreeStreamer does not send last DTLS handshake packets to the wire at all, and starts sending SRTP/SRTCP. However receiver is not able to decode them, because handshake was not completed. DTLS handshake retry also fails, at least this happened during my tests. I found this when I tested WebRTC connection between GStreamer and FreeSwitch, but this may be a generic problem (not related to WebRTC). Logs and more details are here: https://pastebin.com/E7HiAfd7 https://lists.freedesktop.org/archives/gstreamer-devel/2018-April/067556.html
So do I understand you right that this is a bug elsewhere but GStreamer should handle it more gracefully?
No, bug is in GStreamer itself - it looks that it creates DTLS handshake packets, but for some reason they are not sent to network.
Thread responsible for sending these missing packets is stuck here:
+ Trace 238554
Could you give me some hints how to fix this or if some workaround exists? This bug blocks my work and I am looking for any way to get around it.
gstfunnel.c:325 is taking the stream lock. You have to find which other thread has taken the stream lock and is not releasing it :) There are a few blocking pad probes in there that you might want to watch out for.
Blocked thread is named dtlsenc0:src (in RTP part of pipeline). It is blocked by thread named queue1:src (queue between rtpopuspay and capsfilter). I use following pipeline: webrtcbin name=sendrecv audiotestsrc wave=sine freq=1000 ! queue ! opusenc ! rtpopuspay ! queue ! application/x-rtp,media=audio,encoding-name=OPUS,payload=97 ! sendrecv. Queue thread is waiting on ppoll():
+ Trace 238560
Looks that DTLS thread gets starved with default thread scheduling/priority config. I have updated app to set FIFO realtime scheduler and priority 1 for threads, and everything started working smoothly.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/687.