Race Directed Randomized Dynamic Analysis of Concurrent Programs

TitleRace Directed Randomized Dynamic Analysis of Concurrent Programs
Publication TypeConference Paper
Year of Publication2008
AuthorsSen, K.
Conference NameACM SIGPLAN 2008 Conference on Programming Language Design and Implementation (PLDI'08)
Date Published06/2008
Conference LocationTucson, Arizona
Abstract

Bugs in multi-threaded programs often arise due to data races. Numerous static and dynamic program analysis techniques have been proposed to detect data races. We propose a novel randomized dynamic analysis technique that utilizes potential data race information obtained from an existing analysis tool to separate real races from false races without any need for manual inspection. Specifically, we use potential data race information obtained from an existing dynamic analysis technique to control a random scheduler of threads so that real race conditions get created with very high probability and those races get resolved randomly at runtime. Our approach has several advantages over existing dynamic analysis tools. First, we can create a real race condition and resolve the race randomly to see if an error can occur due to the race. Second, we can replay a race revealing execution efficiently by simply using the same seed for random number generation--we do not need to record the execution. Third, our approach has very low overhead compared to other precise dynamic race detection techniques because we only track all synchronization operations and a single pair of memory access statements that are reported to be in a potential race by an existing analysis. We have implemented the technique in a prototype tool for Java and have experimented on a number of large multi-threaded Java programs. We report a number of previously known and unknown bugs and real races in these Java programs.

AttachmentSize
Race Directed Random Testing of Concurrent Programs .pdf207.59 KB