Very slow debugging and crashing

Hello, using Nsight 1.5.1 in VS2012 on a medium size codebase. I can debug on the TAPD samples with enough efficiency but on my project codebase it’s almost unusable.
The project contains 4 static libraries and I wonder if this seems to be the issue. I’ve read all the threads in this forum but I do not think they apply since I can get breakpoints in all areas of the code & static libs, sometimes. Performance seems to degrade after hitting a breakpoint or two.

From the log file, it always seems to timeout.

Is there anything I can do to debug this issue or provide more insight to help find the problem ?

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\NVIDIA\Nsight Tegra\1.5.1\Nsight Tegra VSE.log

2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] stdout: 71^done,stack=[frame={level=“0”,addr=“0x5f974114”,func=“PNavigation::PNavMesh::debugDraw”,file=“Navigation/Navigation.cpp”,fullname=“C:/DevSys/Engine/Core/Navigation/Navigation.cpp”,line=“489”,from=“libNavigation.so”},frame={level=“1”,addr=“0x5f81cef4”,func=“PNavigationSample::render”,file=“Navigation.cpp”,fullname=“C:/DevSys/Engine/Samples/Navigation/Navigation.cpp”,line=“495”,from=“libNavigation.so”},frame={level=“2”,addr=“0x5fc44618”,func=“PFramework::PApplication::frame”,file=“FrameworkApplication.cpp”,fullname=“C:/DevSys/Engine/Framework/FrameworkApplication.cpp”,line=“936”,from=“libNavigation.so”},frame={level=“3”,addr=“0x5fc43c18”,func=“PFramework::PApplication::onRender”,file=“FrameworkApplication.cpp”,fullname=“C:/DevSys/Engine/Framework/FrameworkApplication.cpp”,line=“751”,from=“libNavigation.so”},frame={level=“4”,addr=“0x5fc4a0f0”,func=“PFramework::PWindowBase::render”,file=“FrameworkWindow.cpp”,fullname=“C:/DevSys/Engine/Framework/FrameworkWindow.cpp”,line=“46”,from=“libNavigation.so”},frame={level=“5”,addr=“0x5fc4d840”,func=“PFramework::PInternal::DrawFrame”,file=“Android/FrameworkMainAndroid.cpp”,fullname=“C:/DevSys/Engine/Framework/Android/FrameworkMainAndroid.cpp”,line=“360”,from=“libNavigation.so”},frame={level=“6”,addr=“0x5fc4deb0”,func=“android_main”,file=“Android/FrameworkMainAndroid.cpp”,fullname=“C:/DevSys/Engine/Framework/Android/FrameworkMainAndroid.cpp”,line=“575”,from=“libNavigation.so”},frame={level=“7”,addr=“0x5fc4c0d0”,func=“android_app_entry”,file=“C:/DevSys/Android/NDK/r9d-windows-x86/sources/android/native_app_glue/android_native_app_glue.c”,fullname=“C:/DevSys/Android/NDK/r9d-windows-x86/sources/android/native_app_glue/android_native_app_glue.c”,line=“232”,from=“libNavigation.so”},frame={level=“8”,addr=“0x400b31b4”,func=“__thread_entry”,from=“C:/Users/stoller/AppData/Local/Temp/Android/05134138034831055390/system/lib/libc.so”},frame={level=“9”,addr=“0x400b334c”,func=“pthread_create”,from=“C:/Users/stoller/AppData/Local/Temp/Android/05134138034831055390/system/lib/libc.so”},frame={level=“10”,addr=“0x00000000”,func=“??”}]
2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] stdout: (gdb)
2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] cmd: “72-stack-list-variables --thread 12 --frame 0 --simple-values”
2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] cmd: “73-stack-list-variables --thread 12 --frame 2 --simple-values”
2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] cmd: “74-stack-list-variables --thread 12 --frame 1 --simple-values”
2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] cmd: “75-stack-list-variables --thread 12 --frame 3 --simple-values”
2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] cmd: “76-stack-list-variables --thread 12 --frame 4 --simple-values”
2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] cmd: “77-stack-list-variables --thread 12 --frame 7 --simple-values”
2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] cmd: “78-stack-list-variables --thread 12 --frame 6 --simple-values”
2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] cmd: “79-stack-list-variables --thread 12 --frame 9 --simple-values”
2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] cmd: “80-stack-list-variables --thread 12 --frame 8 --simple-values”
2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] cmd: “81-stack-list-variables --thread 12 --frame 5 --simple-values”
2014-06-19 15:55:47.9177|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] cmd: “82-stack-list-variables --thread 12 --frame 10 --simple-values”
2014-06-19 15:55:57.9187|ERROR|Nvidia.PentaK.Debug.Utilities.AsyncQueryResult1|[DebugEngine] Async query timeout 2014-06-19 15:55:57.9187|ERROR|Nvidia.PentaK.Debug.Utilities.AsyncQueryResult1|[DebugEngine] Async query timeout
2014-06-19 15:55:57.9187|ERROR|Nvidia.PentaK.Debug.Utilities.AsyncQueryResult1|[DebugEngine] Async query timeout 2014-06-19 15:55:57.9187|ERROR|Nvidia.PentaK.Debug.Utilities.AsyncQueryResult1|[DebugEngine] Async query timeout
2014-06-19 15:55:57.9187|ERROR|Nvidia.PentaK.Debug.Utilities.AsyncQueryResult1|[DebugEngine] Async query timeout 2014-06-19 15:55:57.9187|ERROR|Nvidia.PentaK.Debug.Utilities.AsyncQueryResult1|[DebugEngine] Async query timeout
2014-06-19 15:55:57.9187|ERROR|Nvidia.PentaK.Debug.Utilities.AsyncQueryResult1|[DebugEngine] Async query timeout 2014-06-19 15:55:57.9187|ERROR|Nvidia.PentaK.Debug.Utilities.AsyncQueryResult1|[DebugEngine] Async query timeout
2014-06-19 15:55:57.9187|ERROR|Nvidia.PentaK.Debug.Utilities.AsyncQueryResult1|[DebugEngine] Async query timeout 2014-06-19 15:55:57.9187|ERROR|Nvidia.PentaK.Debug.Utilities.AsyncQueryResult1|[DebugEngine] Async query timeout
2014-06-19 15:55:57.9187|ERROR|Nvidia.PentaK.Debug.Utilities.AsyncQueryResult1|[DebugEngine] Async query timeout 2014-06-19 15:55:57.9187|INFO|Nvidia.PentaK.Debug.Gdb.Debugger|[GDB] cmd: "83-data-disassemble --thread 12 --frame 0 -s "$pc + 0" -e "$pc + 256" -- 0" 2014-06-19 15:56:07.9177|ERROR|Nvidia.PentaK.Debug.Utilities.AsyncQueryResult1|[DebugEngine] Async query timeout
2014-06-19 15:56:07.9347|INFO|Nvidia.PentaK.AndroidPackage|[AndroidPackage] Mode changed to DBGMODE_Break

