I’m not sure about this because I haven’t experienced it either.
If you post on the topic on the forum, nvidia will respond.
When the article comes up, I will look at it with interest.
Hi,
It looks to be concurrent access to certain buffers(CUDA or NvBuffer). We have the implementation open source. Would need your help to check the default code and share us a patch and steps to replicate the issue. So that we check further.
And please provide your release version( $ head -1 /etc/nv_tegra_release )
Hi,
The issue is very likely to be in step 2. The buffer is allocated through cudaMallocManaged. If it is accessed by CPU and GPU concurrnetly, it triggers the issue. MAybe you can use malloc and call NvBufferMemMap/NvBufferMemUnMap to get data pointer of decoded frames, to copy the data out.
Maybe, but my program doesn’t access the buffer concurrently.
The reason I use cudaMallocManaged is to avoid copying data, because copying will increase CPU usage. I just want to decode the frame to GPU buffer, and pass it to ffmpeg. And the upper layer application could use the GPU buffer to render directly.
My program is just based on the ffmpeg package you mentioned.
In this package, the decoded frames are copyed from NvBuffer to ffmpeg buffer by ff_get_buffer and av_image_copy.
I want to avoid this copying, so I modified some code. In my implementation, I use cudaMallocManaged instead of malloc for ctx->bufptr_n. Application get the decoded frames by ffmpeg API and access the GPU buffer directly by CUDA API.
The process seems to be OK, but I often get the following message:
NVMAP_IOC_READ failed: Interrupted system call
I want to know how to fix this error or if there is any other way to solve my problem.