应用程序挂起在RPC上

时间:2016-03-16 11:14:37

标签: c++ windows webrtc hang wasapi

我有一个使用webrtc / coreaudio的应用程序用于媒体,它很少挂在一台PC上。

WinDBG的!analyze -v -hang提供以下内容:

DEFAULT_BUCKET_ID:  APPLICATION_HANG_BlockedOn_RPC
PRIMARY_PROBLEM_CLASS:  APPLICATION_HANG_BlockedOn_RPC
BUCKET_ID:  HANG_audioses!AudioServerDestroyStream+19
FAILURE_BUCKET_ID:APPLICATION_HANG_BlockedOn_RPC_cfffffff_AudioSes.dll!AudioServerDestroyStream
ANALYSIS_SOURCE:  UM
FAILURE_ID_HASH_STRING:um:application_hang_blockedon_rpc_cfffffff_audioses.dll!audioserverdestroystream

有这样的callstack:

ntdll!NtAlpcSendWaitReceivePort+0x12
rpcrt4!LRPC_CASSOCIATION::AlpcSendWaitReceivePort+0x5d
rpcrt4!LRPC_BASE_CCALL::DoSendReceive+0xa3
rpcrt4!LRPC_BASE_CCALL::SendReceive+0x2f
rpcrt4!LRPC_CCALL::SendReceive+0x25
rpcrt4!I_RpcSendReceive+0x28
rpcrt4!NdrSendReceive+0x31
rpcrt4!NdrpSendReceive+0x9
rpcrt4!NdrClientCall2+0x1a6
AudioSes!AudioServerDestroyStream+0x19
AudioSes!CAudioClient::DestroyRemoteStream+0x62
AudioSes!CAudioClient::FinalRelease+0xd8
AudioSes!ATL::CComObject<CAudioClient>::~CComObject<CAudioClient>+0x33
AudioSes!ATL::CComObject<CAudioClient>::`scalar deleting destructor'+0xd
AudioSes!ATL::CComObject<CAudioClient>::Release+0x27
AudioSes!CAudioRenderClient::FinalRelease+0x4c
AudioSes!ATL::CComObject<CAudioRenderClient>::~CComObject<CAudioRenderClient>+0x17
AudioSes!ATL::CComObject<CAudioRenderClient>::`scalar deleting destructor'+0xd
AudioSes!ATL::CComObject<CAudioRenderClient>::Release+0x27
IPTLibrary!webrtc::AudioDeviceWindowsCore::StopPlayout+0x226
IPTLibrary!webrtc::AudioDeviceModuleImpl::StopPlayout+0x2d

这是我的问题:如何知道/找到从AudioSes调用RPC的服务!AudioServerDestroyStream?感谢。

1 个答案:

答案 0 :(得分:0)

  1. 设置内核调试程序
  2. 在堆栈上找到客户端ALPC端口的句柄
  3. 找到ALPC端口的内核地址 !handle port_handle
  4. 打印有关端口的信息: !alpc port_address
  5. 如果你做的一切正确,你会看到服务器进程的地址
  6. 使用!process命令打印信息abot进程