Closed omajid closed 2 days ago
FYI @tmds
@leculver, this may be in CLRMD because ClrRuntime.ThreadPool is null on both a .NET 9 and 8 dump. Hopefully you have time to look at.
I believe @kouvel might have more insights than me. Was anything changed in the threadpool that might need updating in ClrMD/SOS?
I can take a look if he isn't able to.
@kouvel have you had a chance to look into this issue?
@leculver, this may be in CLRMD because ClrRuntime.ThreadPool is null on both a .NET 9 and 8 dump. Hopefully you have time to look at.
It's a bit surprising that the command would fail on a .NET 8 dump. I can't think of anything of consequence that would have changed in the thread pool to cause such a thing. I can take a first look.
It's a bit surprising that the command would fail on a .NET 8 dump. I can't think of anything of consequence that would have changed in the thread pool to cause such a thing. I can take a first look.
The issue we're seeing is only occurring with .NET 9.
The issue occurs when using dotnet-dump 8.0.532401 (latest on nuget.org) with a .NET 9 coredump.
In a small test that just does the following:
ThreadPool.QueueUserWorkItem(_ => { });
Thread.Sleep(-1);
It looks like the read of the PortableThreadPool.ThreadPoolInstance
static field is reporting null in clrmd here. The field is not null in the dumpclass
output for PortableThreadPool. It doesn't look like anything has changed here from the thread pool side in .NET 9, not sure if something else changed. I'm seeing the same issue on Linux and Windows. @leculver, would you be able to take a look?
@leculver have you had a chance to look at this?
I am just back from vacation and currently I have pressing security work that takes priority. I will take a look when I can.
Ah, this is because we haven't added support for these new interfaces to ClrMD yet: https://github.com/dotnet/runtime/pull/100364.
I will take a look when the security work is done.
I have a fix for this. Should be in SOS early next week. See linked PR above.
Description
I am running a preview version of .NET 9. The dotnet dump
threadpool
command fails to work:Configuration
dotnet dump analyze
dotnet new web && dotnet build && dotnet /bin/Debug/net9.0/app.dll
dotnet info
Runtime Environment: OS Name: fedora OS Version: 40 OS Platform: Linux RID: fedora.40-x64 Base Path: /home/omajid/temp/dotnet-sdk/sdk/9.0.100-preview.7.24368.1/
.NET workloads installed: Configured to use loose manifests when installing new manifests. There are no installed workloads to display.
Host: Version: 9.0.0-preview.7.24366.18 Architecture: x64 Commit: static
.NET SDKs installed: 9.0.100-preview.7.24368.1 [/home/omajid/temp/dotnet-sdk/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 9.0.0-preview.7.24366.8 [/home/omajid/temp/dotnet-sdk/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 9.0.0-preview.7.24366.18 [/home/omajid/temp/dotnet-sdk/shared/Microsoft.NETCore.App]
Other architectures found: None
Environment variables: DOTNET_ROOT [/home/omajid/temp/dotnet-sdk/]
global.json file: Not found
Learn more: https://aka.ms/dotnet/info
Download .NET: https://aka.ms/dotnet/download
$ dotnet tool uninstall -g dotnet-dump Tool 'dotnet-dump' (version '8.0.532401') was successfully uninstalled. $ dotnet tool update -g --prerelease dotnet-dump Tools directory '/home/omajid/.dotnet/tools' is not currently on the PATH environment variable. If you are using bash, you can add it to your profile by running the following command:
cat << \EOF >> ~/.bash_profile
Add .NET Core SDK tools
export PATH="$PATH:/home/omajid/.dotnet/tools" EOF
You can add it to the current session by running the following command:
export PATH="$PATH:/home/omajid/.dotnet/tools"
You can invoke the tool using the following command: dotnet-dump Tool 'dotnet-dump' (version '8.0.532401') was successfully installed. $ dotnet dump analyze coredump Loading core dump: coredump ... Ready to process analysis commands. Type 'help' to list available commands or 'help [command]' to get detailed help on a command. Type 'quit' or 'exit' to exit the session.