Model-checking task-parallel programs for data-race

Many of the correctness properties afforded by task-parallel programming models such as OpenMP, Cilk, X10, Chapel, Habanero, etc. rely on data-race freedom. The research in this paper studies data-race in the context of these models with the intent to prove with model checking its absence on any feasible schedule for a given input. The paper presents the computation graph as a representation of a happens-before relation that additionally tracks memory accesses with a quadratic algorithm to detect data-race on the graph. It then shows how the graph is constructed from an execution of a task-parallel program and proves that under a fixed order of mutual exclusion, if a schedule with a data-race exists in the program, then a data-race is manifest in the computation graph. The paper then defines a model checking algorithm that enumerates all orders of mutual exclusion to prove data-race freedom over all schedules on the given input. The approach is evaluated in a Java implementation of Habanero using the JavaPathfinder model checker. The results, when compared to other data-race detectors including one based on vector clocks, show that this new approach is more efficient than existing JavaPathfinder solutions and is comparable to the vector clock solution in the absence of data-race but slower in the presence of data-race since the vector clock algorithm is on-the-fly while the new approach is not. The results also show that the new approach avoids the memory overhead of vector clocks when there are many tasks and objects to track.

[1]  Stephen F. Siegel,et al.  Automated Verification of Chapel Programs Using Model Checking and Symbolic Execution , 2013, NASA Formal Methods.

[2]  Stephen N. Freund,et al.  VerifiedFT: a verified, high-performance precise dynamic race detector , 2018, PPoPP.

[3]  Dimitar Dimitrov,et al.  Commutativity race detection , 2014, PLDI.

[4]  Bradley C. Kuszmaul,et al.  Cilk: an efficient multithreaded runtime system , 1995, PPOPP '95.

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

[6]  Vivek Sarkar,et al.  Model Checking Task Parallel Programs Using Gradual Permissions (N) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[7]  Shmuel Sagiv Thread-Modular Shape Analysis , 2009, VMCAI.

[8]  Vivek Sarkar,et al.  Practical Permissions for Race-Free Parallelism , 2012, ECOOP.

[9]  Darko Marinov,et al.  X10X: Model Checking a New Programming Language with an "Old" Model Checker , 2012, 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation.

[10]  Vivek Sarkar,et al.  Scalable and precise dynamic datarace detection for structured parallelism , 2012, PLDI.

[11]  Jeremy T. Fineman,et al.  Provably Good and Practically Efficient Parallel Race Detection for Fork-Join Programs , 2016, SPAA.

[12]  Mahesh Viswanathan,et al.  Dynamic race prediction in linear time , 2017, PLDI.

[13]  Mahesh Viswanathan,et al.  Data race detection on compressed traces , 2018, ESEC/SIGSOFT FSE.

[14]  Vivek Sarkar,et al.  Efficient data race detection for async-finish parallelism , 2010, Formal Methods Syst. Des..

[15]  Weixing Ji,et al.  Dynamic enforcement of determinism in a parallel scripting language , 2014, PLDI.

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

[17]  W. Visser,et al.  Detecting Data Races with Java PathFinder ? , 2010 .

[18]  Vivek Sarkar,et al.  Determinacy and Repeatability of Parallel Program Schemata , 2012, 2012 Data-Flow Execution Models for Extreme Scale Computing.

[19]  Michael A. Bender,et al.  On-the-fly maintenance of series-parallel relationships in fork-join multithreaded programs , 2004, SPAA '04.

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

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

[22]  Vivek Sarkar,et al.  Habanero-Java: the new adventures of old X10 , 2011, PPPJ.

[23]  Patrice Godefroid,et al.  Model checking for programming languages using VeriSoft , 1997, POPL '97.

[24]  Weixing Ji,et al.  TARDIS: Task-level Access Race Detection by Intersecting Sets , 2013 .

[25]  Vivek Sarkar,et al.  Automatic Verification of Determinism for Structured Parallel Programs , 2010, SAS.

[26]  Vivek Sarkar,et al.  Dynamic Determinacy Race Detection for Task Parallelism with Futures , 2016, RV.

[27]  Samuel Thibault,et al.  Evaluation of OpenMP Dependent Tasks with the KASTORS Benchmark Suite , 2014, IWOMP.

[28]  Vivek Sarkar,et al.  X10: an object-oriented approach to non-uniform cluster computing , 2005, OOPSLA '05.

[29]  Andreas Podelski,et al.  Precise Thread-Modular Verification , 2007, SAS.

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

[31]  Peter W. O'Hearn,et al.  RacerD: compositional static race detection , 2018, Proc. ACM Program. Lang..

[32]  Charles E. Leiserson,et al.  Efficient Detection of Determinacy Races in Cilk Programs , 1997, SPAA '97.

[33]  Charles E. Leiserson,et al.  Detecting data races in Cilk programs that use locks , 1998, SPAA '98.

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

[35]  Vivek Sarkar,et al.  Habanero-Java library: a Java 8 framework for multicore programming , 2014, PPPJ.

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

[37]  Ahmed Bouajjani,et al.  Analysis of recursively parallel programs , 2012, POPL '12.

[38]  Serdar Tasiran,et al.  Goldilocks: a race and transaction-aware java runtime , 2007, PLDI '07.

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

[40]  Grigore Rosu,et al.  Maximal sound predictive race detection with control flow abstraction , 2014, PLDI.