Detecting Data Races Using Dynamic Escape Analysis Based on Read Barrier

In multi-threaded programs, a data race results in extremely hard to locate bugs because of its nondeterministic behavior. This paper describes a novel dynamic data race detection method for object-oriented programming languages. The proposed method is based on the lockset algorithm. It uses read-barrier-based dynamic escape analysis for reducing number of memory locations that must be checked at runtime for detecting data races. We implemented the proposed data race detection method in HotSpot Java1 VM. The results of an experimental evaluation show a significant performance improvement over the previous write-barrier-based method and also that the proposed method can perform data race detection with a relatively small runtime overhead.

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

[2]  Erez Petrank,et al.  Thread-local heaps for Java , 2002, MSP/ISMM.

[3]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multi-threaded programs , 1997, TOCS.

[4]  Mauricio J. Serrano,et al.  Thin locks: featherweight synchronization for Java , 1998, PLDI '98.

[5]  Erik Ruf,et al.  Effective synchronization removal for Java , 2000, PLDI '00.

[6]  K. Rustan M. Leino,et al.  An Extended Static Checker for Modular-3 , 1998, CC.

[7]  Jong-Deok Choi,et al.  Efficient and precise datarace detection for multithreaded object-oriented programs , 2002, PLDI '02.

[8]  Urs Hölzle,et al.  Removing unnecessary synchronization in Java , 1999, OOPSLA '99.

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

[10]  Jong-Deok Choi,et al.  Techniques for debugging parallel programs with flowback analysis , 1991, TOPL.

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

[12]  Matthew B. Dwyer,et al.  Exploiting Object Escape and Locking Information in Partial-Order Reductions for Concurrent Object-Oriented Programs , 2004, Formal Methods Syst. Des..

[13]  Rafael Dueire Lins,et al.  Garbage collection: algorithms for automatic dynamic memory management , 1996 .

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

[15]  Craig Chambers,et al.  Debugging optimized code with dynamic deoptimization , 1992, PLDI '92.

[16]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

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

[18]  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.

[19]  David Gay,et al.  Fast Escape Analysis and Stack Allocation for Object-Based Programs , 2000, CC.

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

[21]  Jong-Deok Choi,et al.  Escape analysis for Java , 1999, OOPSLA '99.

[22]  Andrew A. Chien,et al.  An automatic object inlining optimization and its evaluation , 2000, PLDI '00.

[23]  David Dice,et al.  Implementing Fast Java Monitors with Relaxed-Locks , 2001, Java Virtual Machine Research and Technology Symposium.