Memory leak in nvv4l2h265enc

Hardware: Jetson AGX Xavier
Gstreamer: 1.20.1
Deepstream: 6.0

Using the provided example for the nvv4l2h265enc in the accelerated gstreamer user guide, we believe we are seeing a slow memory leak.
Furthermore, when running the command with GST_DEBUG=4, there are warning printed at 20 fps, which the same framerate as our camera
Command:

GST_DEBUG=4 gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)2880, height=(int)1860, \
format=(string)NV12, framerate=(fraction)20/1' ! nvv4l2h265enc \
bitrate=8000000 ! h265parse ! qtmux ! filesink \
 location=test_h265.mp4 -e

Warnings at 20 fps:

0:00:05.988689873  3481   0x557fcaff60 WARN              bufferpool gstbufferpool.c:1246:default_reset_buffer:<nvv4l2h265enc0:pool:sink> Buffer 0x7f7c00b360 without the memory tag has maxsize (2016) that is smaller than the configured buffer pool size (8087040). The buffer will be not be reused. This is most likely a bug in this GstBufferPool subclass
0:00:06.038680224  3481   0x557fcaff60 WARN              bufferpool gstbufferpool.c:1246:default_reset_buffer:<nvv4l2h265enc0:pool:sink> Buffer 0x7f7c00b240 without the memory tag has maxsize (2016) that is smaller than the configured buffer pool size (8087040). The buffer will be not be reused. This is most likely a bug in this GstBufferPool subclass
0:00:06.088761812  3481   0x557fcaff60 WARN              bufferpool gstbufferpool.c:1246:default_reset_buffer:<nvv4l2h265enc0:pool:sink> Buffer 0x7f7c00b120 without the memory tag has maxsize (2016) that is smaller than the configured buffer pool size (8087040). The buffer will be not be reused. This is most likely a bug in this GstBufferPool subclass

You can see the memory leak by running watch -n 1 free -m and see the used field gradually increase. From 4:55pm on average 9920MB were used → 5:05pm on average 9950MB in use.

Can NVIDIA please provide some insight into this issue? There appears to be a bug in the buffer memory usage of the nvv4l2h265enc plugin

Hi,
By default it is gstreamer 1.14.5 for Jetpack 4 releases, and 1.16.3 for Jetpack 5 releases. It looks like you manually upgrade to 1.20.1. This may trigger unknown issue since it is not a verified combination. We would suggest use default gstreamer version and try.

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