解决COM +应用程序死锁 [英] Troubleshooting a COM+ application deadlock
问题描述
我正在尝试对间歇性死锁的COM +应用程序进行故障排除。上一次锁定它时,我能够对dllhost进程进行用户模式转储,并使用WinDbg对其进行分析。在检查了所有线程和锁之后,所有内容都归结为该线程拥有的关键部分:
ChildEBP RetAddr将Args赋给Child
$ p
0deefd00 7c822114 77e6bb08 000004d4 00000000 ntdll!KiFastSystemCallRet
0deefd04 77e6bb08 000004d4 00000000 0deefd48 ntdll!ZwWaitForSingleObject + 0xc
b 0deefd74 77e6ba72 000004d4b00e9bW00b00b00b00b00b00b00b00b00b00b00b00b00b00b00b00b00b00b00b00b00b00b88b00b00b00b00b00b00b00b00b88b00b00b00b00b00b00b88b00b !WaitForSingleObject + 0x12
0deeffb8 77e660b9 000a5cc0 00000000 00000000 comsvcs!PingThread + 0xf6
0deeffec 00000000 75bb21f1 000a5cc0 00000000 kernel32!BaseThreadStart + 0x34
正在等待的对象是一个事件:
0:016> !handle 4d4 f
Handle 000004d4
类型事件
属性0
GrantedAccess 0x1f0003:
Delete,ReadControl,WriteDac,WriteOwner,Synch
QueryState,ModifyState
HandleCount 2
PointerCount 4
名称< none>
没有可用的对象特定信息
据我所知,该事件从未发出信号,导致线程在进程中挂起并占用其他多个线程。有人对下一步的工作有什么建议吗?
现在,看到该方法称为PingThread,是否有可能尝试对另一个线程执行ping操作在已经陷入僵局的过程中?
更新
这实际上是Oracle 10.2中的错误。 0.1个客户端。虽然,但我仍然对在不找到Oracle错误数据库中的错误的情况下如何解决这个问题的想法感兴趣。解决方案您可以使用
!locks
来尝试自动分析死锁,然后转储〜* kb
,并检查哪些线程正在关键部分或事件对象上等待。
此处有一个示例用法: http://www.dumpanalysis.org/blog/index.php/2007 / 07/28 / crash-dump-analysis-patterns-part-9c /
另外,此人的网站上有很多将WinDbg用于其他类型的示例包括托管代码在内的死锁: http://www.dumpanalysis.org/ 只需在页面上进行搜索即可死锁,希望对您有所帮助。
I'm trying to troubleshoot a COM+ application that deadlocks intermittently. The last time it locked up, I was able to take a usermode dump of the dllhost process and analyze it using WinDbg. After inspecting all the threads and locks, it all boils down to a critical section owned by this thread:
ChildEBP RetAddr Args to Child 0deefd00 7c822114 77e6bb08 000004d4 00000000 ntdll!KiFastSystemCallRet 0deefd04 77e6bb08 000004d4 00000000 0deefd48 ntdll!ZwWaitForSingleObject+0xc 0deefd74 77e6ba72 000004d4 00002710 00000000 kernel32!WaitForSingleObjectEx+0xac 0deefd88 75bb22b9 000004d4 00002710 00000000 kernel32!WaitForSingleObject+0x12 0deeffb8 77e660b9 000a5cc0 00000000 00000000 comsvcs!PingThread+0xf6 0deeffec 00000000 75bb21f1 000a5cc0 00000000 kernel32!BaseThreadStart+0x34
The object it's waiting on is an event:
0:016> !handle 4d4 f Handle 000004d4 Type Event Attributes 0 GrantedAccess 0x1f0003: Delete,ReadControl,WriteDac,WriteOwner,Synch QueryState,ModifyState HandleCount 2 PointerCount 4 Name <none> No object specific information available
As far as I can tell, the event never gets signaled, causing the thread to hang and hold up several other threads in the process. Does anyone have any suggestions for next steps in figuring out what's going on?
Now, seeing as the method is called PingThread, is it possible that it's trying to ping another thread in the process that's already deadlocked?
UPDATE
This actually turned out to be a bug in the Oracle 10.2.0.1 client. Although, I'm still interested in ideas on how I could have figured this out without finding the bug in Oracle's bug database.解决方案You could use
!locks
which will try to auto analyse deadlocks and then dump the call stacks of the threads~* kb
and check which threads are waiting on the critical section or event objects.There is an example usage here: http://www.dumpanalysis.org/blog/index.php/2007/07/28/crash-dump-analysis-patterns-part-9c/
plus the guy's site has lots of examples of using WinDbg for other types of deadlocks including managed code: http://www.dumpanalysis.org/ just do a search on the page for 'deadlock', hope this helps.
这篇关于解决COM +应用程序死锁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!