KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
My application (base application is MFC interop with C++/CLI but it also contains a lot of C#, Windows Forms, WPF) has has a handle leak. Shortly after application start I can see the handle count in the task manager grow continuously (at a rate of 10 new handles per second). So I used handles.exe to see what kind of handles they are. I found out that the leaking handles are process handles. And they are process handles to the process of my application. So I wonder what operations would typically create a handle to the process it runs in. Any idea? Have you ever seen something like this? What else could I do to track down the leak, considering that I can't use debug DLLs and that I can only use tools that can be xcopy deployed. Update: I was able to throw windbg and !handle, !htrace at it and found out that the process handles are all created using the following stack traces (ordered by frequency): 0x79f7570b: mscorwks!CorExitProcess+0x00022055 0x79f03edd: mscorwks!GetPrivateContextsPerfCounters+0x0000b6fe 0x79f04b87: mscorwks!GetPrivateContextsPerfCounters+0x0000c3a8 0x79f04b03: mscorwks!GetPrivateContextsPerfCounters+0x0000c324 0x79f919bf: mscorwks!CorExitProcess+0x0003e309 0x79f91b28: mscorwks!CorExitProcess+0x0003e472 0x792d6b4c: mscorlib_ni+0x00216b4c 0x1391a663: +0x1391a663 0x1391a0b1: +0x1391a0b1 0x7a9ea544: System_ni+0x005aa544 0x792a842f: mscorlib_ni+0x001e842f or 0x7c8106f5: kernel32!CreateThread+0x0000001e 0x79f04bb2: mscorwks!GetPrivateContextsPerfCounters+0x0000c3d3 0x79f04b03: mscorwks!GetPrivateContextsPerfCounters+0x0000c324 0x79f919bf: mscorwks!CorExitProcess+0x0003e309 0x79f91b28: mscorwks!CorExitProcess+0x0003e472 0x792d6b4c: mscorlib_ni+0x00216b4c 0x1391a663: +0x1391a663 0x1391a0b1: +0x1391a0b1 0x7a9ea544: System_ni+0x005aa544 0x792a842f: msc
Tags (comma-separated)
Save Edits
Cancel