In the code example used in DS 6.1.1 - NvBufSurfaceMap - SIGSEGV which is based on DeepStream SDK FAQ - #17 by mchi there is no usage of parameters -1, -1 (map all indexes and all planes). The code works only when tmp_surf->batchSize == 1 or tmp_surf->batchSize == nvinfer->tmp_surf.numFilled.
The SIGSEGV occurs in /usr/lib/aarch64-linux-gnu/tegra/libnvbufsurface.so.1.0.0 when tmp_surf->batchSize != nvinfer->tmp_surf.numFilled (the batch is partially filled) and function NvBufSurfaceMap (&nvinfer->tmp_surf, -1, -1, NVBUF_MAP_READ) is called. I have changed my implementation to do per-index surface mapping and it works fine. The bug with parameters -1, -1 used in function NvBufSurfaceMap in combination with partially filled batch occured in DS since version 6.
the above code works only if tmp_surf->batchSize == tmp_surf->numFilled
in case tmp_surf->batchSize > tmp_surf->numFilled the crash occurs
this can be done by setting bigger batch size (in my case 12) to the gie and setting some batched-push-timeout to nvstreammux so that the batch won’t fill up
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
I cannot repro your problems in my env. Could you attach a minimized demo app and your gstnvinfer.cpp file for this problem?
Also, you can update the DeepStream to the latest version(6.2) and check if the problem still exists.