Dynamic Prediction of Concurrency Errors
- Author(s): Sadowski, Caitlin
- Advisor(s): Whitehead, Jr., E. James
- et al.
Taking advantage of parallel processors often entails using concurrent software, where multiple threads work simultaneously. However, concurrent software suffers from a bevy of concurrency-specific errors such as data races and atomicity violations. Dynamic analysis, based on analyzing the sequence of operations (called a trace) from a source program as that program executes, is a powerful technique for finding concurrency errors in multithreaded programs. Unfortunately, dynamic analyses are confined to analyzing the observed trace.
Nonetheless, there are situations where a concurrency error does not manifest on a particular trace although it is intuitively clear that the program that produced that particular trace contains a concurrency error. The central research hypothesis explored by this dissertation is that dynamic analysis can discover concurrency errors that do not manifest on the observed trace.
This dissertation introduces a new relation, causally-precedes (CP), that enables precise predictive race detection, with no false positives. A single CP-based race detection run discovers several new races, unexposed by 10 independent runs of a traditional dynamic race detector. To further address dynamic predictive race detection, this dissertation introduces the must-before relation and accompanying dynamic analysis tool (Embracer) that is not precise but enables online prediction. Experimental results show that Embracer detects 20-23% more races than a traditional race detector alone for reactive programs.
This dissertation also introduces SideTrack, a lightweight dynamic atomicity analysis tool that generalizes from the observed trace to predict additional atomicity violations. Experimental results show that this predictive ability increases the number of atomicity violations detected by SideTrack by 40%.
When developing these tools, it became clear that it was difficult to test them. For example, test programs that contain data races may be non-deterministic. A methodology for deterministic testing for dynamic analysis tools using trace snippets, described in this dissertation, alleviates this difficulty.