You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Re-evaluate what SOS commands are supported on Linux/OS X #3169
There are a surprising number of commands that are only supported on Windows when (presumably) their implementation should be usable on Linux and OS X.
Here's a list of useful commands that are scoped to Windows, when they would be useful regardless of the platform:
DumpSig
DumpSigElem
DumpRuntimeTypes
VerifyHeap
AnalyzeOOM
VerifyObj
ListNearObj
GCHeapStat
ThreadPool - maybe this is desktop clr only?
EHInfo
GCInfo
FindRoots
ObjSize
I didn't deeply inspect why each of these methods are disallowed, some are probably not useful in .Net Core anymore (like !ThreadPool maybe?). However, some of these commands are actually very important. !gcinfo, !verifyheap, !objsize, !verifyobj are all commands I use regularly on windows.
This was reported by a partner team.
Edit: I forgot to mention, the scenario here is debugging Linux coredumps in WinDbg. It would be nice if all of these worked in lldb if possible as well, but specifically here we need to unblock commands that will work in windbg.
DumpSig, DumpSigElem, DumpRuntimeTypes, VerifyHeap are all available under lldb if you prefix the command with "sos ". Will add the needed lldb command alias so they can be invoked directly. They are not available under dotnet-dump analyze. Will fix that too.
ThreadPool is already available everywhere. Under lldb/dotnet-dump it is lowercased as "threadpool". FYI, !thtreadpool (lower case) will also work under windbg. Most of the commands now under windbg have all lower case aliases to match lldb/dotnet-dump.
Activity
mikem8361 commentedon Jul 6, 2022
DumpSig, DumpSigElem, DumpRuntimeTypes, VerifyHeap are all available under lldb if you prefix the command with "sos ". Will add the needed lldb command alias so they can be invoked directly. They are not available under dotnet-dump analyze. Will fix that too.
ThreadPool is already available everywhere. Under lldb/dotnet-dump it is lowercased as "threadpool". FYI, !thtreadpool (lower case) will also work under windbg. Most of the commands now under windbg have all lower case aliases to match lldb/dotnet-dump.
The rest will take some work to enable.
leculver commentedon Jul 7, 2022
ThreadPool doesn't seem to work. I was going by this line, which disables it on linux dumps:
https://github.com/dotnet/diagnostics/blob/main/src/SOS/Strike/strike.cpp#L8028
For example, loading a linux coredump with SOS and running !threadpool produces:
leculver commentedon Jul 7, 2022
Similar for the other commands you list, DumpSig, DumpSigElem, DumpRuntimeTypes:
The scenario being reported here is WinDbg debugging linux coredumps.
mikem8361 commentedon Jul 7, 2022
Enable more SOS commands for Linux/MacOS
Enable more SOS commands for Linux/MacOS
Enable more SOS commands for Linux/MacOS
Enable more SOS commands for Linux/MacOS
Enable more SOS commands for Linux/MacOS
Enable more SOS commands for Linux/MacOS
Enable more SOS commands for Linux/MacOS
Enable more SOS commands for Linux/MacOS (#3233)
Merge main into release/stable (#3332)