Hi, Im working on deepstream app with stream video: mjpeg, yuvj420p. And realized GPUs memory continuously increasing. While read rtsp stream in the same pipeline is stable.
I tested on GeForce GTX 1080 Ti and Tesla P4 too.
I run deepstream app with valgrind tool to check memory leak. And below is some log result.
...
==12685== by 0x8A78AE1: NvBufSurfaceCreateImpl (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0x8A78801: NvBufSurfaceCreate (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0xEFFFD3D: gst_nvinfer_allocator_alloc(_GstAllocator*, unsigned long, _GstAllocationParams*) (in /opt/nvidia/deepstream/deepstream-4.0/lib/gst-plugins/libnvdsgst_infer.so)
==12685== by 0x4E7A054: gst_buffer_new_allocate (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1405.0)
==12685== by 0x4E7DA67: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1405.0)
==12685== by 0x4E7DB15: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1405.0)
==12685== by 0x4E7E0EB: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1405.0)
==12685== by 0x4E7E49F: gst_buffer_pool_set_active (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1405.0)
==12685== by 0xF003AB4: gst_nvinfer_start(_GstBaseTransform*) (in /opt/nvidia/deepstream/deepstream-4.0/lib/gst-plugins/libnvdsgst_infer.so)
==12685== by 0xBFDC26F: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.1405.0)
==12685== by 0xBFDC504: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.1405.0)
==12685==
==12685== Conditional jump or move depends on uninitialised value(s)
==12685== at 0x8A7A2F0: CreateCudaBufferBatch (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0x8A78AE1: NvBufSurfaceCreateImpl (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0x8A78801: NvBufSurfaceCreate (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0xEFFFD3D: gst_nvinfer_allocator_alloc(_GstAllocator*, unsigned long, _GstAllocationParams*) (in /opt/nvidia/deepstream/deepstream-4.0/lib/gst-plugins/libnvdsgst_infer.so)
==12685== by 0x4E7A054: gst_buffer_new_allocate (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1405.0)
==12685== by 0x4E7DA67: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1405.0)
==12685== by 0x4E7DB15: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1405.0)
==12685== by 0x4E7E0EB: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1405.0)
==12685== by 0x4E7E49F: gst_buffer_pool_set_active (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1405.0)
==12685== by 0xF003AB4: gst_nvinfer_start(_GstBaseTransform*) (in /opt/nvidia/deepstream/deepstream-4.0/lib/gst-plugins/libnvdsgst_infer.so)
==12685== by 0xBFDC26F: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.1405.0)
==12685== by 0xBFDC504: ??? (in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.1405.0)
==12685==
==12685== Thread 16 multiqueue0:src_:
==12685== Conditional jump or move depends on uninitialised value(s)
==12685== at 0x8A79DA8: CreateCudaBufferBatch (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0x8A78AE1: NvBufSurfaceCreateImpl (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0x8A78801: NvBufSurfaceCreate (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0xC4D6DE2D: jpeg_read_raw_data (jdapistd.c:460)
==12685== by 0xC4B4AAE1: gst_jpeg_dec_decode_direct(_GstJpegDec*, _GstVideoFrame*) (gstjpegdec.c:983)
==12685== by 0xC4B4BD42: gst_jpeg_dec_handle_frame(_GstVideoDecoder*, _GstVideoCodecFrame*) (gstjpegdec.c:1308)
==12685== by 0x881CEA0: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685== by 0x882548E: gst_video_decoder_have_frame (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685== by 0xC4B49160: gst_jpeg_dec_parse(_GstVideoDecoder*, _GstVideoCodecFrame*, _GstAdapter*, int) (gstjpegdec.c:519)
==12685== by 0x881D062: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685== by 0x881FA2B: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685== by 0x8820071: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685==
==12685== Conditional jump or move depends on uninitialised value(s)
==12685== at 0x8A7A2F0: CreateCudaBufferBatch (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0x8A78AE1: NvBufSurfaceCreateImpl (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0x8A78801: NvBufSurfaceCreate (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0xC4D6DE2D: jpeg_read_raw_data (jdapistd.c:460)
==12685== by 0xC4B4AAE1: gst_jpeg_dec_decode_direct(_GstJpegDec*, _GstVideoFrame*) (gstjpegdec.c:983)
==12685== by 0xC4B4BD42: gst_jpeg_dec_handle_frame(_GstVideoDecoder*, _GstVideoCodecFrame*) (gstjpegdec.c:1308)
==12685== by 0x881CEA0: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685== by 0x882548E: gst_video_decoder_have_frame (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685== by 0xC4B49160: gst_jpeg_dec_parse(_GstVideoDecoder*, _GstVideoCodecFrame*, _GstAdapter*, int) (gstjpegdec.c:519)
==12685== by 0x881D062: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685== by 0x881FA2B: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685== by 0x8820071: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685==
==12685== Thread 1:
==12685== Conditional jump or move depends on uninitialised value(s)
==12685== at 0x8A7A4C2: ReleaseCudaBufferBatch (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0x8A78BB9: NvBufSurfaceDestroyImpl (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0x8A7881B: NvBufSurfaceDestroy (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0xC4DA7E33: self_destruct(jpeg_common_struct*) (jmemmgr.c:1033)
==12685== by 0xC4D66781: jpeg_destroy (jcomapi.c:70)
==12685== by 0xC4D6A65D: jpeg_destroy_decompress (jdapimin.c:201)
==12685== by 0xC4B4801D: gst_jpeg_dec_finalize(_GObject*) (gstjpegdec.c:144)
==12685== by 0x518C011: g_object_unref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.5600.4)
==12685== by 0x4EA81A9: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1405.0)
==12685== by 0x4E80D76: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1405.0)
==12685== by 0x5417284: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.4)
==12685== by 0x541764F: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.4)
==12685==
==12685== Thread 31 multiqueue2:src_:
==12685== Conditional jump or move depends on uninitialised value(s)
==12685== at 0x8A7A4C2: ReleaseCudaBufferBatch (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0x8A78BB9: NvBufSurfaceDestroyImpl (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0x8A7881B: NvBufSurfaceDestroy (in /opt/nvidia/deepstream/deepstream-4.0/lib/libnvbufsurface.so)
==12685== by 0xC4D6E1C6: jpeg_read_raw_data (jdapistd.c:511)
==12685== by 0xC4B4AAE1: gst_jpeg_dec_decode_direct(_GstJpegDec*, _GstVideoFrame*) (gstjpegdec.c:983)
==12685== by 0xC4B4BD42: gst_jpeg_dec_handle_frame(_GstVideoDecoder*, _GstVideoCodecFrame*) (gstjpegdec.c:1308)
==12685== by 0x881CEA0: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685== by 0x882548E: gst_video_decoder_have_frame (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685== by 0xC4B49160: gst_jpeg_dec_parse(_GstVideoDecoder*, _GstVideoCodecFrame*, _GstAdapter*, int) (gstjpegdec.c:519)
==12685== by 0x881D062: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685== by 0x881FA2B: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
==12685== by 0x8820071: ??? (in /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1405.0)
...
The deepstream app run and until too get full memory then stuck and hang on. What I can do? thank you for your help!