Tegra Graphics Debugger: Segmentation Fault while debugging Graphics samples

Downloaded graphics samples from https://github.com/NVIDIAGameWorks/GraphicsSamples
Ubuntu 16.04 on my host system.
Trying to debug bloom example but getting error…

[Status] Connecting 192.168.1.112:22 ...
[Status] nvidia@192.168.1.112:22 is connected.
[Status] Remote debugger has been installed successfully.
[Status] Detected target device running SHELL /bin/bash

[Status] /home/nvidia/GraphicsSamples/samples/bin/linux-aarch64/Bloom is launched.
[Status] Searching processes ...
[Bloom] bash: line 1: 14422 Segmentation fault      (core dumped) DISPLAY=:0 LD_PRELOAD=/home/nvidia/.tgd/libs/libNvidia_gfx_debugger.so "/home/nvidia/GraphicsSamples/samples/bin/linux-aarch64/Bloom"
[Bloom] 
[Status] Searching is canceled.
[Status] Target process exits.

Hi Bhavin_darji,

That GameWorks Graphics Samples hasn’t support inux x86/x64 and Linux for Tegra officially yet, but for Android and Windows now.

Thanks

Hello,
Those examples are working on TX2.
I got that error because I was using Jetpack 3.2.
But using Jetpack 3.1 version I am able to debug those examples…

Hello,
I am able to debug GameWorks Graphics Samples using Tegra Graphics Debugger 2.4 (Jetpack 3.1) but getting above error using Tegra Graphics Debugger 2.5 (Jetpack 3.2). Please look into it…

Hi,

In order to narrow down the cause, could you try if this issue can be reproduced by CUDA samples?
Maybe EGLStreams_CUDA_Interop located at 3_Imaging?

Thanks.

Hello,
Done testing on 2 examples(OcenFFT and EGLStreams_CUDA_Interop) and got this output:

[Status] Connecting 192.168.1.112:22 ...
[Status] nvidia@192.168.1.112:22 is connected.
[Status] Remote debugger disabled.
[Status] Installing debugger to device...
[Status] Remote debugger has been installed successfully.
[Status] Detected target device running SHELL /bin/bash

[Status] /home/nvidia/NVIDIA_CUDA-9.0_Samples/5_Simulations/oceanFFT/oceanFFT is launched.
[Status] Searching processes ...
[oceanFFT] bash: line 1:  6440 Segmentation fault      (core dumped) DISPLAY=:0 LD_PRELOAD=/home/nvidia/.tgd/libs/libNvidia_gfx_debugger.so "/home/nvidia/NVIDIA_CUDA-9.0_Samples/5_Simulations/oceanFFT/oceanFFT"
[oceanFFT] 
[Status] Searching is canceled.
[Status] Target process exits.
[Status] Detected target device running SHELL /bin/bash

