Echo: A deterministic record/replay framework for debugging multithreaded applications

Ekaterina Itskova · 2006

Debugging is a hard task. Debugging multi-threaded applications with their inherit nondeterminism is very hard. Race conditions that arise from nondeterministic application behaviour may only be spotted in one of many runs of an application and thus can be very difficult to reproduce. This project presents Echo – a framework for recording and deterministically replaying execution of single-threaded and multi-threaded applications. Echo is implemented as kernel extension to the Linux operating system. It works by intercepting and logging all the system calls invoked by the traced application and their results. The obtained trace can later be replayed to the application as many times as might be require to find and fix an error in the application. To achieve deterministic replay when multi-threaded applications are recorded and replayed, Echo implements a technique of using hardware performance counters to count the number of instructions executed by a traced application before it is swapped out for another process at a context switch. By intercepting the context switches occurring in the system combined with counting instructions executed by a given process during its quantum, Echo obtains the thread ordering which is during the replay stage is forced onto the application that is being replayed to provide a deterministic replay of an earlier execution. This report documents the techniques implemented in the Echo framework and presents and discusses the results of experiments performed to test the performance overhead incurred by Echo on application execution.

Read the paper · More papers on PaperTik