Failed to start profiling on start [struct QuadDCommon::tag_message * __ptr64] = The timeout expired

Hello,

I’ve been struggling to profile a python app that I converted into an exectuable application using pyinstaller. After many failed atempts, reinstallations, admin priviliges getting revoked I decided to try profiling C:\Windows\System32\notepad.exe . To my suprise even this app failed to start. Each time I recieve this error:

Failed to start profiling.

If this error persists, please restart the app and/or reboot the target.

Version information: NVIDIA Nsight Systems, 2023.4.1.97-234133557503v0 Windows-x64

C:\dvs\p4\build\sw\devtools\Agora\Rel\QuadD_Main\QuadD\Common\AgentAPI\Src\Controller.cpp(888): Throw in function class std::shared_ptr __cdecl Agent::Client::`anonymous-namespace’::CreateSession(const class Agent::Command &,const class std::shared_ptr &)

Dynamic exception type: struct boost::wrapexcept

std::exception::what: RuntimeException

[struct QuadDCommon::tag_message * __ptr64] = The timeout expired.

This also persisted through different configurations. AS of right now starting an empty profiler process with this configuration gives the same error for notepad.exe and my python. What could be the couse for this error? I am able to run both apps outside of the profiler without issue. I was also able to start the profiling for a very brief moments a few times on the python app, but it was long time ago and I didnt know that that specific configuration will be the only working one.

Here is a screenshot of the processes of the nvSystems in the task manager:


After clickign start it seems the profiler cant even start the target applications process before throwing an error.

I’m going to assume that you killed all of the Nsys processes in the task manager and tried from a clean start. Sometimes we do get zombie processes.

Beyond that, I am going to defer to @dofek , as he is more knowledgeable on the Windows side than I am.

Hi pherbatnik,

As part of creating the profiling session, nsys.exe attempts to launch a child process whose job it is to launch the target process and manage the session. The connection to this child process times out, and that is the exception that is reported.

Can you collect a log and share it with us to help us debug this issue?

  1. Close nsys-ui and nsys.
  2. In the Nsight Systems host-windows-x64 directory, there is a file named nvlog.config.template. Rename this file nvlog.config
  3. Re-run nsys-ui and try to start the trace session.
  4. Afterwards, there should be a file named nsys-ui.log in your host-windows-x64 directory. Please share that file (nsys-ui.log) with me.
  5. Delete the nvlog.config file from the host-windows-x64 directory.

@eryabtsev any idea what might cause the session creation to timeout?

Unfortunately, not. It would be nice to look at the log file to understand the reason of the failure.

@pherbatnik Please, could you do the steps above for both host-windows-x64 (GUI) and target-windows-x64 (nsys.exe) directories? Since GUI communicates with nsys.exe during profiling having logs from both sides will help to find the reason of the failure.

Here is the log file.
nsys-ui.log (52.7 KB)

I tried to run a trace session with default data targets. Hope this helps