Author Archive: Matt Cannizzaro

Finding multi-threading bugs with gdb

Multi-threading is a useful tool, but programs that use multiple threads are susceptible to types of bugs that cannot occur in single threaded programs. Race conditions can exist when multiple threads access the same data concurrently. Synchronization primitives, like mutexes and condition variables, are useful in avoiding race conditions, but can cause other problems when used incorrectly. In particular, a deadlock can occur when several threads are competing for the same mutexes in such a way that none of the threads can proceed. This post demonstrates how to use gdb to find deadlocks and similar threading bugs in FlasCC programs.
Continue reading…