views:

29

answers:

1

I'm trying to fix a problem that only recently happens on a number of machine's on a VPN. They each run a client application I wrote that exposes a COM automation object.

For some strange reason I haven't been able to discover yet, one thread in the application takes up all of the available CPU time, slowing other operation on the machine. In observing the application's strange behaviour, I've noticed it's the third thread started, and if I debug on my machine I notice the first call to CoRegisterClassObject created two extra threads.

If the second of these two threads is the one that gets into an infinite loop, I'm not at all sure how to fix this. Where could I check next about what's wrong? Could it have started by one of the recent patches rolled out by Microsoft this last 'patch tuesday'?

I had a go with ProcessExplorer to extract a stack trace of the thread:

ntoskrnl.exe!ExReleaseResourceLite+0x1a3
ntoskrnl.exe!PsGetContextThread+0x329
WLDAP32.dll!Ordinal325+0x1231
WLDAP32.dll!Ordinal325+0x129e
WLDAP32.dll!Ordinal325+0x1178
ntdll.dll!LdrInitializeThunk+0x24
ntdll.dll!LdrShutdownThread+0xe9
kernel32.dll!ExitThread+0x3e
kernel32.dll!FreeLibraryAndExitThread+0x1e
ole32.dll!StringFromGUID2+0x65d
kernel32.dll!GetModuleFileNameA+0x1ba
+1  A: 

It seems that you are using MTA and CoRegisterClassObject starts new threads for serving RPC requests. However it is unclear why do you get 100% CPU usage.

Sergius
Yes, the app uses MTA and uses its own locking. Odd thing is, on other machines that run well, it appears as if CoRegisterClassObject doesn't create threads (or they terminate nicely)
Stijn Sanders