Race directed scheduling of concurrent programs

Detection of data races in Java programs remains a difficult problem. The best static techniques produce many false positives, and also the best dynamic techniques leave room for improvement. We present a new technique called race directed scheduling that for a given race candidate searches for an input and a schedule that lead to the race. The search iterates a combination of concolic execution and schedule improvement, and turns out to find useful inputs and schedules efficiently. We use an existing technique to produce a manageable number of race candidates. Our experiments on 23 Java programs found 72 real races that were missed by the best existing dynamic techniques. Among those 72 races, 31 races were found with schedules that have between 1 million and 108 million events, which suggests that they are rare and hard-to-find races.

[1]  L.A. Smith,et al.  A Parallel Java Grande Benchmark Suite , 2001, ACM/IEEE SC 2001 Conference (SC'01).

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

[3]  Klaus Havelund,et al.  Model checking JAVA programs using JAVA PathFinder , 2000, International Journal on Software Tools for Technology Transfer.

[4]  Laurie J. Hendren,et al.  Optimizing Java Bytecode Using the Soot Framework: Is It Feasible? , 2000, CC.

[5]  Leslie Lamport,et al.  How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs , 2016, IEEE Transactions on Computers.

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

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

[8]  Rupak Majumdar,et al.  Directed test generation using symbolic grammars , 2007, ASE.

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

[10]  Koushik Sen DART: Directed Automated Random Testing , 2009, Haifa Verification Conference.

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

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

[13]  Mira Mezini,et al.  Taming reflection: Aiding static analysis in the presence of reflection and custom class loaders , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[14]  Koushik Sen,et al.  Effective random testing of concurrent programs , 2007, ASE.

[15]  Nicholas Sterling,et al.  WARLOCK - A Static Data Race Analysis Tool , 1993, USENIX Winter.

[16]  Koushik Sen,et al.  A Race-Detection and Flipping Algorithm for Automated Testing of Multi-threaded Programs , 2006, Haifa Verification Conference.

[17]  Serdar Tasiran,et al.  Goldilocks: Efficiently Computing the Happens-Before Relation Using Locksets , 2006, FATES/RV.

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

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

[20]  Koushik Sen,et al.  Race directed random testing of concurrent programs , 2008, PLDI '08.

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

[22]  Robert H. B. Netzer,et al.  Detecting data races on weak memory systems , 1991, [1991] Proceedings. The 18th Annual International Symposium on Computer Architecture.

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

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

[25]  Dawson R. Engler,et al.  EXE: automatically generating inputs of death , 2006, CCS '06.

[26]  Koushik Sen,et al.  Concolic testing , 2007, ASE.

[27]  Josep Torrellas,et al.  Accurate and efficient filtering for the Intel thread checker race detector , 2006, ASID '06.

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

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

[30]  Pravesh Kothari,et al.  A randomized scheduler with probabilistic guarantees of finding bugs , 2010, ASPLOS XV.

[31]  Pravesh Kothari,et al.  A randomized scheduler with probabilistic guarantees of finding bugs , 2010, ASPLOS 2010.

[32]  Dawson R. Engler,et al.  EXE: A system for automatically generating inputs of death using symbolic execution , 2006, CCS 2006.

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

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

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

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

[37]  Koushik Sen,et al.  Heuristics for Scalable Dynamic Test Generation , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[38]  Koushik Sen,et al.  Efficient data race detection for distributed memory parallel programs , 2011, 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC).

[39]  Klaus Wehrle,et al.  Scalable Symbolic Execution of Distributed Systems , 2011, 2011 31st International Conference on Distributed Computing Systems.

[40]  Koushik Sen,et al.  CUTE and jCUTE: Concolic Unit Testing and Explicit Path Model-Checking Tools , 2006, CAV.

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

[42]  Kathryn S. McKinley,et al.  Dynamic object sampling for pretenuring , 2004, ISMM '04.

[43]  Eran Yahav,et al.  QVM: an efficient runtime for detecting defects in deployed systems , 2008, OOPSLA '08.

[44]  Alastair F. Donaldson,et al.  Interleaving and Lock-Step Semantics for Analysis and Verification of GPU Kernels , 2013, ESOP.

[45]  Chao Wang,et al.  Generating Data Race Witnesses by an SMT-Based Analysis , 2011, NASA Formal Methods.

[46]  Hans-Juergen Boehm,et al.  Extended sequential reasoning for data-race-free programs , 2011, MSPC '11.