CoUninitialize is hanging indefinitely in windows server 2019
Hello,
My application was working fine in last month, but its getting hanged indefinitely after the system update.
Application is getting hanged while calling the couninitialize:
Call stack of the hang:
ntdll!NtDelayExecution+c
KERNELBASE!SleepEx
KERNELBASE!Sleep
rpcrt4!RPC_SERVER::UnregisterIf
rpcrt4!RpcServerUnregisterIf
combase!CRIFTable::UnregisterServerInterface
combase!CRIFTable::CleanupRIFEntry
combase!CHashTable::Cleanup
combase!CRIFTable::Cleanup
combase!ChannelProcessUninitialize
combase!ProcessUninitialize
combase!DecrementProcessInitializeCount
combase!wCoUninitialize
combase!CoUninitialize
Asper the Debug diag report, Detected possible blocking or leaked critical section at combase!gChannelInitLock+14 owned by thread 0
mpact of this lock
25% of threads blocked
(Threads 3)
The following functions are trying to enter this critical section
combase!CROIDTable::ClientBulkUpdateOIDWithPingServer+352
And the thread 0 call stack:
Source
ntdll!NtWaitForAlertByThreadId+c
ntdll!RtlpWaitOnAddressWithTimeout+33
ntdll!RtlpWaitOnAddress+a5
ntdll!RtlpWaitOnCriticalSection+ac
ntdll!RtlpEnterCriticalSectionContended+d6
ntdll!RtlEnterCriticalSection+49
combase!CROIDTable::ClientBulkUpdateOIDWithPingServer+352 [onecore\com\combase\dcomrem\refcache.cxx @ 1458 + 18] onecore\com\combase\dcomrem\refcache.cxx @ 1458 + 18
combase!CROIDTable::WorkerThreadLoop+95 [onecore\com\combase\dcomrem\refcache.cxx @ 1698] onecore\com\combase\dcomrem\refcache.cxx @ 1698
combase!CRpcThread::WorkerLoop+157 [onecore\com\combase\dcomrem\threads.cxx @ 278 + 1f] onecore\com\combase\dcomrem\threads.cxx @ 278 + 1f
combase!CRpcThreadCache::RpcWorkerThreadEntry+1f [onecore\com\combase\dcomrem\threads.cxx @ 76] onecore\com\combase\dcomrem\threads.cxx @ 76
kernel32!BaseThreadInitThunk+19
ntdll!__RtlUserThreadStart+2f
ntdll!_RtlUserThreadStart+1b
Can you suggest why the application is getting hanged while calling the combase!CoUninitialize and how to resolve this.