<div dir="ltr">Issue was programmer error, and a little bit of not RTFM. I was setting pipeline states in gst callbacks.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 19, 2023 at 5:18 PM Steve McFarlin <<a href="mailto:steve.mcfarlin@hopin.to">steve.mcfarlin@hopin.to</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello All -<br>
<br>
I have code equivalent of this gst-launch pipeline<br>
<br>
gst-launch-1.0 -e \<br>
    cefsrc url="<a href="https://www.youtube.com/watch?v=_3EuiU1qdpE" rel="noreferrer" target="_blank">https://www.youtube.com/watch?v=_3EuiU1qdpE</a>" ! \<br>
    video/x-raw, width=1920, height=1080, framerate=30/1 ! \<br>
    cefdemux name=demux ! queue ! videoconvert ! \<br>
    queue max-size-bytes=0 max-size-buffers=0 max-size-time=3000000000<br>
! x264enc ! queue ! \<br>
    mp4mux name=muxer ! filesink location='test.mp4' \<br>
    audiotestsrc do-timestamp=true is-live=true  volume=0.0 !<br>
audiomixer name=mix ! \<br>
    queue max-size-bytes=0 max-size-buffers=0 max-size-time=3000000000<br>
! audioconvert ! \<br>
    audiorate ! audioresample ! avenc_aac bitrate=128000 ! queue ! muxer. \<br>
    demux. ! queue ! mix.<br>
<br>
If I follow this state path:<br>
<br>
NULL -> .. -> Paused -> Playing -> send_event(EOS)<br>
<br>
 I will enter into a deadlock on the following mutex<br>
<br>
**_lldb_unnamed_symbol3461 (@_**lldb*unnamed_symbol3461:19)<br>
pthread_mutex_lock (@pthread_mutex_lock:106)<br>
\*\*\_lldb_unnamed_symbol1391 (@***lldb_unnamed_symbol1391:358)<br>
gst_element_send_event (@gst_element_send_event:38)<br>
**_lldb_unnamed_symbol3063 (@_\*\*lldb_unnamed_symbol3063:104)<br>
gst_element_send_event (@gst_element_send_event:38)<br>
<O as gstreamer::element::ElementExtManual>::send_event<br>
(cargo/registry/src/github.com-1ecc6299db9ec823/gstreamer-0.19.5/src/<a href="http://element.rs:339" rel="noreferrer" target="_blank">element.rs:339</a>)<br>
rendition::recorder::Recorder::stop (/rendition-rs/src/<a href="http://recorder.rs:229" rel="noreferrer" target="_blank">recorder.rs:229</a>)<br>
rendition::stop::{{closure}} (/rendition-rs/src/bin/<a href="http://rendition.rs:267" rel="noreferrer" target="_blank">rendition.rs:267</a>)<br>
<br>
Note that simply going from Null to Paused, and then sending EOS will<br>
result in the same deadlock. Any transition into and out<br>
of Paused will deadlock.<br>
<br>
What is interesting about this deadlock is it only occurs for me if<br>
there is a media player<br>
on the webpage (YouTube, MP4, etc). WebRTC AV does not cause this<br>
issue. Nothing immediately stands out in a debugger while searching<br>
through the other threads.<br>
Can someone suggest where I might look? I'll also try the default<br>
Spotify CEF build<br>
to see if that makes a difference. I am usinga custom CEF build with<br>
chromium 106.0.5249.119.<br>
<br>
In my code I am using the following calls to create this deadlock:<br>
<br>
pipeline.set_state(gst::State::Paused)<br>
...<br>
pipeline.set_state(gst::State::Playing)<br>
...<br>
pipeline.send_event(gst::event::Eos::new()); // Deadlock here.<br>
<br>
<br>
Thanks,<br>
Steve<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><table><tbody><tr><td style="padding-right:30px"><img src="https://content.api.getguru.com/files/view/abaacfbd-6d55-400a-83df-072266ff326a" height="82" alt="Logo"></td><td style="font-size:14px;line-height:1.5;font-family:-apple-system,Arial,sans-serif"><span style="font-size:16px;margin-top:0px;margin-bottom:0px"><strong>Steve McFarlin</strong></span><br><span style="color:rgb(153,153,153);margin-top:0px;margin-bottom:0px">Sr. Staff Engineer</span><br><p style="line-height:1;margin:0px;padding:0px"> </p><a href="https://www.hopin.com" style="color:rgb(153,153,153);margin-top:0px;margin-bottom:0px" target="_blank">www.hopin.com</a><br></td></tr></tbody></table></div></div>