Too many semaphore handles -
10-08-2007
, 12:22 AM
I have a simple c# class which is derived from the ServicedComponent. Each
time I creat an instance of it, a semaphore handle is also added by
comsvcs.dll. But the handle is not released after the dispose-call of the
object. The report of the Debug Diagnostic Tool says that the leak is caused
by comsvcs.dll:
Function details
Function comsvcs!CActivity::CActivity+50
Allocation type Semaphore handle(s)
Handle Count 4960 handle(s)
Leak Probability 100%
Call stack sample 1
Handle 0x00000a74
Allocation Time 00:05:57 since tracking started
Function Source Destination
comsvcs!CActivity::CActivity+50 kernel32!CreateSemaphoreW
comsvcs!ATL::CComObject<CActivity>::CComObject<CAc tivity>+16
comsvcs!CActivity::CActivity
comsvcs!CActivity::Create+2d comsvcs!ATL::CComObject::CComObject
mscorwks!CallDescrWorker+30
mscorwks!MethodDesc::CallDescr+1b8 mscorwks!CallDescrWorker
mscorwks!MethodDesc::CallDescr+4f mscorwks!MethodDesc::CallDescr
mscorwks!MethodDesc::Call+97 mscorwks!MethodDesc::CallDescr
mscorwks!ThreadNative::KickOffThread_Worker+9d mscorwks!MethodDesc::Call
mscorwks!ThreadNative::KickOffThread+c2
mscorwks!ThreadNative::KickOffThread_Worker
mscorwks!Thread::intermediateThreadProc+44
kernel32!BaseThreadStart+34
OS: Windows 2003 Enterprise Edition SP2
..Net Framework: 1.1 SP1
Those semaphore handles will only be released when the threads stop.
Has anyone seen this problem before?
Any furthur comments and suggestions are welcome.
Thanks in advance. |