Skip to content

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

@szilvaa-adsk

Description

@szilvaa-adsk

Description

I'm re-opening #44910 because it is still repro.

Reproduction Steps

  1. Clone https://github.com/dotnet/samples/tree/main/core/hosting
  2. Modify https://github.com/dotnet/samples/blob/main/core/hosting/src/DotNetLib/Lib.cs#L52 by adding
Console.WriteLine("Press any key to continue...");
Console.ReadKey();

This is just so that the sample runs as long as we want it.
3. Build the sample as described in the readme.
4. Run the nativehost.
5. Run

dotnet-counters monitor -n nativehost

Expected behavior

dotnet-counters should show performance counters and update them every second.

Actual behavior

dotnet-counters shows this:

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

Regression?

I don't think so.

Known Workarounds

Yes. #44910 describes a workaround.

Configuration

.NET version:

C:\Program Files\dotnet\host\fxr\7.0.4\hostfxr.dll
C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.15\hostpolicy.dll
C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.15\coreclr.dll

OS:

Windows 11 22H2

Arch:

x64

I don't think this is specific to this configuration.

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Hostin-prThere is an active PR which will close this issue when it is merged

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions