Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #3092
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer, comp.lang.c++ |
| Subject | Re: What's the deal with deadlocks |
| Date | 2011-04-18 08:41 +1200 |
| Message-ID | <9111jaFpdmU7@mid.individual.net> (permalink) |
| References | <23020668-d86c-489a-988b-7b379f34851c@j13g2000pro.googlegroups.com> <Xns9ECAEFF0160FEmyfirstnameosapriee@216.196.109.131> |
Cross-posted to 2 groups.
On 04/18/11 08:35 AM, Paavo Helde wrote: > Joe Snodgrass<joe.snod@yahoo.com> wrote in news:23020668-d86c-489a-988b- > 7b379f34851c@j13g2000pro.googlegroups.com: > >> >> The general concept is simple enough, but it seems to me that you'll >> need special tools to diagnose this specific problem. How do you get >> the debugger to look inside threads, see that they're hung, and find >> out where the problem is happening? Do the debuggers have some >> features that I haven't heard of? TIA. > > Debugging deadlocks is easier than e.g. race conditions, because when a > deadlock appears the program is effectively stopped at the point of the > error and one can easily attach the debugger and study the stack traces of > all the threads. All the debuggers I use support this. The only problem is > that if there are many threads running then finding the actual culprit may > become tedious. I am not sure if this can be automated by some tools > currently. > > For avoiding deadlocks in advance one can use valgrind+helgrind and fix all > inconsistent lock order diagnostics it spits out. This way one should be > able to get rid of all potential deadlock scenarios in all code paths > covered by the test run. There are also static deadlock analysis tools such as Sun Studio's LockLint. -- Ian Collins
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
What's the deal with deadlocks Joe Snodgrass <joe.snod@yahoo.com> - 2011-04-17 09:15 -0700
Re: What's the deal with deadlocks markspace <-@.> - 2011-04-17 09:35 -0700
Re: What's the deal with deadlocks Lew <noone@lewscanon.com> - 2011-04-17 13:14 -0400
Re: What's the deal with deadlocks Patricia Shanahan <pats@acm.org> - 2011-04-17 09:45 -0700
Re: What's the deal with deadlocks Robert Klemme <shortcutter@googlemail.com> - 2011-04-17 19:30 +0200
Re: What's the deal with deadlocks Paavo Helde <myfirstname@osa.pri.ee> - 2011-04-17 15:35 -0500
Re: What's the deal with deadlocks Ian Collins <ian-news@hotmail.com> - 2011-04-18 08:41 +1200
Re: What's the deal with deadlocks Joe Snodgrass <joe.snod@yahoo.com> - 2011-04-18 11:59 -0700
Re: What's the deal with deadlocks Lew <noone@lewscanon.com> - 2011-04-18 16:22 -0400
Re: What's the deal with deadlocks "Alf P. Steinbach /Usenet" <alf.p.steinbach+usenet@gmail.com> - 2011-04-18 22:32 +0200
Re: What's the deal with deadlocks Ian Collins <ian-news@hotmail.com> - 2011-04-19 09:53 +1200
Re: What's the deal with deadlocks "Alf P. Steinbach /Usenet" <alf.p.steinbach+usenet@gmail.com> - 2011-04-19 01:21 +0200
Re: What's the deal with deadlocks Joe Snodgrass <joe.snod@yahoo.com> - 2011-04-19 14:10 -0700
Re: What's the deal with deadlocks Lew <noone@lewscanon.com> - 2011-04-19 23:01 -0400
Re: What's the deal with deadlocks Joe Snodgrass <joe.snod@yahoo.com> - 2011-04-20 17:00 -0700
Re: What's the deal with deadlocks Lew <noone@lewscanon.com> - 2011-04-21 00:29 -0400
Re: What's the deal with deadlocks Patricia Shanahan <pats@acm.org> - 2011-04-19 21:18 -0700
Re: What's the deal with deadlocks Tom Anderson <twic@urchin.earth.li> - 2011-04-19 00:50 +0100
Re: What's the deal with deadlocks Roedy Green <see_website@mindprod.com.invalid> - 2011-04-17 14:01 -0700
Re: What's the deal with deadlocks Noah Roberts <dont@email.me> - 2011-04-18 16:59 -0700
csiph-web