Nvv4l2decoder hangs when set state NULL uridecodebin element

Please provide complete information as applicable to your setup.

• Hardware Platform (GPU)
• DeepStream Version: 6.1.1
• TensorRT Version: 8.5.1-1+cuda11.8
• NVIDIA GPU Driver Version (valid for GPU only): 470.141.03
• Issue Type( bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

Running pipeline with
Pipeline: with nvv4l2decoder

uridecodebin ! queue ! nvvideoconvert ! nvv4l2h264enc ! filesink

We reset the source element with new URI everytime pipeline do not receive any buffer after 3 mins (zero FPS). The step to reset source is:

gst_element_set_state (urisrc, GST_STATE_NULL);
int sleep_interval = 5;
g_usleep(sleep_interval * 1000000); 

g_object_set (G_OBJECT (urisrc), "uri", new_url, NULL);
GstPad *sinkpad = gst_element_get_static_pad (vidconv, "sink");
gst_pad_send_event (sinkpad, gst_event_new_flush_stop (FALSE));
gst_object_unref (sinkpad);

if (gst_element_set_state (urisrc, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
    g_error ("Error change playing uridecodebin");
    return FALSE;
}

Its work in 24 hours. But after something happend with cameras. the pipeline is stuck when set state urisrc. We had a log trace the thread of pipeline and see that it stuck when calling function NvOsSemaphoreWait in libcuvidv4l2

#1  0x00007f4fd57950b3 in NvOsSemaphoreWait(NvOsSemaphoreRec*) () at ///opt/nvidia/deepstream/deepstream-6.1/lib/libcuvidv4l2.so
#2  0x00007f4fd57a3f77 in cuvidv4l2_dec_thread_func(void*) () at ///opt/nvidia/deepstream/deepstream-6.1/lib/libcuvidv4l2.so

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

We are using Cameras EZViz, Dahua, HKVision:

Metadata:

Camera EZviz:
title : Media Presentation
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: hevc (Main), yuvj420p(pc, bt709), 1920x1080, 25 fps, 25 tbr, 90k tbn, 25 tbc
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp

Dahua
title : Media Server
Duration: N/A, start: 0.000125, bitrate: N/A
Stream #0:0: Video: hevc (Main), yuv420p(tv), 1920x1080, 25 fps, 25 tbr, 90k tbn, 25 tbc
Stream #0:1: Audio: pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s

Please check the bellow log and find anything could help your progress to debug.
Log backtrace hang thread:

gdb log
Thread 16 (Thread 0x7f4ed4f64700 (LWP 26614)):
#0  0x00007f4fe63fa376 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f4fd57950b3 in NvOsSemaphoreWait(NvOsSemaphoreRec*) () at ///opt/nvidia/deepstream/deepstream-6.1/lib/libcuvidv4l2.so
#2  0x00007f4fd57a3f77 in cuvidv4l2_dec_thread_func(void*) () at ///opt/nvidia/deepstream/deepstream-6.1/lib/libcuvidv4l2.so
#3  0x00007f4fd5794ed0 in  () at ///opt/nvidia/deepstream/deepstream-6.1/lib/libcuvidv4l2.so
#4  0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 15 (Thread 0x7f4fd4561700 (LWP 26567)):
#0  0x00007f4fe62d623f in clock_nanosleep () at /usr/lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f4fe62dbec7 in nanosleep () at /usr/lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f4fe630e85f in usleep () at /usr/lib/x86_64-linux-gnu/libc.so.6
#3  0x00007f4fd598eb91 in  () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideo4linux2.so
#4  0x00007f4fe59fab36 in gst_video_decoder_decode_frame () at /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#5  0x00007f4fe59fb0bb in gst_video_decoder_chain_forward () at /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#6  0x00007f4fe59fdd4a in gst_video_decoder_chain () at /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#7  0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#8  0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#9  0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#10 0x00007f4fe6070e60 in gst_base_transform_chain () at /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#11 0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#12 0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#13 0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#14 0x00007f4fe6050f57 in gst_base_parse_push_frame () at /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#15 0x00007f4fe6053e5b in gst_base_parse_finish_frame () at /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#16 0x00007f4fd039b204 in gst_h264_parse_handle_frame () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoparsersbad.so
#17 0x00007f4fe604b9ba in gst_base_parse_handle_buffer () at /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#18 0x00007f4fe6051c8e in gst_base_parse_chain () at /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#19 0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#20 0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#21 0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#22 0x00007f4fdcaa5677 in gst_rtp_base_depayload_push () at /usr/lib/x86_64-linux-gnu/libgstrtp-1.0.so.0
#23 0x00007f4fd1407ab1 in gst_rtp_h264_depay_handle_nal () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtp.so
#24 0x00007f4fd1407c61 in gst_rtp_h264_finish_fragmentation_unit () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtp.so
--Type <RET> for more, q to quit, c to continue without paging--
#25 0x00007f4fd1407fe0 in gst_rtp_h264_depay_process () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtp.so
#26 0x00007f4fdcaa5aa3 in gst_rtp_base_depayload_handle_buffer.isra () at /usr/lib/x86_64-linux-gnu/libgstrtp-1.0.so.0
#27 0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#28 0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#29 0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#30 0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#31 0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#32 0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#33 0x00007f4fe662c90b in gst_proxy_pad_chain_default () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#34 0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#35 0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#36 0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#37 0x00007f4fe662c90b in gst_proxy_pad_chain_default () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#38 0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#39 0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#40 0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#41 0x00007f4fe662c90b in gst_proxy_pad_chain_default () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#42 0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#43 0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#44 0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#45 0x00007f4fd14ab045 in gst_rtp_pt_demux_chain () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#46 0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#47 0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#48 0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#49 0x00007f4fd14a0f06 in pop_and_push_next () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#50 0x00007f4fd14a233b in gst_rtp_jitter_buffer_loop () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#51 0x00007f4fe667d7b7 in gst_task_func () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#52 0x00007f4fe64a7374 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#53 0x00007f4fe64a6ad1 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#54 0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#55 0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 14 (Thread 0x7f4e81ffb700 (LWP 26566)):
#0  0x00007f4fe631173d in syscall () at /usr/lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f4fe64ca623 in g_cond_wait () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#2  0x00007f4fd14a0447 in wait_next_timeout () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#3  0x00007f4fe64a6ad1 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 13 (Thread 0x7f4e837fe700 (LWP 26565)):
#0  0x00007f4fe63fe170 in __lll_lock_wait () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f4fe63f6131 in pthread_mutex_lock () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#2  0x00007f4fe6641021 in gst_pad_send_event_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#3  0x00007f4fe6641b7b in gst_pad_push_event_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#4  0x00007f4fe6643fa0 in check_sticky () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#5  0x00007f4fe664c1f6 in gst_pad_push_event () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#6  0x00007f4fd45f5fed in gst_rtspsrc_stream_push_event.isra () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtsp.so
#7  0x00007f4fd45f6173 in on_timeout_common () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtsp.so
#8  0x00007f4fe6568802 in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007f4fe657c814 in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007f4fe6587bbe in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007f4fe65880f3 in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007f4fd14b8238 in session_cleanup () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#13 0x00007f4fe646b1b8 in g_hash_table_foreach () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007f4fd14beb00 in rtp_session_on_timeout () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#15 0x00007f4fd14d0481 in rtcp_thread () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#16 0x00007f4fe64a6ad1 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#18 0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 12 (Thread 0x7f4e80ff9700 (LWP 26183)):
#0  0x00007f4fe63fa376 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f4fd57950b3 in NvOsSemaphoreWait(NvOsSemaphoreRec*) () at ///opt/nvidia/deepstream/deepstream-6.1/lib/libcuvidv4l2.so
#2  0x00007f4fd57a9af8 in cuvidv4l2_enc_thread_func(void*) () at ///opt/nvidia/deepstream/deepstream-6.1/lib/libcuvidv4l2.so
#3  0x00007f4fd5794ed0 in  () at ///opt/nvidia/deepstream/deepstream-6.1/lib/libcuvidv4l2.so
#4  0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 11 (Thread 0x7f4e817fa700 (LWP 26182)):
--Type <RET> for more, q to quit, c to continue without paging--
#0  0x00007f4fe631173d in syscall () at /usr/lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f4fe64ca623 in g_cond_wait () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f4fd14a4338 in gst_rtp_jitter_buffer_chain () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#3  0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#4  0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#5  0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#6  0x00007f4fd14b0bf1 in gst_rtp_ssrc_demux_chain () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#7  0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#8  0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#9  0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#10 0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#11 0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#12 0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#13 0x00007f4fd14ce9e8 in gst_rtp_session_process_rtp () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#14 0x00007f4fd14b6497 in source_push_rtp () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#15 0x00007f4fd14c5026 in rtp_source_process_rtp () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#16 0x00007f4fd14c1bde in rtp_session_process_rtp () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#17 0x00007f4fd14d3019 in gst_rtp_session_chain_recv_rtp () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtpmanager.so
#18 0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#19 0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#20 0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#21 0x00007f4fe662c90b in gst_proxy_pad_chain_default () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#22 0x00007f4fe664020f in gst_pad_chain_data_unchecked () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#23 0x00007f4fe664391b in gst_pad_push_data () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#24 0x00007f4fe664ae83 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#25 0x00007f4fd45fb7c0 in gst_rtspsrc_handle_data () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtsp.so
#26 0x00007f4fd460c286 in gst_rtspsrc_thread () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtsp.so
#27 0x00007f4fe667d7b7 in gst_task_func () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#28 0x00007f4fe64a7374 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007f4fe64a6ad1 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#31 0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 10 (Thread 0x7f4e8c3c6700 (LWP 26172)):
#0  0x00007f4fe63fa376 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#1  0x00007f4fd57950b3 in NvOsSemaphoreWait(NvOsSemaphoreRec*) () at ///opt/nvidia/deepstream/deepstream-6.1/lib/libcuvidv4l2.so
#2  0x00007f4fd5794d2d in CuvidV4L2_Poll_CPlane () at ///opt/nvidia/deepstream/deepstream-6.1/lib/libcuvidv4l2.so
#3  0x00007f4fd59615d7 in plugin_ioctl () at /usr/lib/x86_64-linux-gnu/libv4l/plugins/libcuvidv4l2_plugin.so
#4  0x00007f4fd584508e in v4l2_ioctl () at /usr/lib/x86_64-linux-gnu/libv4l2.so.0
#5  0x00007f4fd5975fbf in gst_v4l2_allocator_dqbuf () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideo4linux2.so
#6  0x00007f4fd597afd1 in  () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideo4linux2.so
#7  0x00007f4fd597bdcb in gst_v4l2_buffer_pool_process () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideo4linux2.so
#8  0x00007f4fd599422a in  () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideo4linux2.so
#9  0x00007f4fe667d7b7 in gst_task_func () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#10 0x00007f4fe64a7374 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f4fe64a6ad1 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#13 0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 9 (Thread 0x7f4f9ed7b700 (LWP 32006)):
#0  0x00007f4fe63fa376 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f4fdfc42ddb in  () at /usr/lib/x86_64-linux-gnu/libcuda.so.1
#2  0x00007f4fdfd8e576 in  () at /usr/lib/x86_64-linux-gnu/libcuda.so.1
#3  0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 8 (Thread 0x7f4f9f5fd700 (LWP 32005)):
#0  0x00007f4fe630b99f in poll () at /usr/lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f4fdfd96221 in  () at /usr/lib/x86_64-linux-gnu/libcuda.so.1
#2  0x00007f4fdfcd3c7a in  () at /usr/lib/x86_64-linux-gnu/libcuda.so.1
#3  0x00007f4fdfd8e576 in  () at /usr/lib/x86_64-linux-gnu/libcuda.so.1
#4  0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 7 (Thread 0x7f4fd2554700 (LWP 32000)):
#0  0x00007f4fe630b99f in poll () at /usr/lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f4fe647d36e in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f4fe647d4a3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f4fd578699d in  () at /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007f4fe64a6ad1 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#5  0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 6 (Thread 0x7f4fd2d55700 (LWP 31999)):
#0  0x00007f4fe630b99f in poll () at /usr/lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f4fe647d36e in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f4fe647d4a3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f4fe647d4f1 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f4fe64a6ad1 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 5 (Thread 0x7f4fd355f700 (LWP 31998)):
#0  0x00007f4fe63fe170 in __lll_lock_wait () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f4fe63f6131 in pthread_mutex_lock () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#2  0x00007f4fe664744a in activate_mode_internal () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#3  0x00007f4fe6647b95 in gst_pad_set_active () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#4  0x00007f4fe661f125 in activate_pads () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#5  0x00007f4fe663539c in gst_iterator_fold () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#6  0x00007f4fe6621d65 in gst_element_pads_activate () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#7  0x00007f4fe6622051 in gst_element_change_state_func () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#8  0x00007f4fe59f4b0d in gst_video_decoder_change_state () at /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#9  0x00007f4fe66243f2 in gst_element_change_state () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#10 0x00007f4fe6624b39 in gst_element_set_state_func () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#11 0x00007f4fe65ff878 in gst_bin_change_state_func () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#12 0x00007f4fe5b7a89a in gst_decode_bin_change_state () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstplayback.so
#13 0x00007f4fe66243f2 in gst_element_change_state () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#14 0x00007f4fe6624b39 in gst_element_set_state_func () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#15 0x00007f4fe65ff878 in gst_bin_change_state_func () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#16 0x00007f4fe5b914f9 in gst_uri_decode_bin_change_state () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstplayback.so
#17 0x00007f4fe66243f2 in gst_element_change_state () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#18 0x00007f4fe6624b39 in gst_element_set_state_func () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#19 0x00005610de5d23fc in replace_url(char const*, _GstElement*) ()
#20 0x00005610de5d2722 in pthread_replace_url(void*) ()
#21 0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#22 0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 4 (Thread 0x7f4fd4e1e700 (LWP 31995)):
#0  0x00007f4fe631173d in syscall () at /usr/lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f4fe64ca623 in g_cond_wait () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f4fe58276b6 in gst_queue_loop () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so
#3  0x00007f4fe667d7b7 in gst_task_func () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#4  0x00007f4fe64a7374 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f4fe64a6ad1 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 3 (Thread 0x7f4fd61ae700 (LWP 31994)):
#0  0x00007f4fe63fa7d1 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f4fe12e929d in NvBufResStorage::taskTrim(NvBufResStorage*) () at ///opt/nvidia/deepstream/deepstream-6.1/lib/libnvbufsurftransform.so
#2  0x00007f4fe680fde4 in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 2 (Thread 0x7f4fd69af700 (LWP 31993)):
#0  0x00007f4fe630b99f in poll () at /usr/lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f4fdfd96221 in  () at /usr/lib/x86_64-linux-gnu/libcuda.so.1
#2  0x00007f4fdfcd3c7a in  () at /usr/lib/x86_64-linux-gnu/libcuda.so.1
#3  0x00007f4fdfd8e576 in  () at /usr/lib/x86_64-linux-gnu/libcuda.so.1
#4  0x00007f4fe63f3609 in start_thread () at /usr/lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007f4fe6318133 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x7f4fe5c03f80 (LWP 31992)):
#0  0x00007f4fe630b99f in poll () at /usr/lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f4fe647d36e in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f4fe647d6f3 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00005610de5d2ffc in main ()

Could you provide a minimum demo code that can repo the stuck problem? We can analyze and solve faster if we can repo it in our env.

I provide a minimum demo code in PM. Please check the message.

I run the demo in my env, it runs well after 10m. I noticed that there may be something wrong with your environment. Deepstream 6.1.1 needs Cuda 11.7, Driver 515.65.01, TensorRT 8.4.1.The hw decoder depends on these modules.
You can refer the link below to update your env:
https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Quickstart.html#platform-and-os-compatibility

running 10mins is not enough time to test. We observe that behavior in long-term testing. Please let in running in 1-2 days to see the results.

How many times did you get the reset stream?
@yuweiw

We also will try to upgrade the environment and test again. But please test long-term reset on your side!

Yes, It’s better to be consistent with our environment we provided in Guide.
I’ll run it for a long time.

1 Like

Thank you so much! @yuweiw

Could you confirm. Is the issues with nvv4l2decoder on bellow topic also fixed in the version 6.1.1?

Yes, I checked our 6.1.1 version. It was released on 8/31.

Please let us know if you still need further support, thanks.