[Status] /home/nvidia/NVIDIA_CUDA-9.0_Samples/3_Imaging/EGLStreams_CUDA_Interop/EGLStreams_CUDA_Interop is launched.
[Status] Searching processes ...
[EGLStreams_CUDA_Interop] eglDisplay Handle created 
[EGLStreams_CUDA_Interop] EGLStream initialized
[EGLStreams_CUDA_Interop] Connected CUDA consumer, CudaConsumer 0xdd04c0
[EGLStreams_CUDA_Interop] Connect CUDA producer Done, CudaProducer 0xdd0b50
[EGLStreams_CUDA_Interop] main - Cuda Producer and Consumer Initialized.
[EGLStreams_CUDA_Interop] Running for YUV frame and Pitchlinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Running for YUV frame and Pitchlinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] main - Cuda Producer and Consumer Initialized.
[EGLStreams_CUDA_Interop] Running for ARGB frame and Pitchlinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Running for ARGB frame and Pitchlinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] main - Cuda Producer and Consumer Initialized.
[EGLStreams_CUDA_Interop] Running for YUV frame and BlockLinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Running for YUV frame and BlockLinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] main - Cuda Producer and Consumer Initialized.
[EGLStreams_CUDA_Interop] Running for ARGB frame and BlockLinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Running for ARGB frame and BlockLinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Producer and Consumer Disconnected 
[EGLStreams_CUDA_Interop] &&&& EGLStream interop test PASSED
[EGLStreams_CUDA_Interop] 
[EGLStreams_CUDA_Interop] *** Error in `/home/nvidia/NVIDIA_CUDA-9.0_Samples/3_Imaging/EGLStreams_CUDA_Interop/EGLStreams_CUDA_Interop': corrupted double-linked list: 0x0000000000495300 ***
[EGLStreams_CUDA_Interop] bash: line 1:  6482 Aborted                 (core dumped) DISPLAY=:0 LD_PRELOAD=/home/nvidia/.tgd/libs/libNvidia_gfx_debugger.so "/home/nvidia/NVIDIA_CUDA-9.0_Samples/3_Imaging/EGLStreams_CUDA_Interop/EGLStreams_CUDA_Interop"
[EGLStreams_CUDA_Interop] 
[Status] Searching is canceled.
[Status] Target process exits.

Hi,

Could you apply this command and retry EGLStreams_CUDA_Interop sample?

export DISPLAY=:0

Tanks.

Hello,
These are the default arguments:

DISPLAY=:0 HOME=/home/nvidia LANG=en_US.UTF-8 LOGNAME=nvidia MAIL=/var/mail/nvidia PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PWD=/home/nvidia SHELL=/bin/bash SHLVL=1 SSH_CLIENT=192.168.1.104 40854 22 SSH_CONNECTION=192.168.1.104 40854 192.168.1.112 22 USER=nvidia XDG_RUNTIME_DIR=/run/user/1001 XDG_SESSION_ID=34

And this is the output:

[Status] /home/nvidia/NVIDIA_CUDA-9.0_Samples/3_Imaging/EGLStreams_CUDA_Interop/EGLStreams_CUDA_Interop is launched.
[Status] Searching processes ...
[EGLStreams_CUDA_Interop] eglDisplay Handle created 
[EGLStreams_CUDA_Interop] EGLStream initialized
[EGLStreams_CUDA_Interop] Connected CUDA consumer, CudaConsumer 0xdd04c0
[EGLStreams_CUDA_Interop] Connect CUDA producer Done, CudaProducer 0xdd0b50
[EGLStreams_CUDA_Interop] main - Cuda Producer and Consumer Initialized.
[EGLStreams_CUDA_Interop] Running for YUV frame and Pitchlinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Running for YUV frame and Pitchlinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] main - Cuda Producer and Consumer Initialized.
[EGLStreams_CUDA_Interop] Running for ARGB frame and Pitchlinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Running for ARGB frame and Pitchlinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] main - Cuda Producer and Consumer Initialized.
[EGLStreams_CUDA_Interop] Running for YUV frame and BlockLinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Running for YUV frame and BlockLinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] main - Cuda Producer and Consumer Initialized.
[EGLStreams_CUDA_Interop] Running for ARGB frame and BlockLinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Running for ARGB frame and BlockLinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Producer and Consumer Disconnected 
[EGLStreams_CUDA_Interop] &&&& EGLStream interop test PASSED
[EGLStreams_CUDA_Interop] 
[EGLStreams_CUDA_Interop] *** Error in '/home/nvidia/NVIDIA_CUDA-9.0_Samples/3_Imaging/EGLStreams_CUDA_Interop/EGLStreams_CUDA_Interop': corrupted double-linked list: 0x0000000000495300 ***
[EGLStreams_CUDA_Interop] bash: line 1: 14866 Aborted                 (core dumped) DISPLAY=:0 LD_PRELOAD=/home/nvidia/.tgd/libs/libNvidia_gfx_debugger.so "/home/nvidia/NVIDIA_CUDA-9.0_Samples/3_Imaging/EGLStreams_CUDA_Interop/EGLStreams_CUDA_Interop"
[EGLStreams_CUDA_Interop] 
[Status] Searching is canceled.
[Status] Target process exits.

[Status] /home/nvidia/NVIDIA_CUDA-9.0_Samples/5_Simulations/oceanFFT/oceanFFT is launched.
[Status] Searching processes ...
[oceanFFT] bash: line 1: 14953 Segmentation fault      (core dumped) DISPLAY=:0 LD_PRELOAD=/home/nvidia/.tgd/libs/libNvidia_gfx_debugger.so "/home/nvidia/NVIDIA_CUDA-9.0_Samples/5_Simulations/oceanFFT/oceanFFT"
[oceanFFT] 
[Status] Searching is canceled.
[Status] Target process exits.

After removing the DISPLAY argument, getting this output:

[Status] /home/nvidia/NVIDIA_CUDA-9.0_Samples/3_Imaging/EGLStreams_CUDA_Interop/EGLStreams_CUDA_Interop is launched.
[Status] Searching processes ...
[EGLStreams_CUDA_Interop] eglDisplay Handle created 
[EGLStreams_CUDA_Interop] EGLStream initialized
[EGLStreams_CUDA_Interop] Connected CUDA consumer, CudaConsumer 0xdcf6f0
[EGLStreams_CUDA_Interop] Connect CUDA producer Done, CudaProducer 0xdcfd80
[EGLStreams_CUDA_Interop] main - Cuda Producer and Consumer Initialized.
[EGLStreams_CUDA_Interop] Running for YUV frame and Pitchlinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Running for YUV frame and Pitchlinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] main - Cuda Producer and Consumer Initialized.
[EGLStreams_CUDA_Interop] Running for ARGB frame and Pitchlinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Running for ARGB frame and Pitchlinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] main - Cuda Producer and Consumer Initialized.
[EGLStreams_CUDA_Interop] Running for YUV frame and BlockLinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Running for YUV frame and BlockLinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] main - Cuda Producer and Consumer Initialized.
[EGLStreams_CUDA_Interop] Running for ARGB frame and BlockLinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Running for ARGB frame and BlockLinear input
[EGLStreams_CUDA_Interop] Frame check Passed
[EGLStreams_CUDA_Interop] Producer and Consumer Disconnected 
[EGLStreams_CUDA_Interop] &&&& EGLStream interop test PASSED
[EGLStreams_CUDA_Interop] 
[Status] Searching is canceled.
[Status] Target process exits.


[Status] /home/nvidia/NVIDIA_CUDA-9.0_Samples/5_Simulations/oceanFFT/oceanFFT is launched.
[Status] Searching processes ...
[oceanFFT] bash: line 1: 14993 Segmentation fault      (core dumped) LD_PRELOAD=/home/nvidia/.tgd/libs/libNvidia_gfx_debugger.so "/home/nvidia/NVIDIA_CUDA-9.0_Samples/5_Simulations/oceanFFT/oceanFFT"
[oceanFFT] 
[Status] Searching is canceled.
[Status] Target process exits.

Hi,

We have tested the EGLStreams_CUDA_Interop sample and it runs successfully.

How do you install EGL libaries?
Could you try following commands and rerun the sample?

sudo apt-get install libegl1-mesa-dev
sudo apt-get install libgles2-mesa-dev
cd /usr/lib/aarch64-linux-gnu/
sudo ln -sf tegra-egl/libEGL.so libEGL.so

Thanks.

Hello,

I followed your steps and still getting the same output. If the issue is related to setup in TX2 then why I am able to debug using Tegra Graphics Debugger 2.4 (Jetpack 3.1)…?

Hi,

Sorry for the incorrect message before.
We executed the sample without using System Profiler.

We are trying to reproduce this issue internally.
Do you mean you can successfully run oceanFFT sample with System Profiler included in JetPack-3.1?

Thanks.

Hello,
Yes, I am able to debug ocenFFT example using Tegra Graphics Debugger 2.4 (Jetpack 3.1).

Hi,

We can successfully profile oceanFFT sample with NVIDIA System Profiler 4.0.

In case this error is caused by different environment setting.
Could you share your detail setting steps with us?

Thanks.

Hello,
I think there is little misunderstanding…
What I am trying to use is Tegra graphics debugger 2.5 and what you are using is NVIDIA System Profiler 4.0.

Hi,

Sorry for the missing.
We will re-check this and update information to you later.

Hi,

We hit the segmentation fault with EGLStreams_CUDA_Interop on both Tegra graphics debugger 2.4(JetPack3.1) and 2.5(JetPack3.2).
In order to align the environment between us, could you share your successful steps on 2.4 with us?

Thanks.

Hello,
I haven’t done any special step for Tegra graphics debugger 2.4. From the jetpack 3.1 setup, I extracted the setup 2017_06_14_0412-22311683-NVIDIA_Tegra_Graphics_Debugger_2.4.17165.0412_Release_External_tgd-l4t_linux-l4t.run and installed it at the default location and followed the same procedure/step.

Hi,

We can reproduce this issue in our environment.
Will discuss this issue with our internal team and update to you.

Thanks.

Hi,

Sorry to keep you waiting.
After discussing with internal TGD team, the CUDA/OPENGL interpo is NOT supported.

Thanks.