Mutex deadlock using gstcefsrc
Steve McFarlin
steve.mcfarlin at hopin.to
Fri Jan 20 22:56:50 UTC 2023
Issue was programmer error, and a little bit of not RTFM. I was setting
pipeline states in gst callbacks.
On Thu, Jan 19, 2023 at 5:18 PM Steve McFarlin <steve.mcfarlin at hopin.to>
wrote:
> Hello All -
>
> I have code equivalent of this gst-launch pipeline
>
> gst-launch-1.0 -e \
> cefsrc url="https://www.youtube.com/watch?v=_3EuiU1qdpE" ! \
> video/x-raw, width=1920, height=1080, framerate=30/1 ! \
> cefdemux name=demux ! queue ! videoconvert ! \
> queue max-size-bytes=0 max-size-buffers=0 max-size-time=3000000000
> ! x264enc ! queue ! \
> mp4mux name=muxer ! filesink location='test.mp4' \
> audiotestsrc do-timestamp=true is-live=true volume=0.0 !
> audiomixer name=mix ! \
> queue max-size-bytes=0 max-size-buffers=0 max-size-time=3000000000
> ! audioconvert ! \
> audiorate ! audioresample ! avenc_aac bitrate=128000 ! queue ! muxer. \
> demux. ! queue ! mix.
>
> If I follow this state path:
>
> NULL -> .. -> Paused -> Playing -> send_event(EOS)
>
> I will enter into a deadlock on the following mutex
>
> **_lldb_unnamed_symbol3461 (@_**lldb*unnamed_symbol3461:19)
> pthread_mutex_lock (@pthread_mutex_lock:106)
> \*\*\_lldb_unnamed_symbol1391 (@***lldb_unnamed_symbol1391:358)
> gst_element_send_event (@gst_element_send_event:38)
> **_lldb_unnamed_symbol3063 (@_\*\*lldb_unnamed_symbol3063:104)
> gst_element_send_event (@gst_element_send_event:38)
> <O as gstreamer::element::ElementExtManual>::send_event
> (cargo/registry/src/github.com-1ecc6299db9ec823/gstreamer-0.19.5/src/
> element.rs:339)
> rendition::recorder::Recorder::stop (/rendition-rs/src/recorder.rs:229)
> rendition::stop::{{closure}} (/rendition-rs/src/bin/rendition.rs:267)
>
> Note that simply going from Null to Paused, and then sending EOS will
> result in the same deadlock. Any transition into and out
> of Paused will deadlock.
>
> What is interesting about this deadlock is it only occurs for me if
> there is a media player
> on the webpage (YouTube, MP4, etc). WebRTC AV does not cause this
> issue. Nothing immediately stands out in a debugger while searching
> through the other threads.
> Can someone suggest where I might look? I'll also try the default
> Spotify CEF build
> to see if that makes a difference. I am usinga custom CEF build with
> chromium 106.0.5249.119.
>
> In my code I am using the following calls to create this deadlock:
>
> pipeline.set_state(gst::State::Paused)
> ...
> pipeline.set_state(gst::State::Playing)
> ...
> pipeline.send_event(gst::event::Eos::new()); // Deadlock here.
>
>
> Thanks,
> Steve
>
--
[image: Logo] *Steve McFarlin*
Sr. Staff Engineer
www.hopin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230120/c5ca973a/attachment.htm>
More information about the gstreamer-devel
mailing list