I have a .NET 3.5 website that freezes and builds up to a 100% processor from time to time. Running a dump through WinDbg shows that about half of my threads are sitting in
System.Reflection.CerHashtable`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].get_Item(System.__Canon)
and the other half -
System.Reflection.Emit.DynamicMethod.CreateDelegate(System.Type)
they are all in the middle of LINQ-to-SQL queries. Does anyone know what is going on here? The DB seems to remain responsive, at least from SSMS, as long as the problem continues.
If anyone needs more information, let me know.
Edit:
There are 22 threads. (and I generalized when I said half) This is a way out of threads
ThreadCount: 23
UnstartedThread: 0
BackgroundThread: 22
PendingThread: 0
DeadThread: 1
Hosted Runtime: no
Preemptive lock
ID OSID ThreadOBJ State GC GC Alloc Context Domain Count APT Exception
7 1 19a0 00000000022c7710 8220 Enabled 0000000000000000:0000000000000000 00000000022a2940 0 Ukn
27 2 1fa0 0000000005591f90 b220 Enabled 00000001a0425058:00000001a04266c0 00000000022a2940 0 MTA (Finalizer)
29 3 4824 0000000006550450 380b220 Enabled 000000012213cf18:000000012213dec0 00000000067500a0 1 MTA (Threadpool Worker)
30 4 40c8 00000000061378c0 380b220 Enabled 00000001c1f84c38:00000001c1f860f0 00000000067500a0 1 MTA (Threadpool Worker)
31 5 2a54 0000000006138770 180b220 Disabled 0000000101e3c858:0000000101e3db00 00000000067500a0 2 MTA (Threadpool Worker)
32 6 1984 000000000613c940 180b220 Enabled 0000000000000000:0000000000000000 00000000067500a0 0 MTA (Threadpool Worker) System.ObjectDisposedException (000000017fffe458)
33 7 18d8 000000000613eb80 380b220 Enabled 00000001820c3a30:00000001820c3c90 00000000067500a0 1 MTA (Threadpool Worker)
34 8 31f4 0000000006141d10 380b220 Enabled 0000000122147048:0000000122147ec0 00000000067500a0 1 MTA (Threadpool Worker)
35 9 5fe4 00000000061427c0 180b220 Enabled 00000001e1ffbdc8:00000001e1ffc190 00000000067500a0 2 MTA (Threadpool Worker)
36 a 3768 0000000006143270 180b220 Enabled 00000001e200add0:00000001e200c190 00000000067500a0 1 MTA (Threadpool Worker)
37 b 1820 000000000670fa10 80a220 Enabled 0000000000000000:0000000000000000 00000000022a2940 0 MTA (Threadpool Completion Port)
38 c 1220 000000000673e160 1220 Enabled 0000000000000000:0000000000000000 00000000022a2940 0 Ukn
39 d 507c 0000000008c1f9b0 180b220 Enabled 0000000101e392d0:0000000101e39b00 00000000067500a0 2 MTA (Threadpool Worker)
14 e 651c 000000000a507000 880a220 Enabled 0000000000000000:0000000000000000 00000000022a2940 0 MTA (Threadpool Completion Port)
40 f 14a0 000000000ab0a850 380b220 Enabled 00000001a15886c0:00000001a158a638 00000000067500a0 1 MTA (Threadpool Worker)
XXXX 10 0 000000000bd7c7b0 9820 Enabled 0000000000000000:0000000000000000 00000000022a2940 0 MTA
42 11 48d8 000000000c00c120 380b220 Enabled 0000000000000000:0000000000000000 00000000067500a0 0 MTA (Threadpool Worker)
3 12 6180 000000000c00c6f0 220 Enabled 0000000000000000:0000000000000000 00000000022a2940 0 Ukn
43 13 3798 000000000c00d290 180b220 Enabled 00000001420f9730:00000001420f9828 00000000067500a0 2 MTA (Threadpool Worker)
45 14 1be8 000000001184f150 180b220 Enabled 00000001c1f880e0:00000001c1f880f0 00000000067500a0 2 MTA (Threadpool Worker)
48 15 13ec 000000001184f720 200b220 Enabled 0000000000000000:0000000000000000 00000000067500a0 1 MTA
49 17 3bac 00000000198f1b20 180b220 Enabled 0000000182059020:0000000182059c90 00000000067500a0 2 MTA (Threadpool Worker)
50 16 4670 00000000197b6b00 380b220 Enabled 0000000162040fd0:0000000162042658 00000000067500a0 1 MTA (Threadpool Worker)
! EEStack ( pastebin, )
http://pastebin.com/qcF4jX1g
SQL 2005
EDIT:
: syncblk, "CerHashtable" , CerHashtable, , ?
Index SyncBlock MonitorHeld Recursion Owning Thread Info SyncBlock Owner
148 000000000e4ec1f8 12 0 0000000000000000 none 000000017fe48560 System.Reflection.CerHashtable`2[[System.Reflection.RuntimeMethodInfo, mscorlib],[System.Reflection.RuntimeMethodInfo, mscorlib]]
Waiting threads:*** WARNING: Unable to verify checksum for NewRelic.Profiler.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for NewRelic.Profiler.dll -
29 30 33 34 40 50
-----------------------------
Total 252
CCW 3
RCW 5
ComClassFactory 0
Free 81