Skip to content

dotnet-counters stuck at "Waiting for initial payload..." for hostfxr-hosted application #44910

@ladenedge

Description

@ladenedge

I have a .NET 5.0 application I would like to analyze with dotnet-counters. Following Debug a memory leak in .NET Core, I am able to list its PID in the normal ways:

C:\MyServer>dotnet-counters ps
      1164 myserver C:\MyServer\Debug\myserver.exe

C:\MyServer>dotnet-trace ps
      1164 myserver C:\MyServer\Debug\myserver.exe

However, when I try to monitor its counters, it just hangs:

C:\MyServer>dotnet-counters monitor --refresh-interval 1 -p 1164

Press p to pause, r to resume, q to quit.
    Status: Waiting for initial payload...

My application is special in that it is hosted inside a native 64-bit EXE using the hostfxr_* API.

Otherwise, the application is working fine. I'm on Windows 10, using SDK v5.0.100-preview.8.20417.9. All of the dotnet-* tools are the latest versions from dotnet tool install.

Is there something special required to enable counters?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions