55 research outputs found
Survey on Multithreaded Data Race Detection Techniques
Nowadays the multi-core processors and threaded parallel programs are increasingly more used.However,the uncertainty of multi-threaded program leads to concurrency problems such as data race,atomicity violation,order violation and deadlock in the process of program running.Recent researches show that data race accounts for the largest proportion of concurrency bug,and most atomicity violation and order violation are caused by data race.This paper summarizes the related detection techniques in recent years.Firstly,the related concepts,causes,and the main ideas of data race detection are introduced.Then,the existing data race detection techniques in multi-threaded program are classified into three types:static analysis,dynamic analysis and hybrid detection techniques,and their characteristics are summarized comprehensively and compared in detail.Next,the limitations of exis-ting data race detection tools are discussed.Finally,future research directions and challenges in this field are discussed
Dynamic Race Prediction in Linear Time
Writing reliable concurrent software remains a huge challenge for today's
programmers. Programmers rarely reason about their code by explicitly
considering different possible inter-leavings of its execution. We consider the
problem of detecting data races from individual executions in a sound manner.
The classical approach to solving this problem has been to use Lamport's
happens-before (HB) relation. Until now HB remains the only approach that runs
in linear time. Previous efforts in improving over HB such as causally-precedes
(CP) and maximal causal models fall short due to the fact that they are not
implementable efficiently and hence have to compromise on their race detecting
ability by limiting their techniques to bounded sized fragments of the
execution. We present a new relation weak-causally-precedes (WCP) that is
provably better than CP in terms of being able to detect more races, while
still remaining sound. Moreover it admits a linear time algorithm which works
on the entire execution without having to fragment it.Comment: 22 pages, 8 figures, 1 algorithm, 1 tabl
Optimistic Prediction of Synchronization-Reversal Data Races
Dynamic data race detection has emerged as a key technique for ensuring
reliability of concurrent software in practice. However, dynamic approaches can
often miss data races owing to nondeterminism in the thread scheduler.
Predictive race detection techniques cater to this shortcoming by inferring
alternate executions that may expose data races without re-executing the
underlying program. More formally, the dynamic data race prediction problem
asks, given a trace \sigma of an execution of a concurrent program, can \sigma
be correctly reordered to expose a data race? Existing state-of-the art
techniques for data race prediction either do not scale to executions arising
from real world concurrent software, or only expose a limited class of data
races, such as those that can be exposed without reversing the order of
synchronization operations.
In general, exposing data races by reasoning about synchronization reversals
is an intractable problem. In this work, we identify a class of data races,
called Optimistic Sync(hronization)-Reversal races that can be detected in a
tractable manner and often include non-trivial data races that cannot be
exposed by prior tractable techniques. We also propose a sound algorithm OSR
for detecting all optimistic sync-reversal data races in overall quadratic
time, and show that the algorithm is optimal by establishing a matching lower
bound. Our experiments demonstrate the effectiveness of OSR on our extensive
suite of benchmarks, OSR reports the largest number of data races, and scales
well to large execution traces.Comment: ICSE'2
Non-intrusive on-the-fly data race detection using execution replay
This paper presents a practical solution for detecting data races in parallel
programs. The solution consists of a combination of execution replay (RecPlay)
with automatic on-the-fly data race detection. This combination enables us to
perform the data race detection on an unaltered execution (almost no probe
effect). Furthermore, the usage of multilevel bitmaps and snooped matrix clocks
limits the amount of memory used. As the record phase of RecPlay is highly
efficient, there is no need to switch it off, hereby eliminating the
possibility of Heisenbugs because tracing can be left on all the time.Comment: In M. Ducasse (ed), proceedings of the Fourth International Workshop
on Automated Debugging (AAdebug 2000), August 2000, Munich. cs.SE/001003
Efficient, Near Complete and Often Sound Hybrid Dynamic Data Race Prediction (extended version)
Dynamic data race prediction aims to identify races based on a single program
run represented by a trace. The challenge is to remain efficient while being as
sound and as complete as possible. Efficient means a linear run-time as
otherwise the method unlikely scales for real-world programs. We introduce an
efficient, near complete and often sound dynamic data race prediction method
that combines the lockset method with several improvements made in the area of
happens-before methods. By near complete we mean that the method is complete in
theory but for efficiency reasons the implementation applies some optimizations
that may result in incompleteness. The method can be shown to be sound for two
threads but is unsound in general. We provide extensive experimental data that
shows that our method works well in practice.Comment: typos, appendi
Hybrid Data Race Detection for Multicore Software
Multithreaded programs are prone to concurrency errors such as deadlocks, race conditions and atomicity violations. These errors are notoriously difficult to detect due to the non-deterministic nature of concurrent software running on multicore hardware. Data races result from the concurrent access of shared data by multiple threads and can result in unexpected program behaviors. Main dynamic data race detection techniques in the literature are happens-before and lockset algorithms which suffer from high execution time and memory overhead, miss many data races or produce a high number of false alarms. Our goal is to improve the performance of dynamic data race detection, while at the same time improving its accuracy by generating fewer false alarms. We develop a hybrid data race detection algorithm that is a combination of the happens-before and lockset algorithms in a tool. Rather than focusing on individual memory accesses by each thread, we focus on sequence of memory accesses by each thread, called a segment. This allows us to improve the performance of data race detection. We implement several optimizations on our hybrid data race detector and compare our technique with traditional happens-before and lockset detectors. The experiments are performed with C/C++ multithreaded benchmarks using Pthreads library from PARSEC suite and large applications such as Apache web server. Our experiments showed that our hybrid detector is 15 % faster than the happens-before detector and produces 50 % less potential data races than the lockset detector. Ultimately, a hybrid data race detector can improve the performance and accuracy of data race detection, enhancing its usability in practice
Fast and Precise Symbolic Analysis of Concurrency Bugs in Device Drivers
© 2015 IEEE.Concurrency errors, such as data races, make device drivers notoriously hard to develop and debug without automated tool support. We present Whoop, a new automated approach that statically analyzes drivers for data races. Whoop is empowered by symbolic pairwise lockset analysis, a novel analysis that can soundly detect all potential races in a driver. Our analysis avoids reasoning about thread interleavings and thus scales well. Exploiting the race-freedom guarantees provided by Whoop, we achieve a sound partial-order reduction that significantly accelerates Corral, an industrial-strength bug-finder for concurrent programs. Using the combination of Whoop and Corral, we analyzed 16 drivers from the Linux 4.0 kernel, achieving 1.5 - 20× speedups over standalone Corral
- …