Abstract

Data races are common concurrency bugs in multi-threaded programs and many of them can cause server failures. They are difficult to be detected or verified due to some non-deterministic interleavings. Numerous static and dynamic program analysis techniques have been proposed to detect data races. However, some of detectors may report large amount of false races and some of them may miss lots of true races. This paper proposes RaceTracker that combines static and dynamic techniques to detect data races effectively and efficiently. First, we use current static detectors to produce potential races and identify ad-hoc synchronizations. Second, we instrument code locations corresponding to potential races to try best to expose them in controlled thread interleavings. Meanwhile, we apply the hybrid dynamic detection techniques to detect races in case they are exposed. Finally, we also apply the hybrid dynamic detection techniques to prune benign and false races mainly caused by ad-hoc synchronization. In order to increase the chances to trigger real race conditions in dynamic analysis, we use some strategies to control the schedule of threads. We have implemented our tool RaceTracker in the dynamic binary instrumentation framework PIN and evaluated with nearly 100 small data race programs from google data-race-test suit and some real-world concurrent applications from SPLASH-2 and Maple. Evaluations show that RaceTracker can identify more data races effectively compared with prior pure dynamic race verifiers and detectors. Meanwhile, compared with grouping verifier, RaceTracker only executes the program twice and reduces the average runtime overhead by 64%.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call