Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the help for sos commands isn't up to date #5235

Open
Maoni0 opened this issue Feb 8, 2025 · 0 comments
Open

the help for sos commands isn't up to date #5235

Maoni0 opened this issue Feb 8, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Maoni0
Copy link
Member

Maoni0 commented Feb 8, 2025

spoke to @mikem8361 about this and he mentioned when the commands were re-written in c# the help didn't get copied over and setup.

for example, if I do !help fq, I get this

0:000> !soshelp finalizequeue
finalizequeue:
  Displays all objects registered for finalization.
 
Usage:
>!sos finalizequeue [options]
 
Options:
  -detail            Will display extra information on any SyncBlocks that need to be cleaned up, and on any RuntimeCallableWrappers (RCWs) that await cleanup. Both of these data structures are cached and cleaned up by the finalizer thread when it gets a chance to run.
  -allReady          Specifying this argument will allow for the display of all objects that are ready for finalization, whether they are already marked by the GC as such, or whether the next GC will. The objects that are not in the "Ready for finalization" list are finalizable objects that are no longer rooted. This option can be very expensive, as it verifies whether all the objects in the finalizable queues are still rooted or not.
  -short             Limits the output to just the address of each object. If used in conjunction with -allReady it enumerates all objects that have a finalizer that are no longer rooted. If used independently it lists all objects in the finalizable and "ready for finalization" queues.
  -mt <mt>           Limits the search for finalizable objects to only those matching the given MethodTable.
  -stat, -summary    Only print object statistics, not the list of all objects.

this is different from what we have in sosdocs.txt which has way more info -

COMMAND: fq.
COMMAND: finalizequeue.
!FinalizeQueue [-detail] | [-allReady] [-short]
 
This command lists the objects registered for finalization. Here is output from
a simple program:
 
    0:000> !finalizequeue
    SyncBlocks to be cleaned up: 0
    MTA Interfaces to be released: 0
    STA Interfaces to be released: 1
    generation 0 has 4 finalizable objects (0015bc90->0015bca0)
    generation 1 has 0 finalizable objects (0015bc90->0015bc90)
    generation 2 has 0 finalizable objects (0015bc90->0015bc90)
    Ready for finalization 0 objects (0015bca0->0015bca0)
    Statistics:
          MT    Count TotalSize Class Name
    5ba6cf78        1        24 Microsoft.Win32.SafeHandles.SafeFileHandle
    5ba5db04        1        68 System.Threading.Thread
    5ba73e28        2       112 System.IO.StreamWriter
    Total 4 objects
 
The GC heap is divided into generations, and objects are listed accordingly. We
see that only generation 0 (the youngest generation) has any objects registered
for finalization. The notation "(0015bc90->0015bca0)" means that if you look at
memory in that range, you'll see the object pointers that are registered:
 
0:000> dd 15bc90 15bca0-4
0015bc90  00a743f4 00a79f00 00a7b3d8 00a7b47c

[omitted]

he asked me to file an issue. thanks Mike!

@Maoni0 Maoni0 added the bug Something isn't working label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants