We were recently looking at a dump where it appeared there was a very large number of objects in the finalizer queue according to the !FinalizeQueue command. Upon further investigation this appeared to be a red herring, since the vast majority of objects are WeakReferences, and those are magic. Basically, they appear as finalizable objects, but they won't be finalized by the queue, but rather cleaned up by the GC.
I'd propose that !FinalizeQueue should just filter out the WeakReferences, since that's effectively what the runtime is doing as well. Otherwise this can result in some confusion of the actual state of your process.
We were recently looking at a dump where it appeared there was a very large number of objects in the finalizer queue according to the !FinalizeQueue command. Upon further investigation this appeared to be a red herring, since the vast majority of objects are WeakReferences, and those are magic. Basically, they appear as finalizable objects, but they won't be finalized by the queue, but rather cleaned up by the GC.
I'd propose that !FinalizeQueue should just filter out the WeakReferences, since that's effectively what the runtime is doing as well. Otherwise this can result in some confusion of the actual state of your process.