Bunch of v4l2 buffer allocation errors resulting after some time in pipeline freeze

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): Jetson Nano
• DeepStream Version: 6.0.1
• JetPack Version (valid for Jetson only):
• TensorRT Version: 8.2.1
• Issue Type: Processing camera stream
• How to reproduce the issue?: Using Hikvision IP Camera (DS-2CD1043G0-I) with RTSP main stream.

So I have a DeepstreamSDK Python app with the following pipeline:

uridecodebin -> streammux -> tee -> ...

And then I’m using tee to split stream into different branches where I’m performing inference + tracking in each one of them. I have an issue with decoding stream where I’m getting a lot of such errors in runtime:

0:10:11.546143824   234     0x2d203e30 WARN              bufferpool gstbufferpool.c:310:do_alloc_buffer:<nvv4l2decoder0:pool:src> alloc function failed
0:10:11.546205541   234     0x2d203e30 ERROR         v4l2bufferpool gstv4l2bufferpool.c:747:gst_v4l2_buffer_pool_alloc_buffer:<nvv4l2decoder0:pool:src> failed to allocate buffer

Which actually do not affect my application but after a while (sometimes its half an hour sometimes it can ran for 5 hours) my pipeline freezes and my probes aren’t working. I don’t have an access to my Jetson device to see if display still works but no logs are appearing after this freeze.

Weird thing is that the terminal with the app is still working because I can still send a SIGINT using CTRL+C and it shuts down itself gracefully but then it prints logs that are probably causing this freeze:

0:15:17.717766301   166     0x251a6140 WARN                 rtspsrc gstrtspsrc.c:6161:gst_rtspsrc_send:<source> error: Unhandled error
0:15:17.717859186   166     0x251a6140 WARN                 rtspsrc gstrtspsrc.c:6161:gst_rtspsrc_send:<source> error: Option not supported (551)
0:15:17.718069077   166     0x251a6140 WARN                 rtspsrc gstrtspsrc.c:8244:gst_rtspsrc_pause:<source> error: Could not send message. (Generic error)
[NvMultiObjectTracker] De-initialized
[NvMultiObjectTracker] De-initialized
[NvMultiObjectTracker] De-initialized
[NvMultiObjectTracker] De-initialized
0:15:17.989629031   166     0x251a6140 WARN                 rtspsrc gstrtspsrc.c:5919:gst_rtsp_src_receive_response:<source> receive interrupted
0:15:17.989697536   166     0x251a6140 WARN                 rtspsrc gstrtspsrc.c:7673:gst_rtspsrc_close:<source> TEARDOWN interrupted

For connecting to RTSP stream from a camera I am using the same code as here without the file-loop part. Also at launch I’m getting those errors:

0:00:09.720487888   234     0x2d203e30 WARN                    v4l2 gstv4l2object.c:4476:gst_v4l2_object_probe_caps:<nvv4l2decoder0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:09.720564820   234     0x2d203e30 WARN                    v4l2 gstv4l2object.c:2388:gst_v4l2_object_add_interlace_mode:0x7ec80cb2f0 Failed to determine interlace mode
0:00:09.720629200   234     0x2d203e30 WARN                    v4l2 gstv4l2object.c:2388:gst_v4l2_object_add_interlace_mode:0x7ec80cb2f0 Failed to determine interlace mode
0:00:09.720686548   234     0x2d203e30 WARN                    v4l2 gstv4l2object.c:2388:gst_v4l2_object_add_interlace_mode:0x7ec80cb2f0 Failed to determine interlace mode


0:00:09.838676107   234     0x2d203e30 WARN            v4l2videodec gstv4l2videodec.c:1755:gst_v4l2_video_dec_decide_allocation:<nvv4l2decoder0> Duration invalid, not setting latency
0:00:09.839275578   234     0x2d203e30 WARN          v4l2bufferpool gstv4l2bufferpool.c:1087:gst_v4l2_buffer_pool_start:<nvv4l2decoder0:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:10.009629483   234   0x7ec80e3320 WARN          v4l2bufferpool gstv4l2bufferpool.c:1536:gst_v4l2_buffer_pool_dqbuf:<nvv4l2decoder0:pool:src> Driver should never set v4l2_buffer.field to ANY

I’ve seen similar issues (some that were specific to Hikvision cameras) but none of them actually solved anything for me. Is there anything I can try to make this work without my pipeline freezing?

I’ve already tried updating firmware on my camera management system, lowering bitrate, changing IFrame Intervals and FPS on stream. Is there anything that can be done regarding used elements in Deepstream Pipeline or its settings?

  1. what is the whole media pipleine? which sample are you referring to?
  2. what do you mean about “probes aren’t working”? can you see the output video at the beginning?
  3. can you use deepstream-test3 without modification to reproduce this issue?

Sorry for the trouble, it was actually something specific to the HikVision cameras, and lowering the output FPS helped to stabilize the RTSP stream which resolved the issue. Now even when the RTSP stream fails for some reason, Deepstream handles that well and quits the pipeline. Still, it was strange that this issue caused the whole pipeline to freeze.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

Is this still an DeepStream issue to support? Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.