From: Alexander P. <gl...@go...> - 2012-06-29 13:59:53
|
On Fri, Jun 29, 2012 at 5:50 PM, Christoph Bartoschek <bar...@or...> wrote: > Am 29.06.2012 15:46, schrieb Alexander Potapenko: > >> This may be not that easy to guess which locks are taken when the >> deadlock has already occurred. >> However a Valgrind-like tool is really an overkill for deadlock >> detection: a small library that interposes pthread_mutex_* (or other >> locking primitives) and keeps track of the locking order is fairly >> enough. > > > In a deadlock all threads wait on the same lock. It should be easy to find > it. Unfortunately in general there may be any number of locks and any set of threads may wait for any of those locks. |