By comparing my app line by line to a new dotnet web app project which didn't show the same behaviour I found the cause to be this line in my Program.cs Main() method:
CreateHostBuilder(args).Start()
Changing that to the following resolves the problem in accessing diagnostics, as well as the memory issue I was encountering:
CreateHostBuilder(args).Build().Run()
This is the default in a new dotnet core web app project so not sure where I picked up the use of .Start(). The difference appears to be that Run is asynchronous, Start ultimately calls the same methods but waits on the asynchronous task so my assumption is that it may block other tasks.
Answer from matthewrk on Stack OverflowGitHub
github.com › dotnet › diagnostics › issues › 4390
gcdump/dump: Process not running compatible .NET runtime · Issue #4390 · dotnet/diagnostics
November 9, 2023 - gcdump/dump: Process not running compatible .NET runtime · $ dotnet dotnet-gcdump collect -p 29080 -v Writing gcdump to '/.../20231109_105143_29080.gcdump'... 0.0s: Creating type table flushing task 0.0s: [Error] Exception during gcdump: Microsoft.Diagnostics.NETCore.Client.ServerNotAvailableException: Process 29080 not running compatible .NET runtime.
Author dotnet
GitHub
github.com › dotnet › diagnostics › issues › 3808
dotnet-gcdump error : Process 1 not running compatible .NET runtime · Issue #3808 · dotnet/diagnostics
April 6, 2023 - I have installed dotnet-gcdump but when I try to execute a dump (after exec into pod) using : ... 0.0s: Creating type table flushing task 0.0s: [Error] Exception during gcdump: Microsoft.Diagnostics.NETCore.Client.ServerNotAvailableException: Process 1 not running compatible .NET runtime.
Author dotnet
Stack Overflow
stackoverflow.com › questions › 75949678 › dotnet-gcdump-error-process-1-not-running-compatible-net-runtime
kubernetes - dotnet-gcdump error : Process 1 not running compatible .NET runtime - Stack Overflow
.NET SDK: Version: 7.0.202 Commit: ... ID - i was passing in a wrong process ID. You have to check the process ID of the dotnet DLL (main process) before running the dump with :...
GitHub
github.com › dotnet › diagnostics › issues › 649
Process 22757 not running compatible .NET Core runtime · Issue #649 · dotnet/diagnostics
when I run this command dotnet-dump collect --process-id 22757 errors Process 22757 not running compatible .NET Core runtime dotnet --info .NET Core SDK (reflecting any global.json): Version: 3.0.101 Commit: bc5f8df0f5 Runtime Environmen...
Author dotnet
GitHub
github.com › dotnet › diagnostics › issues › 936
Process XXX not running compatible .NET Core runtime · Issue #936 · dotnet/diagnostics
March 21, 2020 - I have tried to use both projects .NET Core 3.1 and 3.0. Installed the latest tool with dotnet tool install -g dotnet-dump but it did not find my process and was unable to dump it. I have installed even both SDKs and Runtimes of 3.0 and ...
Author dotnet
GitHub
github.com › dotnet › diagnostics › issues › 1419
Unable to run dotnet dump in 3.1 docker container - “Process 1 not running compatible .NET Core runtime” · Issue #1419 · dotnet/diagnostics
August 7, 2020 - If I attempt to take a core dump via dotnet core dump collect -p 1 I get the following: Process 1 not running compatible .NET Core runtime.
Author dotnet
GitHub
github.com › dotnet › diagnostics › issues › 3970
dotnet tools are not able to work with process which is running under tmux · Issue #3970 · dotnet/diagnostics
June 5, 2023 - Describe the bug dotnet tools are not able to work with process which is running under tmux dotnet dump collect -p 811435 Writing full to /root/sdk/core_20230605_214030 Process 811435 not running compatible .NET runtime. Same for dotnet-...
Author dotnet
GitHub
github.com › dotnet › diagnostics › issues › 341
dotnet-dump erroring with "not compatible" for a .NET Core process · Issue #341 · dotnet/diagnostics
/ # ps aux PID USER TIME COMMAND ... 3600 39 root 0:00 ash 54 root 0:00 ps aux / # dotnet dump collect --process-id 6 Writing minidump with heap to /core_20190616_130348 Process 6 not running compatible .NET Core runtime...
Author dotnet
Microsoft Learn
learn.microsoft.com › en-us › dotnet › core › diagnostics › diagnostics-in-containers
Collect diagnostics in Linux containers - .NET | Microsoft Learn
The tools need access to the diagnostic ... so the /tmp directory must be shared between the target and sidecar container via a volume mount. This could be done, for example, by having the containers share a common volume or a Kubernetes emptyDir volume. If you attempt to use the diagnostic tools from a sidecar container without sharing the /tmp directory, you will ...
GitHub
github.com › dotnet › docs › blob › main › docs › core › diagnostics › diagnostics-in-containers.md
docs/docs/core/diagnostics/diagnostics-in-containers.md at main · dotnet/docs
April 16, 2025 - The tools need access to the diagnostic ... so the /tmp directory must be shared between the target and sidecar container via a volume mount. This could be done, for example, by having the containers share a common volume or a Kubernetes emptyDir volume. If you attempt to use the diagnostic tools from a sidecar container without sharing the /tmp directory, you will ...
Author dotnet
GitHub
github.com › dotnet › runtime › issues › 77392
Ubuntu: dotnet-dump/gcdump can not dump process memory if application was compiled on windows machine · Issue #77392 · dotnet/runtime
August 4, 2022 - Try running with '-v' for more information. ubuntu@ip-172-30-4-132:~/console/publish$ dotnet-gcdump collect -v -p 5548 Writing gcdump to '/home/ubuntu/console/publish/20220804_103355_5548.gcdump'... 0.0s: Creating type table flushing task 0.0s: [Error] Exception during gcdump: Microsoft.Diagnostics.NETCore.Client.ServerNotAvailableException: Process 5548 not running compatible .NET runtime.
Author dotnet
Microsoft Learn
learn.microsoft.com › en-us › dotnet › core › diagnostics › faq-dumps
.NET dumps FAQ - .NET | Microsoft Learn
For information about the minimum required entitlements, see Default entitlements. Dump collection isn't supported on mobile platforms (Android and iOS). These platforms use the Mono runtime, which doesn't support memory dump generation.
Microsoft Learn
learn.microsoft.com › en-us › dotnet › core › diagnostics › dotnet-dump
dotnet-dump diagnostic tool - .NET CLI - .NET | Microsoft Learn
We recommend testing to ensure the memory limit is set high enough. Another option is to temporarily change or remove the limit prior to dump collection if your environment supports doing so.
GitHub
github.com › dotnet › diagnostics › blob › main › documentation › dotnet-dump-instructions.md
diagnostics/documentation/dotnet-dump-instructions.md at main · dotnet/diagnostics
On Windows, dotnet-dump collect will work with any version of the .NET runtime. $ dotnet-dump collect --process-id 1902 Writing minidump to file ./core_20190226_135837 Written 98983936 bytes (24166 pages) to core file Complete · If you are running under docker, dump collection requires SYS_PTRACE docker capabilities (--cap-add=SYS_PTRACE or --privileged).
Author dotnet
GitHub
github.com › dotnet › diagnostics › issues › 1318
(linux) dotnet-trace, dotnet-dump and dotnet-gcdump seem to leave the process in a state where it cannot be traced or dumped again. · Issue #1318 · dotnet/diagnostics
July 3, 2020 - AzureUser@machine:~$ sudo /home/AzureUser/.dotnet/tools/dotnet-trace collect --process-id 67295 No profile or providers specified, defaulting to trace profile 'cpu-sampling' Provider Name Keywords Level Enabled By Microsoft-DotNETCore-SampleProfiler 0x0000000000000000 Informational(4) --profile Microsoft-Windows-DotNETRuntime 0x00000014C14FCCBD Informational(4) --profile Unable to start a tracing session: Microsoft.Diagnostics.NETCore.Client.ServerNotAvailableException: Process 67295 not running compatible .NET Core runtime. at Microsoft.Diagnostics.NETCore.Client.IpcClient.GetTransport(Int32
Author dotnet
GitHub
github.com › dotnet › diagnostics › issues › 1141
Analyze dotnet 2.2 dump created in a linux docker container · Issue #1141 · dotnet/diagnostics
May 18, 2020 - root@gateway-5d4b5795c7-9rchf:~# dotnet-dump --version [INSTANA-TRACER] Initializing Instana IL-Rewriter for .NET Core 1.0.3 [INSTANA-TRACER] Logging-Path not set Loading configuration-file /app/instana_tracing/instrumentation.json 3.1.122203+2c03f4eb39cfa9fe281204b125203ff79627ca02 root@gateway-5d4b5795c7-9rchf:~# dotnet-dump ps [INSTANA-TRACER] Initializing Instana IL-Rewriter for .NET Core 1.0.3 [INSTANA-TRACER] Logging-Path not set Loading configuration-file /app/instana_tracing/instrumentation.json root@gateway-5d4b5795c7-9rchf:~# dotnet-dump collect -p 1 [INSTANA-TRACER] Initializing Instana IL-Rewriter for .NET Core 1.0.3 [INSTANA-TRACER] Logging-Path not set Loading configuration-file /app/instana_tracing/instrumentation.json Writing full to /root/core_20200518_100917 Process 1 not running compatible .NET Core runtime.
Author dotnet
GitHub
github.com › dotnet › diagnostics › issues › 1163
Running dotnet-dump from another pod · Issue #1163 · dotnet/diagnostics
May 24, 2020 - So far i've attempted to run another ... when running ps/top/htop but dotnet-dump ps is empty and dotnet-dump collect --process-id <host-pid> results in Process <host-pid> not running compatible .NET Core runtime....
Author dotnet