PRACTICAL STATIC RACE DETECTION FOR JAVA PARALLEL LOOPS BY COSMIN A. RĂDOI THESIS

Despite significant progress in recent years, the important problem of static race detection remains open. Previous techniques took a general approach and looked for races by analyzing the effects induced by low-level concurrency constructs (e.g., java.lang.Thread). But constructs and libraries for expressing parallelism at a higher level (e.g., fork-join, futures, parallel loops) are becoming available in all major programming languages. We claim that specializing an analysis to take advantage of the extra semantic information provided by the use of these constructs and libraries improves precision and scalability. We present IteRace, a set of techniques that are specialized to use the intrinsic thread, safety, and data-flow structure of collections and of the new loop-parallelism mechanism to be introduced in Java 8. Our evaluation shows that IteRace is fast and precise enough to be practical. It scales to programs of hundreds of thousands of lines of code and it reports few race warnings, thus avoiding a common pitfall of static analyses. The tool revealed six bugs in realworld applications. We reported four of them, one had already been fixed, and three were new and the developers confirmed and fixed them.

[1]  Danny Dig,et al.  Crossing the gap from imperative to functional programming through refactoring , 2013, ESEC/FSE 2013.

[2]  Danny Dig,et al.  Practical static race detection for Java parallel loops , 2013, ISSTA.

[3]  Danny Dig,et al.  How do developers use parallel libraries? , 2012, SIGSOFT FSE.

[4]  Yannis Smaragdakis,et al.  Sound predictive race detection in polynomial time , 2012, POPL '12.

[5]  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).

[6]  Michael Hicks,et al.  LOCKSMITH: Practical static race detection for C , 2011, TOPL.

[7]  Mayur Naik,et al.  A dynamic evaluation of the precision of static heap abstractions , 2010, OOPSLA.

[8]  Ian H. Witten,et al.  The WEKA data mining software: an update , 2009, SKDD.

[9]  Ralph E. Johnson,et al.  Relooper: refactoring for loop parallelism in Java , 2009, OOPSLA Companion.

[10]  Yun Zhang,et al.  Static data race detection for concurrent programs with asynchronous calls , 2009, ESEC/FSE '09.

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

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

[13]  Michael D. Ernst,et al.  Refactoring sequential Java code for concurrency via concurrent libraries , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[14]  Dan Roth,et al.  Understanding the Value of Features for Coreference Resolution , 2008, EMNLP.

[15]  Eric Bodden,et al.  Racer: effective race detection using aspectj , 2008, ISSTA '08.

[16]  Grigore Rosu,et al.  jPredictor: a predictive runtime analysis tool for java , 2008, ICSE '08.

[17]  Clark Verbrugge,et al.  Component-Based Lock Allocation , 2007, 16th International Conference on Parallel Architecture and Compilation Techniques (PACT 2007).

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

[19]  Alexander Aiken,et al.  Conditional must not aliasing for static race detection , 2007, POPL '07.

[20]  Rupak Majumdar,et al.  Interprocedural analysis of asynchronous programs , 2007, POPL '07.

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

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

[23]  Martín Abadi,et al.  Types for safe locking: Static race detection for Java , 2006, TOPL.

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

[25]  Michael Hicks,et al.  Dynamic inference of polymorphic lock types , 2005, Sci. Comput. Program..

[26]  Wei Chen,et al.  RaceTrack: efficient detection of data race conditions via adaptive tracking , 2005, SOSP '05.

[27]  Barbara G. Ryder,et al.  Parameterized object sensitivity for points-to analysis for Java , 2005, TSEM.

[28]  Stephen N. Freund,et al.  Type inference against races , 2004, Sci. Comput. Program..

[29]  Dinghao Wu,et al.  KISS: keep it simple and sequential , 2004, PLDI '04.

[30]  Thomas A. Henzinger,et al.  Race checking by context inference , 2004, PLDI '04.

[31]  Hiroyasu Nishiyama,et al.  Detecting Data Races Using Dynamic Escape Analysis Based on Read Barrier , 2004, Virtual Machine Research and Technology Symposium.

[32]  Rahul Agarwal,et al.  Type Inference for Parameterized Race-Free Java , 2004, VMCAI.

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

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

[35]  Thomas R. Gross,et al.  Static conflict analysis for multi-threaded object-oriented programs , 2003, PLDI '03.

[36]  Dan Grossman,et al.  Type-safe multithreading in cyclone , 2003, TLDI '03.

[37]  Martin C. Rinard,et al.  ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), November 2002 Ownership Types for Safe Programming: Preventing Data Races and Deadlocks , 2022 .

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

[39]  Martin C. Rinard,et al.  A parameterized type system for race-free Java programs , 2001, OOPSLA '01.

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

[41]  Kathryn S. McKinley,et al.  Data flow analysis for software prefetching linked data structures in Java , 2001, Proceedings 2001 International Conference on Parallel Architectures and Compilation Techniques.

[42]  Michael Hind,et al.  Pointer analysis: haven't we solved this problem yet? , 2001, PASTE '01.

[43]  Stephen N. Freund,et al.  Detecting race conditions in large programs , 2001, PASTE '01.

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

[45]  Jong-Deok Choi,et al.  Static Datarace Analysis for Multithreaded Object-Oriented Programs , 2001 .

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

[47]  Martin D. Westhead,et al.  A benchmark suite for high performance Java , 2000, Concurr. Pract. Exp..

[48]  Koen De Bosschere,et al.  RecPlay: a fully integrated practical record/replay system , 1999, TOCS.

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

[50]  Thomas W. Reps,et al.  Precise interprocedural dataflow analysis via graph reachability , 1995, POPL '95.

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

[52]  John M. Mellor-Crummey,et al.  On-the-fly detection of data races for programs with nested fork-join parallelism , 1991, Proceedings of the 1991 ACM/IEEE Conference on Supercomputing (Supercomputing '91).

[53]  Barton P. Miller,et al.  Detecting Data Races on Weak Memory Systems , 1991, ISCA.

[54]  Edith Schonberg,et al.  An empirical comparison of monitoring algorithms for access anomaly detection , 2011, PPOPP '90.

[55]  Edith Schonberg,et al.  On-the-fly detection of access anomalies , 2018, PLDI '89.