Dear Reader,
I encountered a runtime error on orin nano that system reported an illegal memory acces when it was running the code of cudaMalloc to allocate GPU memory for images.
What is the cause and is there any debugger for CUDA?
Alex
code::
double* temp1 = nullptr;
for (int i = 0; i < config.N; ++i) {
HANDLE_ERROR(cudaMalloc((void**)&temp1, nSize * sizeof(double)));
HANDLE_ERROR(cudaMemcpy(temp1, imgs[i].data, nSize * sizeof(double), cudaMemcpyHostToDevice));
}
========= COMPUTE-SANITIZER
========= Internal Sanitizer Error: Failed to initialize mobile debugger interface. Please check that /dev NVIDIA nodes have the correct permissions
========= Internal Sanitizer Error: Device not supported. Please refer to the “Supported Devices” section of the sanitizer documentation
========= Program hit an illegal memory access was encountered (error 700) on CUDA API call to cudaMemcpy.
========= Saved host backtrace up to driver entry point at error
========= Host Frame: [0x2b72d4]
========= in /usr/lib/aarch64-linux-gnu/tegra/libcuda.so.1
========= Host Frame: [0x8bee4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x13e24]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x17158]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x106c4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame:__libc_start_main [0x20e10]
========= in /lib/aarch64-linux-gnu/libc.so.6
========= Host Frame: [0x10f20]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Program hit an illegal memory access was encountered (error 700) on CUDA API call to cudaMemcpy.
========= Saved host backtrace up to driver entry point at error
========= Host Frame: [0x2b72d4]
========= in /usr/lib/aarch64-linux-gnu/tegra/libcuda.so.1
========= Host Frame: [0x8bee4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x13e3c]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x17158]
========= in /home/zhouxian/Cud========= COMPUTE-SANITIZER
========= Internal Sanitizer Error: Failed to initialize mobile debugger interface. Please check that /dev NVIDIA nodes have the correct permissions
========= Internal Sanitizer Error: Device not supported. Please refer to the “Supported Devices” section of the sanitizer documentation
========= Program hit an illegal memory access was encountered (error 700) on CUDA API call to cudaMemcpy.
========= Saved host backtrace up to driver entry point at error
========= Host Frame: [0x2b72d4]
========= in /usr/lib/aarch64-linux-gnu/tegra/libcuda.so.1
========= Host Frame: [0x8bee4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x13e24]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x17158]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x106c4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame:__libc_start_main [0x20e10]
========= in /lib/aarch64-linux-gnu/libc.so.6
========= Host Frame: [0x10f20]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Program hit an illegal memory access was encountered (error 700) on CUDA API call to cudaMemcpy.
========= Saved host backtrace up to driver entry point at error
========= Host Frame: [0x2b72d4]
========= in /usr/lib/aarch64-linux-gnu/tegra/libcuda.so.1
========= Host Frame: [0x8bee4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x13e3c]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x17158]
========= in /home/zhouxian/Cud========= COMPUTE-SANITIZER
========= Internal Sanitizer Error: Failed to initialize mobile debugger interface. Please check that /dev NVIDIA nodes have the correct permissions
========= Internal Sanitizer Error: Device not supported. Please refer to the “Supported Devices” section of the sanitizer documentation
========= Program hit an illegal memory access was encountered (error 700) on CUDA API call to cudaMemcpy.
========= Saved host backtrace up to driver entry point at error
========= Host Frame: [0x2b72d4]
========= in /usr/lib/aarch64-linux-gnu/tegra/libcuda.so.1
========= Host Frame: [0x8bee4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x13e24]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x17158]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x106c4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame:__libc_start_main [0x20e10]
========= in /lib/aarch64-linux-gnu/libc.so.6
========= Host Frame: [0x10f20]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Program hit an illegal memory access was encountered (error 700) on CUDA API call to cudaMemcpy.
========= Saved host backtrace up to driver entry point at error
========= Host Frame: [0x2b72d4]
========= in /usr/lib/aarch64-linux-gnu/tegra/libcuda.so.1
========= Host Frame: [0x8bee4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x13e3c]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x17158]
========= in /home/zhouxian/Cud========= COMPUTE-SANITIZER
========= Internal Sanitizer Error: Failed to initialize mobile debugger interface. Please check that /dev NVIDIA nodes have the correct permissions
========= Internal Sanitizer Error: Device not supported. Please refer to the “Supported Devices” section of the sanitizer documentation
========= Program hit an illegal memory access was encountered (error 700) on CUDA API call to cudaMemcpy.
========= Saved host backtrace up to driver entry point at error
========= Host Frame: [0x2b72d4]
========= in /usr/lib/aarch64-linux-gnu/tegra/libcuda.so.1
========= Host Frame: [0x8bee4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x13e24]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x17158]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x106c4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame:__libc_start_main [0x20e10]
========= in /lib/aarch64-linux-gnu/libc.so.6
========= Host Frame: [0x10f20]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Program hit an illegal memory access was encountered (error 700) on CUDA API call to cudaMemcpy.
========= Saved host backtrace up to driver entry point at error
========= Host Frame: [0x2b72d4]
========= in /usr/lib/aarch64-linux-gnu/tegra/libcuda.so.1
========= Host Frame: [0x8bee4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x13e3c]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x17158]
========= in /home/zhouxian/Cud========= COMPUTE-SANITIZER
========= Internal Sanitizer Error: Failed to initialize mobile debugger interface. Please check that /dev NVIDIA nodes have the correct permissions
========= Internal Sanitizer Error: Device not supported. Please refer to the “Supported Devices” section of the sanitizer documentation
========= Program hit an illegal memory access was encountered (error 700) on CUDA API call to cudaMemcpy.
========= Saved host backtrace up to driver entry point at error
========= Host Frame: [0x2b72d4]
========= in /usr/lib/aarch64-linux-gnu/tegra/libcuda.so.1
========= Host Frame: [0x8bee4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x13e24]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x17158]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x106c4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame:__libc_start_main [0x20e10]
========= in /lib/aarch64-linux-gnu/libc.so.6
========= Host Frame: [0x10f20]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Program hit an illegal memory access was encountered (error 700) on CUDA API call to cudaMemcpy.
========= Saved host backtrace up to driver entry point at error
========= Host Frame: [0x2b72d4]
========= in /usr/lib/aarch64-linux-gnu/tegra/libcuda.so.1
========= Host Frame: [0x8bee4]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x13e3c]
========= in /home/zhouxian/CudaRuntime3/CudaRuntime3/build/./structureLight_cuda
========= Host Frame: [0x17158]
========= in /home/zhouxian/CuddaRuntime3/CudaRuntime3/kernel.cu at line 653
========= Target application returned an error
========= ERROR SUMMARY: 5 errors