Acculock: Accurate and efficient detection of data races

Happens-before detectors are precise but can be too conservative to detect certain data races in repeated test runs as they are sensitive to thread interleaving. By making the opposite tradeoffs, lockset detectors can detect more races but are not precise (by reporting false positives). For both types of detectors, happens-before detectors run more slowly as they use expensive vector clocks. Existing hybrid race detectors (combining lockset and happens-before) alleviate some of the limitations in both analysis techniques at the cost of additional analysis overhead. Recently, due to FastTrack, epoch-based happens-before and lockset detectors now exhibit comparable performance. It is the time to rethink how to design a hybrid race detector to balance precision and coverage, by leveraging the lightweightness of epoch clocks. Acculock is the first such a solution. Acculock analyzes a program by reasoning about the subset of the happens-before relation observed with lock acquires and releases excluded, thereby reducing its sensitivity to thread interleaving. When such a weaker happens-before relation is violated, Acculock applies a new efficient lockset algorithm to enforce a lock-based synchronization discipline by distinguishing the locks protecting reads and writes. The key motivation behind is to ensure that Acculock can improve happens-before detectors by discovering also data races in alternate thread interleavings when analyzing one program execution while limiting false warnings thus incurred in a controlled manner. In addition, Acculock achieves these objectives by maintaining comparable performance as FastTrack, the fastest happens-before detector. All these properties of Acculock are validated and confirmed by comparing it against six other detectors, all implemented in Jikes RVM using 11 benchmark programs.

[1]  Stephen N. Freund,et al.  The RoadRunner Dynamic Analysis Framework for Concurrent Programs , 2010, PASTE '10.

[2]  Leslie Lamport,et al.  Time, clocks, and the ordering of events in a distributed system , 1978, CACM.

[3]  Dawson R. Engler,et al.  RacerX: effective, static detection of race conditions and deadlocks , 2003, SOSP '03.

[4]  Assaf Schuster,et al.  Efficient on-the-fly data race detection in multithreaded C++ programs , 2003, Proceedings International Parallel and Distributed Processing Symposium.

[5]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[6]  Assaf Schuster,et al.  Efficient on-the-fly data race detection in multithreaded C++ programs , 2003, PPoPP '03.

[7]  Barton P. Miller,et al.  What are race conditions?: Some issues and formalizations , 1992, LOPL.

[8]  Wenguang Chen,et al.  RACEZ: a lightweight and non-invasive race detection tool for production applications , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[9]  Thomas R. Gross,et al.  Object race detection , 2001, OOPSLA '01.

[10]  Koen De Bosschere,et al.  TRaDe: A Topological Approach to On-the-Fly Race Detection in Java Programs , 2001, Java Virtual Machine Research and Technology Symposium.

[11]  Stephen N. Freund,et al.  Velodrome: a sound and complete dynamic atomicity checker for multithreaded programs , 2008, PLDI '08.

[12]  Charles E. McDowell,et al.  Proceedings of the 1991 ACM/ONR workshop on Parallel and distributed debugging , 1991 .

[13]  Satish Narayanasamy,et al.  LiteRace: effective sampling for lightweight data-race detection , 2009, PLDI '09.

[14]  LamportLeslie Time, clocks, and the ordering of events in a distributed system , 1978 .

[15]  Edith Schonberg,et al.  Detecting access anomalies in programs with critical sections , 1991, PADD '91.

[16]  Assaf Schuster,et al.  MultiRace: efficient on‐the‐fly data race detection in multithreaded C++ programs , 2007, Concurr. Comput. Pract. Exp..

[17]  L MinSang,et al.  An efficient cache-based access anomaly detection scheme , 1991 .

[18]  Assaf Schuster,et al.  MultiRace: efficient on-the-fly data race detection in multithreaded C++ programs: Research Articles , 2007 .

[19]  Konstantin Serebryany,et al.  ThreadSanitizer: data race detection in practice , 2009, WBIA '09.

[20]  Stephen N. Freund,et al.  Type-based race detection for Java , 2000, PLDI '00.

[21]  Jingling Xue,et al.  Acculock: Accurate and efficient detection of data races , 2011, CGO 2011.

[22]  Alexander Aiken,et al.  Effective static race detection for Java , 2006, PLDI '06.

[23]  Jeffrey S. Foster,et al.  LOCKSMITH: context-sensitive correlation analysis for race detection , 2006, PLDI '06.

[24]  Stephen N. Freund,et al.  FastTrack: efficient and precise dynamic race detection , 2009, PLDI '09.

[25]  Michael D. Bond,et al.  PACER: proportional detection of data races , 2010, PLDI '10.

[26]  Jong-Deok Choi,et al.  Hybrid dynamic data race detection , 2003, PPoPP '03.

[27]  Shaz Qadeer,et al.  Goldilocks: Java Runtime , 2007 .

[28]  Stephen N. Freund,et al.  Adversarial memory for detecting destructive races , 2010, PLDI '10.

[29]  Amer Diwan,et al.  The DaCapo benchmarks: java benchmarking development and analysis , 2006, OOPSLA '06.

[30]  Sorin Lerner,et al.  RELAY: static race detection on millions of lines of code , 2007, ESEC-FSE '07.

[31]  Jong-Deok Choi,et al.  An efficient cache-based access anomaly detection scheme , 1991, ASPLOS IV.

[32]  Rahul Agarwal,et al.  Automated type-based analysis of data races and atomicity , 2005, PPoPP.