Deepstream 5.0 to 5.1 - free(): invalid size error

I am attempting to run my Deepstream 5.0 app with the new 5.1 SDK.

It begins to run but then I always see free(): invalid size error.

Here is the backtrace from gdb:

(gdb) bt
#0  0x0000007fb7a664f8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x0000007fb7a678d4 in __GI_abort () at abort.c:79
#2  0x0000007fb7aa068c in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7fb7b616f8 "%s\n")
    at ../sysdeps/posix/libc_fatal.c:181
#3  0x0000007fb7aa6a04 in malloc_printerr (str=str@entry=0x7fb7b5d2e0 "free(): invalid size") at malloc.c:5342
#4  0x0000007fb7aa8300 in _int_free (av=0x7fb7b87a70 <main_arena>, p=0x556c3ec290, have_lock=0) at malloc.c:4171
#5  0x0000007f9ed5471c in  () at /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_infer.so
#6  0x0000007fb7c0594c in  () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#7  0x0000007fffffe4a8 in  ()

Any suggestions on how to troubleshoot this would be greatly appreciated.

Hey, nvinfer plugin is open sourced, could you recompile the libnvdsgst_infer.so with -g option and see where the excution occur, anyway I think the issue should be caused by your setup, could you follow the Quickstart Guide — DeepStream 6.1.1 Release documentation