Segmentation fault when running NVIDIA System Profiler 3.8


I am trying to profile an application using NVIDIA Tegra System Profiler 3.8. The application runs on a Jetson TX2 module with R28.1 BSP. The application uses system(…) to call some shell functions such as rm. This makes the system(…) crash and the application misbehaves

I traced down the issue to the environment that the application is in when the Profiler attempts to launch it.

I am trying to collect Opengl Trace, CUDA Trace, GPU Context switch trace. The profiler’s instructions state to:

CUDA (Compute Unified Device Architecture)
Launch your application with the following environment variables:

Launch your application with the following environment variables:
For 32-bit:
LD_PRELOAD="/opt/nvidia/tegra_system_profiler/ /opt/nvidia/tegra_system_profiler/"
For 64-bit:
LD_PRELOAD="/opt/nvidia/tegra_system_profiler/ /opt/nvidia/tegra_system_profiler/"

I do just that and typing in rm results in

root@tegra-ubuntu:~# CUDA_INJECTION32_PATH=/opt/nvidia/tegra_system_profiler/
root@tegra-ubuntu:~# export CUDA_INJECTION32_PATH=/opt/nvidia/tegra_system_profiler/
root@tegra-ubuntu:~# export CUDA_INJECTION64_PATH=/opt/nvidia/tegra_system_profiler/
root@tegra-ubuntu:~# export LD_PRELOAD="/opt/nvidia/tegra_system_profiler/ /opt/nvidia/tegra_system_profiler/"
root@tegra-ubuntu:~# export INJECTION_FILE64="/opt/nvidia/tegra_system_profiler/"
root@tegra-ubuntu:~# rm
rm: missing operand
Try 'rm --help' for more information.
Bus error (core dumped)

Please let me know how to resolve this issue. Thank you

3.8 is really old, consider updating your tool (it’s called Nsight Systems now:

Regarding the crash: profiling short lived applications (like rm) is not really supported. Please try profiling on longer-running application: e.g. sleep 2 should work.