应用在 RPC 上挂起
App hangs on RPC
我有一个使用 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
使用这样的调用堆栈:
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
我的问题是:我如何 know/locate 从 AudioSes!AudioServerDestroyStream 调用 RPC 的服务是什么?谢谢
- 设置内核调试器
- 在堆栈中找到客户端 ALPC 端口的句柄
- 找到ALPC端口的内核地址
!句柄 port_handle
- 输出有关端口的信息:
!alpc port_address
- 如果一切正常,您将看到服务器进程的地址
- 使用 !process 命令打印进程信息
我有一个使用 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
使用这样的调用堆栈:
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
我的问题是:我如何 know/locate 从 AudioSes!AudioServerDestroyStream 调用 RPC 的服务是什么?谢谢
- 设置内核调试器
- 在堆栈中找到客户端 ALPC 端口的句柄
- 找到ALPC端口的内核地址 !句柄 port_handle
- 输出有关端口的信息: !alpc port_address
- 如果一切正常,您将看到服务器进程的地址
- 使用 !process 命令打印进程信息