Mutex deadlock using gstcefsrc

Steve McFarlin steve.mcfarlin at
Fri Jan 20 01:18:40 UTC 2023

Hello All -

I have code equivalent of this gst-launch pipeline

gst-launch-1.0 -e \
    cefsrc url="" ! \
    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
rendition::recorder::Recorder::stop (/rendition-rs/src/
rendition::stop::{{closure}} (/rendition-rs/src/bin/

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.send_event(gst::event::Eos::new()); // Deadlock here.


More information about the gstreamer-devel mailing list