Segmentation fault when running NVIDIA System Profiler 3.8

Hello,

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:
CUDA_INJECTION32_PATH=/opt/nvidia/tegra_system_profiler/libToolsInjection32.so
CUDA_INJECTION64_PATH=/opt/nvidia/tegra_system_profiler/libToolsInjection64.so

OpenGL
Launch your application with the following environment variables:
For 32-bit:
LD_PRELOAD="/opt/nvidia/tegra_system_profiler/libToolsInjection32.so /opt/nvidia/tegra_system_profiler/libToolsInjectionProxy32.so"
INJECTION_FILE32="/opt/nvidia/tegra_system_profiler/libToolsInjection32.so"
For 64-bit:
LD_PRELOAD="/opt/nvidia/tegra_system_profiler/libToolsInjection64.so /opt/nvidia/tegra_system_profiler/libToolsInjectionProxy64.so"
INJECTION_FILE64="/opt/nvidia/tegra_system_profiler/libToolsInjection64.so"

I do just that and typing in rm results in

root@tegra-ubuntu:~# CUDA_INJECTION32_PATH=/opt/nvidia/tegra_system_profiler/libToolsInjection32.so
root@tegra-ubuntu:~# export CUDA_INJECTION32_PATH=/opt/nvidia/tegra_system_profiler/libToolsInjection32.so
root@tegra-ubuntu:~# export CUDA_INJECTION64_PATH=/opt/nvidia/tegra_system_profiler/libToolsInjection64.so
root@tegra-ubuntu:~# export LD_PRELOAD="/opt/nvidia/tegra_system_profiler/libToolsInjection64.so /opt/nvidia/tegra_system_profiler/libToolsInjectionProxy64.so"
root@tegra-ubuntu:~# export INJECTION_FILE64="/opt/nvidia/tegra_system_profiler/libToolsInjection64.so"
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

Hi!
3.8 is really old, consider updating your tool (it’s called Nsight Systems now: https://developer.nvidia.com/nsight-systems#Jetson)

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.