Locate program deadlocks in Windows

Source: Internet
Author: User

Tools: VS 2008 and windbg 6.12.2.633

Step: 1. Bind the deadlock process to windbg first. Use it! The locks command displays the thread's lock usage information.

2. After windbg uses. Detach, bind the stack to vs 2008 to view the thread and locate the code.

0: 040>! Locks

Critsec + 1799ee4 at 01799ee4
Waiterwoken No
Lockcount 0
Recursioncount 1
Owningthread 1230
Entrycount 0
Contentioncount 0
* ** Locked

Critsec + 179a29c at 0179a29c
Waiterwoken No
Lockcount 0
Recursioncount 1
Owningthread 1230
Entrycount 0
Contentioncount 0
* ** Locked

Critsec + 18339f8 at 018339f8
Waiterwoken No
Lockcount 0
Recursioncount 1
Owningthread 5c0
Entrycount 0
Contentioncount 1
* ** Locked

Critsec + 15e746c at 015e746c
Waiterwoken No
Lockcount 0
Recursioncount 1
Owningthread 1230
Entrycount 0
Contentioncount 0
* ** Locked

Critsec + 72d43fc at 072d43fc
Waiterwoken No
Lockcount 1
Recursioncount 1
Owningthread 5c0
Entrycount 0
Contentioncount 3B

Reference link: http://bbs.pediy.com/showthread.php? T = 24077

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.