[LAD] Finding Deadlock causes in multithreaded C++ using gdb

Arnold Krille arnold at arnoldarts.de
Sun Feb 20 21:53:24 UTC 2011


On Sunday 20 February 2011 22:12:32 Harry Van Haaren wrote:
> Hey guys,
> 
> I'm working on a mulithreaded version of my pet project, and I've now
> managed to deadlock one thread,
> which in turn makes the GUI thread wait for a mutex lock, and then finally
> segfaults the whole program :-)
> 
> So I'm looking for pointers on how best to find a deadlock's cause using
> gdb?
> 
> Other advice / good articles on the topic etc welcome!
> Thanks for reading, -Harry

gdb is probably not the right tool for this. valgrinds helgrind is much better 
suited.
It also doesn't hurt to run one app in callgrind and memcheck every once in a 
while...

Have fun,

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20110220/711b9afe/attachment.pgp>


More information about the Linux-audio-dev mailing list