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

immanuel litzroth ilitzroth at gmail.com
Tue Mar 8 16:54:13 UTC 2011


Hey,
I've been using gdb, linux and mt programming for a good year or two now in
a professional
setting and I have following advice:
1) Get a good logging framework. We use log4cxx but I think someone is
working on
boost logging too. For some things you just need to be able to follow
logging
2) Use valgrind often! It is usually 100% correct when it points to problems
in your code but
might be incorrect when pointing out problems in libs.
3) Get a good testing framework like google gtest... which you then run
under valgrind...
4) Configure your system to dump core.
We have tried hellgrind and found the output difficult to interpret and
giving too much false
positives -- but on the other hand they might be disasters waiting too
happen.
Greetz,
Immanuel


On Tue, Mar 8, 2011 at 1:24 PM, Harry Van Haaren <harryhaaren at gmail.com>wrote:

> Hey,
>
> Thanks for the "thead apply all bt" tip, gets me a bit more info.
>
> As it happens I fixed the bug that cause this thread by mistake, it was a
> deadlock in GUI code.
>
> I've looked into valgrind and helgrind, getting lots of output... don't
> really know how to use it yet.
> Tutorials and man will sort me out when I get time...
>
> Thanks, -Harry
>
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev at lists.linuxaudio.org
> http://lists.linuxaudio.org/listinfo/linux-audio-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20110308/24ab8383/attachment.html>


More information about the Linux-audio-dev mailing list