[FIXED] Failed to connect. The target may already have exited.

Failed to connect (host: localhost, pid: 154893). The target may already have exited.

From the terminal, this appears to be the error:

01glfw: …/…/vendor/volcano/vendor/vulkan-loader/loader/loader.h:404: loader_init_dispatch: Assertion `valid_loader_magic_value(obj) && "Incompatible ICD, first dword must be initialized to " “ICD_LOADER_MAGIC. See loader/README.md for details.”’ failed.

The problem appears to be that recent versions of the Vulkan Loader are incompatible with NVIDIA Nsight Graphics. New Vulkan loaders check ICD_LOADER_MAGIC.

System info:

Debian Unstable 4.19.20-1 (2019-02-12) x86_64

Steps to reproduce:

  1. git clone GitHub - ndsol/VolcanoSamples: Volcano sample code to get started with Vulkan. Keep it simple, short and sweet.
  2. cd VolcanoSamples
  3. ./build.cmd

(wait a while, it will clone and build the vulkan loader in out/Debug)

(See out/Debug/include/vulkan/vulkan_core.h - define VK_HEADER_VERSION 96)

  1. export LD_LIBRARY_PATH=$PWD/out/Debug

(Required to point NVIDIA Nsight to the correct Vulkan loader. Otherwise Nsight will use a different vulkan loader.)

  1. cd ~/nvidia-nsight/host/linux-desktop-nomad-x64
  2. ./nv-nsight-gfx
  3. Select application executable: $(git repo)/out/Debug/01glfw
  4. Working directory: $(git repo)
  5. Launch

Console output is:

I Layer “VK_LAYER_RENDERDOC_Capture” using deprecated ‘vkGetInstanceProcAddr’ tag which was deprecated starting with JSON file version 1.1.0. The new vkNegotiateLayerInterfaceVersion function is preferred, though for compatibility reasons it may be desirable to continue using the deprecated tag.
I Layer “VK_LAYER_RENDERDOC_Capture” using deprecated ‘vkGetDeviceProcAddr’ tag which was deprecated starting with JSON file version 1.1.0. The new vkNegotiateLayerInterfaceVersion function is preferred, though for compatibility reasons it may be desirable to continue using the deprecated tag.
I Layer “VK_LAYER_NV_nomad” using deprecated ‘vkGetInstanceProcAddr’ tag which was deprecated starting with JSON file version 1.1.0. The new vkNegotiateLayerInterfaceVersion function is preferred, though for compatibility reasons it may be desirable to continue using the deprecated tag.
I Layer “VK_LAYER_NV_nomad” using deprecated ‘vkGetDeviceProcAddr’ tag which was deprecated starting with JSON file version 1.1.0. The new vkNegotiateLayerInterfaceVersion function is preferred, though for compatibility reasons it may be desirable to continue using the deprecated tag.
linkmap: l_name=/usr/lib/x86_64-linux-gnu/libGL.so.1
I Insert instance layer VK_LAYER_NV_nomad (libNvda.Graphics.Interception.so)
01glfw: …/…/vendor/volcano/vendor/vulkan-loader/loader/loader.h:404: loader_init_dispatch: Assertion `valid_loader_magic_value(obj) && "Incompatible ICD, first dword must be initialized to " “ICD_LOADER_MAGIC. See loader/README.md for details.”’ failed.

1 Like

I attempted to email the report.json and report.zip to nsight-graphics-feedback@nvidia.com and got the following error:

Address not found

Your message wasn’t delivered to nsight-graphics-feedback@nvidia.com because the address couldn’t be found, or is unable to receive mail.

The response from the remote server was:

550 #5.1.0 Address rejected.

Hi Cord,

Thank you so much for the great repro steps!

nsight-graphics-feedback is directly used for the feedback button within the tool, so our IT may be blocking anything not coming from proper channels.

Feel free to email the reports to devtools-support@nvidia.com

I’ve submitted a bug for you (DG-4481 for internal tracking). We will let you know if we have any problems reproing the issue.

Thanks,
Seth

1 Like

Thanks, Seth.

I sent an email to devtools-support@nvidia.com.

I did two additional things to debug NVIDIA Nsight Graphics. These are most likely not something you need in order to repro, but full disclosure:

  1. I modified /usr/share/vulkan/icd.d/nvidia_icd.json

diff -u /usr/share/vulkan/icd.d/nv

idia_icd.json{.orig,}
— /usr/share/vulkan/icd.d/nvidia_icd.json.orig
+++ /usr/share/vulkan/icd.d/nvidia_icd.json
@@ -1,7 +1,7 @@
{
“file_format_version” : “1.0.0”,
“ICD”: {

  •    "library_path": "libGL.so.1",
    
  •    "library_path": "/usr/lib/x86_64-linux-gnu/libGL.so.1",
       "api_version" : "1.1.82"
    
    }
    }

This fixed an issue where vkCreateInstance failed with -9 (VK_ERROR_INCOMPATIBLE_DRIVER). The console also reported “loader_scanned_icd_add: Attempt to retrieve either ‘vkGetInstanceProcAddr’ or ‘vk_icdGetInstanceProcAddr’ from ICD libGL.so.1 failed.”

NVIDIA Nsight reported “Failed to connect (host: localhost, pid: 154893). The target may already have exited.” This is correct: the process aborted after vkCreateInstance failed.

  1. I modified the symbolic link /sbin/modinfo. It pointed to /bin/kmod, but I pointed it to /usr/local/bin/fix-modinfo-nvidia which was a quick shell script I created:

#!/bin/bash
if [ "$" == “nvidia” ]; then
exec /usr/local/bin/fix/modinfo nvidia_current
else
exec /usr/local/bin/fix/modinfo $

fi

The file /usr/local/bin/fix/modinfo is a symbolic link to /bin/kmod. This fixed the following error I was seeing in the console:

modinfo: ERROR: Module nvidia not found.

Using “modinfo nvidia” produces that error, while “modinfo nvidia_current” correctly shows the output. I tried “modprobe --resolve-alias nvidia” to see if the alias was correctly set up, and it is not. (modprobe --resolve-alias nvidia outputs “nvidia” where it should output “nvidia_current”)

I didn’t want to go too far down the rabbit hole on module aliases and driver setup so I just inserted that bash script to make “modinfo nvidia” work.

Hi Cord,

Wanted to let you know that this issue has been fixed in our hot patch we released late last week! Please download Nsight Graphics again and let me know if you run into any other issues.

Thanks!
Seth

Thanks, Seth!

I downloaded NVIDIA_Nsight_Graphics_2019.2.1.19099.run and can confirm, this is fixed. Thanks!

1 Like