Description
Build libByteTracker.so as per the instruction given in (README.md), but replace cmake .. with cmake -DCMAKE_BUILD_TYPE=Release to enable optimizations. Running a GStreamer pipeline with the built library file takes up all system memory immediately and crashes with OOM error.
To Reproduce
Launch Docker container, set the memory limit to avoid screwing up the host system.
docker run --rm -it --gpus=all --memory=4G nvcr.io/nvidia/deepstream:6.1-devel
Install dependencies.
apt update && apt install -y libeigen3-dev
Clone repo and build libByteTracker.so.
cd /root
git clone --depth 1 https://github.com/ifzhang/ByteTrack/
cd ByteTrack/deploy/DeepStream
mkdir build && cd build
# cmake -> /usr/local/bin/cmake version is 3.15.2
# /usr/bin/cmake version is 3.16.3
/usr/bin/cmake -DCMAKE_BUILD_TYPE=Release ..
make
Description Build
libByteTracker.so
as per the instruction given in (README.md), but replacecmake ..
withcmake -DCMAKE_BUILD_TYPE=Release
to enable optimizations. Running a GStreamer pipeline with the built library file takes up all system memory immediately and crashes with OOM error.To Reproduce
libByteTracker.so
.Additional Information The issue is probably caused by missing return value in
NvMOTContext::processFrame
, which is an undefined behaviour that could lead to bad compiler optimizations. https://github.com/ifzhang/ByteTrack/blob/72ca8b45d36caf5a39e949c6aa815d9abffd1ab5/deploy/DeepStream/src/NvMOTContext.cpp#L9-L56 Simply appendreturn NvMOTStatus_OK;
at the end of the function, rebuild the library, and the issue is fixed (tested on my local machine).