Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) : Jetson AGX Orin
• DeepStream Version : 7.1
• JetPack Version (valid for Jetson only) : 6.1
• TensorRT Version : 10.3
I had successfully implemented custom face swapping pipeline using inswapper model in Deepstream 7.0 , Jetpack 6.0. However, after updating Jetpack to 6.1 and Deepstream to 7.1, the pipeline throws double free error.
I have tried the migration guide following the link Application Migration to DeepStream 7.1 from DeepStream 7.0 — DeepStream documentation
but was showing couldn’t open custom library.
So, I updated the Makefile to include newer cuda and deepstream version and build the library.
After debuging using valgrind the following log is observed
==726201== Invalid free() / delete / delete / realloc()
==726201== at 0x4867AD0: free (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
==726201== by 0x4E63A17: ??? (in /opt/nvidia/deepstream/deepstream-7.1/lib/libnvds_meta.so)
==726201== by 0x4E63093: nvds_destroy_batch_meta (in /opt/nvidia/deepstream/deepstream-7.1/lib/libnvds_meta.so)
==726201== by 0x48FDDEB: gst_buffer_foreach_meta (in /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.2003.0)
==726201== by 0x4903917: gst_buffer_pool_release_buffer (in /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.2003.0)
==726201== by 0x4903A3F: ??? (in /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.2003.0)
==726201== by 0x493B7F7: gst_mini_object_unref (in /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.2003.0)
==726201== by 0x1B0A646F: ??? (in /opt/nvidia/deepstream/deepstream-7.1/lib/gst-plugins/libnvdsgst_multistream.so)
==726201== by 0x4944A77: ??? (in /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.2003.0)
==726201== by 0x4947CB7: ??? (in /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.2003.0)
==726201== by 0x49480E7: gst_pad_push (in /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.2003.0)
==726201== by 0x36EB6F2F: ??? (in /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstcoreelements.so)
==726201== Address 0x43b03dc0 is 0 bytes inside a block of size 544 free’d
==726201== at 0x48682F0: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
==726201== by 0x3822AECB: ??? (in /opt/nvidia/deepstream/deepstream-7.1/lib/gst-plugins/libnvdsgst_infer.so)
==726201== by 0x4E64067: nvds_clear_meta_list (in /opt/nvidia/deepstream/deepstream-7.1/lib/libnvds_meta.so)
==726201== by 0x4E64243: ??? (in /opt/nvidia/deepstream/deepstream-7.1/lib/libnvds_meta.so)
==726201== by 0x4E64067: nvds_clear_meta_list (in /opt/nvidia/deepstream/deepstream-7.1/lib/libnvds_meta.so)
==726201== by 0x4E64107: ??? (in /opt/nvidia/deepstream/deepstream-7.1/lib/libnvds_meta.so)
==726201== by 0x4E639F7: ??? (in /opt/nvidia/deepstream/deepstream-7.1/lib/libnvds_meta.so)
==726201== by 0x4E6306B: nvds_destroy_batch_meta (in /opt/nvidia/deepstream/deepstream-7.1/lib/libnvds_meta.so)
==726201== by 0x48FDDEB: gst_buffer_foreach_meta (in /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.2003.0)
==726201== by 0x4903917: gst_buffer_pool_release_buffer (in /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.2003.0)
==726201== by 0x4903A3F: ??? (in /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.2003.0)
==726201== by 0x493B7F7: gst_mini_object_unref (in /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.2003.0)
==726201== Block was alloc’d at
==726201== at 0x4869F34: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so)
==726201== by 0x4B51797: g_malloc0 (gmem.c:163)
==726201== by 0x4E63867: ??? (in /opt/nvidia/deepstream/deepstream-7.1/lib/libnvds_meta.so)
==726201== by 0x4E62FC7: nvds_create_batch_meta (in /opt/nvidia/deepstream/deepstream-7.1/lib/libnvds_meta.so)
==726201== by 0x1B0A1E47: ??? (in /opt/nvidia/deepstream/deepstream-7.1/lib/gst-plugins/libnvdsgst_multistream.so)
==726201== by 0x497180B: ??? (in /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.2003.0)
==726201== by 0x4B78AB7: g_thread_pool_thread_proxy (gthreadpool.c:350)
==726201== by 0x4B78063: g_thread_proxy (gthread.c:831)
==726201== by 0x5C1D5C7: start_thread (pthread_create.c:442)
==726201== by 0x5C85EDB: thread_start (clone.S:79)
==726201==
The issue occurs after the secondary inference and before the custom probe function within deepstream-app which does the post processing using the output tensor metadata from secondary inference.
below is my pipeline flow