Segmentation Fault in Gstreamer SRT pipeline
I am using SRT streaming for sending/receiving video frames. With help of opencv in python, I am processing frames and sending back to the stream. This works for a long time (1~2 hrs) and suddenly crashes with Segmentation Fault.
Input stream pipeline
From Desktop: gst-launch-1.0.exe -v dx9screencapsrc ! queue ! video/x-raw,framerate=25/1 ! videoscale ! videoconvert ! video/x-raw,width=1280,height=720 ! x264enc ! "video/x-h264,profile=baseline" ! mpegtsmux alignment=7 ! srtsink uri=srt://:9001 mode=listener wait-for-connection=false
Python Application receiving frames
srtsrc latency=125 mode=caller uri=srt://<IP>:9001 ! queue ! tsdemux ! h264parse ! avdec_h264 ! videoconvert ! appsink sync=true
Output Stream pipeline (integrated to Opencv python API)
appsrc ! videoconvert ! x264enc tune=zerolatency ! video/x-h264,profile=high ! mpegtsmux alignment=7 ! srtsink uri=srt://:9002
Then we can access the stream in VLC player with srt://IP:9002
coredump
* 1 Thread 0x7fbdf0d2d700 (LWP 198919) 0x00007fbf2400a389 in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstsrt.so
2 Thread 0x7fbdf152e700 (LWP 198923) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fbd480256c0) at ../sysdeps/nptl/futex-internal.h:183
3 Thread 0x7fbcc77f6700 (LWP 198960) 0x00007fbfb5f94dcf in x264_8_trellis_coefn () from /usr/lib/x86_64-linux-gnu/libx264.so.155
4 Thread 0x7fbd6d0fd700 (LWP 198929) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fbd500307ac) at ../sysdeps/nptl/futex-internal.h:183
5 Thread 0x7fbcc5ff3700 (LWP 198963) 0x00007fbfb5f7f203 in x264_8_trellis_coefn () from /usr/lib/x86_64-linux-gnu/libx264.so.155
6 Thread 0x7fbdf1d2f700 (LWP 198924) 0x00007fc05deca4ed in __libc_recvmsg (fd=99, msg=0x7fbdf1d2e790, flags=<optimized out>) at ../sysdeps/unix/sysv/linux/recvmsg.c:28
7 Thread 0x7fbe687fc700 (LWP 198898) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fc05d2f3960 <thread_status+736>) at ../sysdeps/nptl/futex-internal.h:183
8 Thread 0x7fbcbcff9700 (LWP 198972) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0xac6823a8) at ../sysdeps/nptl/futex-internal.h:183
9 Thread 0x7fbd55fff700 (LWP 198931) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fbd5003088c) at ../sysdeps/nptl/futex-internal.h:183
10 Thread 0x7fbd32ffd700 (LWP 12151) 0x00007fc0557f4b31 in ?? () from /usr/local/lib/python3.8/dist-packages/torch/lib/libgomp-a34b3233.so.1
11 Thread 0x7fbd467fc700 (LWP 12145) 0x00007fc0557f4b31 in ?? () from /usr/local/lib/python3.8/dist-packages/torch/lib/libgomp-a34b3233.so.1
12 Thread 0x7fbcc4ff1700 (LWP 198965) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0xac6ccfec) at ../sysdeps/nptl/futex-internal.h:183
13 Thread 0x7fbd337fe700 (LWP 12144) 0x00007fc0557f4b31 in ?? () from /usr/local/lib/python3.8/dist-packages/torch/lib/libgomp-a34b3233.so.1
14 Thread 0x7fbcbe7fc700 (LWP 198969) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0xac6712ec) at ../sysdeps/nptl/futex-internal.h:183
15 Thread 0x7fbcc67f4700 (LWP 198962) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fbcd8171598) at ../sysdeps/nptl/futex-internal.h:183
16 Thread 0x7fc046632700 (LWP 198875) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fbfa75a6660 <thread_status+224>) at ../sysdeps/nptl/futex-internal.h:183
17 Thread 0x7fbd47fff700 (LWP 198934) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fbd500309dc) at ../sysdeps/nptl/futex-internal.h:183
18 Thread 0x7fc048e33700 (LWP 198876) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fbfa75a66e0 <thread_status+352>) at ../sysdeps/nptl/futex-internal.h:183
19 Thread 0x7fbf9f5eb700 (LWP 198878) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fbfa75a67e0 <thread_status+608>) at ../sysdeps/nptl/futex-internal.h:183
20 Thread 0x7fbcbdffb700 (LWP 198970) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0xac686ab8) at ../sysdeps/nptl/futex-internal.h:183
21 Thread 0x7fbcd1ffb700 (LWP 198948) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fbcd804211c) at ../sysdeps/nptl/futex-internal.h:183
22 Thread 0x7fbe957fe700 (LWP 198893) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fc05d2f36e0 <thread_status+96>) at ../sysdeps/nptl/futex-internal.h:183
23 Thread 0x7fbd46ffd700 (LWP 198936) futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fbd50030abc) at ../sysdeps/nptl/futex-internal.h:183
24 Thread 0x7fbdf6f7d700 (LWP 12147) 0x00007fc0557f4b31 in ?? () from /usr/local/lib/python3.8/dist-packages/torch/lib/libgomp-a34b3233.so.1