Failed in mem copy

Hi, when I try running the following command:

GST_DEBUG=3 gst-launch-1.0 nvurisrcbin uri=file:///opt/nvidia/deepstream/deepstream-7.1/samples/streams/sample_1080p_h264.mp4 ! m.sink_0 nvstreammux name=m batch-size=1 width=1200 height=1920 ! nvvideoconvert ! x264enc ! h264parse ! mp4mux ! fakesink

I get the following error:

/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform_copy.cpp:341: => Failed in mem copy

/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform_copy.cpp:438: => Failed in mem copy

Environment:

  • Jetson Orin Nano
  • JetPack 6.2
  • Deepstream 7.1

The error is not consistent, it may appear or not when running the command above.

Has anyone encountered this error before?

Thank you

1 Like

DeepStream 7.1 is compatible with Jetpack 6.1 GA. Could you try that on the Jetpack 6.1 GA version?

I downgraded to Jetpack 6.0 DP and Deepstream 6.4 and the error does not appear at all. Not sure if it’s a bug that was introduced with Deepstream 7.x.

No. I have tried that on my Jetpack 6.1 and DeepStream 7.1, it works well. Deepstream needs to be compatible with the Jetpack version. You can refer to our Jetson model Platform and OS Compatibility. DeepStream 7.1 is currently not compatible with Jetpack 6.2.

Oh, thanks for the clarification. I was mislead when downloading Jetpack 6.2.

OK. Thanks for the clarification from the Guide of the Jetpack SDK. We’ll check this ASAP.

Hello, I experienced the same problem with Jetpack 6.2 and Deepstream 7.1. Could you please tell approximately when do you plan to release next deepstream version that is compatible with JP 6.2 ?

Also, the documentation still indicates that deepstream 7.1 is compatible with JP6.2.

The reason why I am asking is that when I try to install jetpack components by sudo apt install nvidia-jetpack it automatically upgrades JP6.1 to JP6.2 and I start having incompatibility issues with deepstream 7.1.

I also tried to specify jetpack version as sudo apt install nvidia-jetpack=6.1+b123 however I got unmet dependencies error. How can I install components of JP6.1 without updating it?

Thank you.

I have tried that on my side, the pipeline works well. I use the sdkmanager to install the latest Jetpack version. Could you try that again on your side?
Below is the version I installed.

nvidia@ubuntu:~$ sudo apt-cache show nvidia-jetpack
Package: nvidia-jetpack
Source: nvidia-jetpack (6.2)

so Nvidia released Jetpack(6.2) version without compatible Deepstream version?

You can run DeepStream 7.1 on the Jetpack 6.2. I have tried that on my board. It works well. The version I installed is shown in the comment above.

I have to apply driver patches and create a custom kernel image to flash my jetson with support for some camera. Is it possible to flash custom kernel image using the sdkmanager? If not, I have to stick with command line flashing and installing deepstream after the flash process. In that case, I am still getting the first mentioned error.

The same pipeline is working without a problem on JetPack 6.0 with DeepStream 7.0, flashed with the same custom image except the jetpack versions are different.

Also, I tried other cameras which jetson supports natively, and got the same error.

I install the deepstream using the following commands

wget -q --content-disposition 'https://api.ngc.nvidia.com/v2/resources/org/nvidia/deepstream/7.1/files?redirect=true&path=deepstream_sdk_v7.1.0_jetson.tbz2' -O deepstream_sdk_v7.1.0_jetson.tbz2
sudo tar -xvf deepstream_sdk_v7.1.0_jetson.tbz2 -C /
cd /opt/nvidia/deepstream/deepstream-7.1/
sudo ./install.sh
sudo ldconfig

Thanks.

Hi @alprnn , your issue could be a new problem. Could you file a new topic about your issue and describe in detail how you receive patches and flash the jetson. Thanks

Thanks, I will do that.

Just tried again, Jetpack 6.2 with Deepstream 7.1, and ran the command on the first comment:

GST_DEBUG=3 gst-launch-1.0 nvurisrcbin uri=file:///opt/nvidia/deepstream/deepstream-7.1/samples/streams/sample_1080p_h264.mp4 ! m.sink_0 nvstreammux name=m batch-size=1 width=1200 height=1920 ! nvvideoconvert ! x264enc ! h264parse ! mp4mux ! fakesink

It does still “sometimes” output: /dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform_copy.cpp:438: => Failed in mem copy.

It’s not a consistent error, but does appear occasionally. Whereas with Jetpack 6.0 DP and Deepstream 6.4, that error never appears.

Could you calculate the probability of that memory copy issue or look for the conditions under which this problem occurs? Also you can also try the Jetpack 6.1 and DeepStream 7.1. They have better compatibility.

I just tried Jetpack 6.1 with Deepstream 7.1 and also had those issues (more or less 33% of the times that I run the command). I would run the command in terminal without any other program run by me.

Right now, I have just installed Jetpack 6.0 GA with Deepstream 7.0 and it’s working fine at the moment without the memory issue.

OK. Thanks for your further analysis. We’ll investigate this problem as soon as possible.

Hi @kranok, thanks a lot for pointing this issue out, and we will be fixing it in the uncoming release.
Currently, you can try the below pipeline first as a WAR.

GST_DEBUG=3 gst-launch-1.0 nvurisrcbin uri=file:///opt/nvidia/deepstream/deepstream-7.1/samples/streams/sample_1080p_h264.mp4 ! m.sink_0 nvstreammux name=m batch-size=1 width=1200 height=1920 ! nvvideoconvert compute-hw=1 nvbuf-memory-type=3 ! x264enc ! h264parse ! mp4mux ! fakesink

Hello again,

I am getting this error when I apply the workaround solution.


/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform.cpp:4543: => Surface type not supported for transformation NVBUF_MEM_CUDA_UNIFIED

What does this error mean? Thanks.

Are you using the pipeline I attached? If you are using your own pipeline, that might be a new issue. Please file a new topic. Thanks