Some problems I ran into while trying out the Linux Graphics Debugger

While trying to run the debugger for the first time on my Gentoo box I ran into the following problems:

  1. when trying to connect to localhost the debugger always failed with the following message:
    [Error] ileonte@localhost:22 connection failed.
    

    The only way that I found to work around that was to add my own public key to ~/.ssh/authorized_keys and use an empty password in the debugger connect dialog

  2. once connected the debugger can't find any processes to attach to - the list in the 'Attach' tab is always empty and whenever I switch to that tab the following line is added to the log:
    [Status] No attachable processes found
    
  3. when launching a program from the 'Launch' tab the debugger would crash with the following error:
    /home/ileonte/work/projects/install/nvdbg/nvidia-gfx-debugger.bin: symbol lookup error: /usr/lib64/libssl.so: undefined symbol: EVP_aes_128_cbc_hmac_sha256
    

    To work around this I had to modify the ‘nvidia-gfx-debugger’ script - I added the following line between the ‘export LD_LIBRARY_PATH=…’ line and the ‘if’ statement:

    export LD_PRELOAD=/usr/lib/libcrypto.so
    

Some other minor issues I found:

  1. the entries from the list inside the 'Select your target platform' dialog can only be activated with the mouse (pressing Enter on them does nothing, only double-clicking seems to work)
  2. the file selector in the 'Launch' tab doesn't remember the last selection so I'm forced to always navigate to my program on each launch
  3. whenever I press the 'Capture frame' button after launching my application I get the following warning: http://i.imgur.com/FZjL9dS.png Thus far pressing 'Ok' has always worked for me without any visible problems but who knows.

Thanks for letting us know. Passing along the issues you’re seeing.

Found another minor (?) problem: whenever I close my test program while it is running under the debugger it seems to crash on exit: http://i.imgur.com/C6SjBnp.png (it works fine if I run it manually).

Hi ileonte,

=> when trying to connect to localhost the debugger always failed with the following message:
<= can you just ssh your localhost with your own usr name? Linux Graphics Debugger will do the similar thing

=> once connected the debugger can’t find any processes to attach to - the list in the ‘Attach’ tab is always empty and whenever I switch to that tab the following line is added to the log
<= this is expected, since you never launched a process which Linux Graphics Debugger concern. Please try to launch your OGL sample like this: LD_PRELOAD=/root/.tgd/libs/libNvidia_gfx_debugger.so XXX, then you will find your XXX in attach dialog box

=> when launching a program from the ‘Launch’ tab the debugger would crash with the following error:
<= this is weird, since the folder which contains nvidia-gf-debugger.bin also have libssl.so.1.0.0 and libcrypto.so.1.0.0

=> the file selector in the ‘Launch’ tab doesn’t remember the last selection so I’m forced to always navigate to my program on each launch
<= there is a down arrow at the input text box, click on it

=> whenever I press the ‘Capture frame’ button after launching my application I get the following warning:
<= This means you are trying to draw without a valid program bind to current pipeline. It’s better to check your program is not 0.

I tried it yesterday but there were no forums set up yet. I also ran into some issues:

  1. The program being debugged freezes if one quits the debugger while the program is stopped.
  2. I had to remove libssl and libcrypto shipped with the debugger. It loaded system libssl even though LD_LIBRARY_PATH was set but loaded libcrypto shipped with the debugger. Which of course were incompatible. How are you looking up libssl? It's not directly linked to the binary according to ldd.
  3. Could we please have an option to provide binary to debug from command line? I don't like having to click through the dialog every time.
  4. It would be nice to be able to connect to localhost without requiring SSH.
  5. There's no sanity check if remote machine is incompatible with currently selected arch (selected 64 bit at startup, remote was 32). While this is an user error it would be useful to get error message instead of just a silent fail.
  6. Resizing the profiler view window is very slow.

Yes, I can SSH to localhost just fine. However the debugger fails to connect when using username+password for some reason, it only worked once I configured my SSH to accept passwordless logins from my account.

You are right, I totally missed that in the docs.

For the life of me I couldn’t notice the drop-down :) Still it would be nice (and convenient) to have the last debugged program pre-selected.

Yes, it is weird. I have no explanation for it other than the debugger tries to load SSL dynamically at runtime and it’s looking for the symbol in the wrong library.

Hmm, maybe. Still it’s a bit weird to have the debugger throw that warning since the whole point of a debugger is to catch errors like that. If it indeed is the case that something like that can crash the debugger then something is wrong.

Actually, 3D program which use OGL and D3D will not crash when it meet such error like program is 0, and driver/runtime will make the app run w/o crash. Debugger tools will also try its best to not crash your app on the injection related codes.

Thanks
An

You need to stop debug/disconnect, then debugger will notify the debugged program awake.

Do you try LD_PRELOAD?

Try to use LD_PRELOAD=/root/.tgd/libs/libNvidia_gfx_debugger.so XXX YYY, then you will find your XXX in attach dialog box

I am sorry, but that’s by design

Thanks
An

I have same problems with connecting debugger.
It fails, both with username/pw and with public key.
In terminal I can login via ssh to my localhost account in either way, but debugger fails.

If I run GL app with ld_preload option, I can see it in list of attachable processes, but still that list is grayed out, and nothing works, probably awaiting for ssh connection.

It’s hard to say why, please check your ssh server is start properly, check the linux graphics debugger permission in you system, check your firewall, etc.

Thanks
An

Now I can run debugger.
There was two changes in my system, so I can’t tell what’s important.

  1. I’ve updated openssh from 6.9 to 7.0
  2. I’ve changed identity key from dss to rsa type.

Now debugger connects without password (with public key), but still can’t connect with password. Well, that’s already something :)

hi there,

i’m trying to use the debugger with an application built using unity3d (5.1.2). i’m not sure this is expected to work, but i get a straight out crash. there’s nothing of note in the log. i’m on ubuntu 14.04, running on a HP zbook with Quadro K3100M.

the crash occurs if i try to run the application from the shell with the LD_PRELOAD, as well as in the debugger.