|
From: Stefan K. <en...@ho...> - 2010-07-08 08:30:29
|
hi,
is anyone aware of a valgrind tool that can help me to debug a deadlock
in a highly threaded program. The programm can easily create hundreds of
threads.
What I am locking for is a tool that tracks for each thread which
mutexes are locked (incl. the strackframe of the lock) and if it is
waiting on a mutex (also including the stackframe). When the app
deadlocks, the collected data can be represented as a directed graph
("thread -> mutex" for a held lock and "mutex -> thread" for a pending
lock) and one could run Tarjan's strongly connected components algorithm
[1][2] to detect cycles. For each found cycle it could print the
involved threads with the backtraces.
Stefan
[1]
http://en.wikipedia.org/wiki/Tarjan%E2%80%99s_strongly_connected_components_algorithm
[2] http://www.logarithmic.net/pfh/blog/01208083168
|