.NET Developments

Jan 3 2008   11:55AM GMT

Raymond Chen on diagnosing deadlocks of doom

Yuval Shavit Profile: YuvalShavit

The deadlock is a dreaded state. When non-famous programmers get deadlocked they sometimes call on famous programmers such as Raymond Chen. A late-year entry on his The Old New Thing blog considers the trail one must follow forensically to uncover the culprit. The (somewhat long) title says it: Psychic debugging: The first step in diagnosing a deadlock is a simple matter of following the money.

Chen writes: ”The thing about debugging deadlocks is that you usually don’t need to understand what’s going on. The diagnosis is largely mechanical once you get your foot in the door. (Though sometimes it’s hard to get your initial footing.)”

In Chen’s scheme, finding the deadlock is a matter of figuring out when Thread One is waiting for Thread Two, discerning what the latter thread is doing, and seeing if there is a fatal dependency there that is based on what Thread One is doing.

Note: The treaded comments on this post are great – obviously a few people have more on their minds than Sudoku.

Also, check out Raymond Chen’s annual link clearance. Warning:  they are not all about technology issues.

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: