I’m coming into a project that has a known issue. The application hangs on a call to GC.WaitForPendingFinalizers. The obvious solution workaround is to remove the WaitForPendingFinalizers call but unfortunately this is being done for us in a third-party assembly, so removal is not an option.
Instead, I want to find the root of the issue and figure out who’s finalizer is blocking. The codebase, however, is large and since I’m just coming into it, it’s also unfamiliar so I don’t even have any gut feelings or intuitions of where it might be. This means I’m going to need to use intrumentation and tools to help find it.
So my questions are:
- Will the framework/ee thread that is iterating the Finalizer Queue show up in the Threads view in Studio? The stack trace for this would go a long way to finding where we are hanging.
- Is there a tool that will show me pending finalizers and their roots (this is a CF project, but I’m willing to take wide paths to try and find this)?
- Anyone have any thoughts or experiences they want to share that might aid in finding this?
I took a quick look in VS (VS 11) and when I break I can see a Thread called “GC Finalizer Thread” and it’s caught doing a Sleep() in my destructor.
But your mention of CF may make it an entirely different ballgame.