Segmentation fault by srtclientsrc
Hello GStreamer Team! I have a GStreamer pipeline inside c++ app:
srtclientsrc uri=srt://xxx.xxx.xxx.xxx:12000 latency=100 ! tsdemux ! h264parse ! video/x-h264 ! avdec_h264 ! autovideosink sync=false
Randomly, 1 or 10 minutes after launching the app a segmentation fault appears. I launched my code with gdb and got this:
Thread 9 "srtsrc0:src" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe4a9b700 (LWP 4343)]
0x00007ffff7fbc389 in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstsrt.so
(gdb) bt
#0 0x00007ffff7fbc389 in ()
at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstsrt.so
#1 0x00007ffff64ac8a1 in () at /lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#2 0x00007ffff64ae4dd in () at /lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#3 0x00007ffff64b15bc in () at /lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#4 0x00007ffff7f18107 in () at /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#5 0x00007ffff7db9374 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007ffff7db8ad1 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7 0x00007ffff7b27609 in start_thread (arg=<optimized out>)
at pthread_create.c:477
#8 0x00007ffff7a4e293 in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) bt full
#0 0x00007ffff7fbc389 in ()
at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstsrt.so
#1 0x00007ffff64ac8a1 in () at /lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#2 0x00007ffff64ae4dd in () at /lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#3 0x00007ffff64b15bc in () at /lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#4 0x00007ffff7f18107 in () at /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#5 0x00007ffff7db9374 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007ffff7db8ad1 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7 0x00007ffff7b27609 in start_thread (arg=<optimized out>)
at pthread_create.c:477
ret = <optimized out>
pd = <optimized out>
unwind_buf =
{cancel_jmp_buf = {{jmp_buf = {140737029715712, 500733984142824456, 140737336214574, 140737336214575, 140737336214720, 140737029713856, -500673938862599160, -500715932185881592}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 0
#8 0x00007ffff7a4e293 in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Also I launched this pipeline with gst-launch-1.0 with debug GST_DEBUG=audiotestsrc:5
and got this:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Caught SIGSEGV
Spinning. Please run 'gdb gst-launch-1.0 16996' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
03:42:53.934309/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=0 avail=0 ack.seq=130026467 pkt.seq=130026467 rcv-remain=8191
03:42:53.934520/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=1 avail=0 ack.seq=130026467 pkt.seq=130026468 rcv-remain=8191
03:42:54.831517/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=2 avail=0 ack.seq=130026467 pkt.seq=130026469 rcv-remain=8191
03:42:54.831993/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=3 avail=0 ack.seq=130026467 pkt.seq=130026470 rcv-remain=8191
03:42:54.832068/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=45 avail=0 ack.seq=130026467 pkt.seq=130026512 rcv-remain=8191
03:42:54.832108/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=46 avail=0 ack.seq=130026467 pkt.seq=130026513 rcv-remain=8191
03:42:54.853990/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=90 avail=0 ack.seq=130026467 pkt.seq=130026557 rcv-remain=8191
03:42:54.854303/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=91 avail=0 ack.seq=130026467 pkt.seq=130026558 rcv-remain=8191
03:42:54.901897/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=133 avail=0 ack.seq=130026467 pkt.seq=130026600 rcv-remain=8191
03:42:54.909167/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=134 avail=0 ack.seq=130026467 pkt.seq=130026601 rcv-remain=8191
03:42:54.943962/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=246 avail=0 ack.seq=130026467 pkt.seq=130026713 rcv-remain=8191
03:42:54.944335/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=247 avail=0 ack.seq=130026467 pkt.seq=130026714 rcv-remain=8191
03:42:54.973951/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=295 avail=0 ack.seq=130026467 pkt.seq=130026762 rcv-remain=8191
03:42:54.974376/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=296 avail=0 ack.seq=130026467 pkt.seq=130026763 rcv-remain=8191
03:42:55.024084/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=340 avail=0 ack.seq=130026467 pkt.seq=130026807 rcv-remain=8191
03:42:55.024489/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=341 avail=0 ack.seq=130026467 pkt.seq=130026808 rcv-remain=8191
03:42:55.060896/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=384 avail=0 ack.seq=130026467 pkt.seq=130026851 rcv-remain=8191
03:42:55.061374/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=385 avail=0 ack.seq=130026467 pkt.seq=130026852 rcv-remain=8191
03:42:55.100892/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=428 avail=0 ack.seq=130026467 pkt.seq=130026895 rcv-remain=8191
03:42:55.101245/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=429 avail=0 ack.seq=130026467 pkt.seq=130026896 rcv-remain=8191
03:42:55.144046/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=470 avail=0 ack.seq=130026467 pkt.seq=130026937 rcv-remain=8191
03:42:55.144397/SRT:RcvQ:worker*E:SRT.c: %880277680:No room to store incoming packet: offset=471 avail=0 ack.seq=130026467 pkt.seq=130026938 rcv-remain=8191
I use pop-os 20.04 LTS, GStreamer 1.16 and SRT (installed with GStreamer):
dpkg -l | grep srt
ii libsrt1:amd64 1.4.0-1build1 amd64 Secure Reliable Transport UDP streaming library
ii libsrtp2-1:amd64 2.3.0-2 amd64 Secure RTP (SRTP) and UST Reference
Thank you in advance!