As for crashing while debugging, the mini dumps always point to GDB: The thread used up it’s stack

Dump Summary

Dump File: WERCBE7.tmp.mdmp : C:\Users\stoller\AppData\Local\Temp\WERCBE7.tmp.mdmp
Last Write Time: 6/19/2014 11:05:46 AM
Process Name: gdb.exe : C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\Common7\IDE\EXTENSIONS\NVIDIA\NSIGHT TEGRA\1.5.1\Debuggers\gdb.exe
Process Architecture: x86
Exception Code: 0xC00000FD
Exception Information: The thread used up its stack.
Heap Information: Not Present

System Information

OS Version: 6.1.7601
CLR Version(s):

Modules

Module Name Module Path Module Version


gdb.exe C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\Common7\IDE\EXTENSIONS\NVIDIA\NSIGHT TEGRA\1.5.1\Debuggers\gdb.exe 0.0.0.0

Hi, we’ve tried to reproduce this issue, but without any success. It also wasn’t reported before, so maybe we have a specific case here. Is it possible for you to share your codebase or a minimal repro sample with us? I can provide you with access to our secure ftp server, just PM me with your email address.

Note also that debugging performance is better on newer devices. For example, the difference between stepping times on a Nexus 7 (2012) and a Shield is quite noticeable.

Hi Dimitry, I will try to recreate a test bed repro case soon.

Since I have not seen debugging via Tegra NSight on a Shield outside my environment, in general how would you describe the general performance and workflow ? Similar to VS on PC ? Similar to console debugging ? Smooth or clunky ? What level of performance are you seeing while using it to debug a medium+ codebase ?

Is there any other way to help me determine the problem you can think of ?

I’m only debugging on an nVidia Shield with the latest updates.

Steve

Hi Steve,

In general, a small lag during stepping should be noticeable, but overall the performance is quite good.

You could also try checking/changing your USB cable or port, this is known to help in some cases. Please also note that each open debugging window (Threads, Locals, Autos, Disassembly, Memory, etc.) adds to the amount of data we need to query from the device, so closing the ones you don’t need should speed things up as well.