KDB: A Multi-threaded Debugger for Multi-threaded Applications
Key: BKS96-1
Author: Peter A. Buhr, Martin Karsten, Jun Shih
Date: May 1996
Kind: In proceedings
Publisher: ACM Press
Book title: ACM SIGMETRICS Symposium on Parallel and Distributed Tools
Abstract: Concurrent programs contain both sequential and concurrent errors. While deadlock and race conditions are unique to concurrent programs, there also exist algorithmic design errors, such as inhibiting concurrency, which are unknown in the sequential domain. Recently, there has been a large effort in debugging race conditions, both statically and dynamically, and to a lesser extent, deadlock. Our experience shows that concurrent errors occur with diminishing frequency in the order: traditional sequential errors, algorithmic design errors, deadlock, race conditions. However, the diffculty in determining and fixing these errors grows exponentially from sequential errors to race conditions. Our experience also shows that the frequency of deadlock and race-conditions diminishes signifcantly when high-level concurrency constructs (e.g., task, monitor, actor, etc.) are used, versus thread and lock programming. <P> We believe the best way to improve concurrent debugging capabilities and signifcantly reduce debugging time is to use high-level concurrency constructs with a symbolic debugger that truly understands it is debugging a concurrent program coupled with a cooperative concurrent run-time system that actively participates in the debugging process. Additionally, the debugger must provide independent and concurrent access to every thread of control in the target program. Such a debugger handles a large set of errors in concurrent programs, leaving esoteric errors to specialized debugging tools. Ultimately, a debugger and specialized tools must complement each other. <P> Our experience comes from designing high-level concurrent extensions for C++, called uC++, using uC++ to build itself, a debugger and visualization toolkit, a database toolkit, and using uC++ to teach concurrency to undergraduate students. uC++ is a shared-memory userlevel thread library that runs on symmetric multiprocessor architectures (e.g., SUN, DEC, SGI, Sequent); user-level threads are executed by multiple kernel threads associated with shared memory, which provides true parallelism when appropriate hardware is available. Furthermore, uC++ provides several high-level concurrency constructs, e.g., coroutines, monitors and tasks, for composing an application; hence, programmers do not work at the level of threads and locks. Over the last 5 years, we have experienced the full gamut of sequential and concurrent errors in building a reasonably large body of concurrent software, and especially working with students learning concurrent programming (~1000 students).

The documents distributed by this server have been provided by the contributing authors as a means to ensure timely dissemination of scholarly and technical work on a non-commercial basis. Copyright and all rights therein are maintained by the authors or by other copyright holders, not withstanding that they have offered their works here electronically. It is understood that all persons copying this information will adhere to the terms and constraints invoked by each author's copyright. These works may not be reposted without the explicit permission of the copyright holder.