none
GC Lockup RRS feed

  • Question

  • How is this possible?

    Per DebugDiag:

    The following threads in Zetta_160502_185436.dmp are waiting for .net garbage collection to finish. Thread 105 triggered the garbage collection.The gargage collector thread wont start doing its work till the time the threads which have pre-emptive GC disabled have finished executing. The following threads have pre-emptive GC disabled 105.

    Thread 105 is the only thread that is not Preemptive:

    105

    249

    10008

    2e8149f0

    Cooperative

    5cfbc0

    2

    MTA

    Looking at the call stack for thread 105, it makes a call to the PerformanceCounter NextValue() method, which ultimately calls RegistryKey.InternalGetValue.  In that method it creates a large byte array, with a size of at least 65,000 bytes.  I think this is where the additional memory is needed, hence triggering the garbage collection.  Thing is, I don’t see anywhere that would be changing the GC Mode.

    My questions are:

    How can a given thread be waiting on itself before GC begins?

    How did the GC Mode of the thread get changed to Cooperative?

    Thanks

    Dan

    Thursday, May 19, 2016 7:26 PM

All replies