Maximal Causal Models for Multithreaded Systems

Extracting causal models from observed executions has proved to be an effective approach to analyze concurrent programs. Most existing causal models are based on happens-before partial orders and/or Mazurkiewicz traces. Unfortunately, these models are inherently limited in the context of multithreaded systems, since multithreaded executions are mainly determined by consistency among shared memory accesses rather than by partial orders or event independence. This paper defines a novel theoretical foundation for multithreaded executions and a novel causal model, based on memory consistency constraints. The proposed model is sound and maximal: (1) all traces consistent with the causal model are feasible executions of the multithreaded program under analysis; and (2) assuming only the observed execution and no knowledge about the source code of the program, the proposed model captures more feasible executions than any other sound causal model. An algorithm to systematically generate all the feasible executions comprised by maximal causal models is also proposed, which can be used for testing or model checking of multithreaded system executions. Finally, a specialized submodel of the maximal one is presented, which gives an efficient and effective solution to on-the-fly datarace detection. This datarace-focused model, still captures more feasible executions than the existing happens-before-based approaches.

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

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

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

[4]  Joseph Robert Horgan,et al.  Dynamic program slicing , 1990, PLDI '90.

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

[6]  Edsger W. Dijkstra,et al.  Cooperating sequential processes , 2002 .

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

[8]  Barton P. Miller,et al.  Detecting Data Races in Parallel Program Executions , 1989 .

[9]  Koushik Sen,et al.  Detecting Errors in Multithreaded Programs by Generalized Predictive Analysis of Executions , 2005, FMOODS.

[10]  Gary L. Peterson,et al.  Myths About the Mutual Exclusion Problem , 1981, Inf. Process. Lett..

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

[12]  Barton P. Miller,et al.  Improving the accuracy of data race detection , 1991, PPOPP '91.

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

[14]  David A. Padua,et al.  Debugging Parallel Fortran on a Shared Memory Machine , 1987, ICPP.

[15]  Charles E. Leiserson,et al.  Efficient detection of determinacy races in Cilk programs , 1997, SPAA '97.

[16]  Wojciech Zielonka,et al.  The Book of Traces , 1995 .

[17]  Edith Schonberg On-the-fly detection of access anomalies (with retrospective) , 1989 .

[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]  Grigore Rosu,et al.  Parametric and Sliced Causality , 2007, CAV.

[20]  Charles E. McDowell,et al.  Analyzing Traces with Anonymous Synchronization , 1989, ICPP.

[21]  David A. Padua,et al.  Event synchronization analysis for debugging parallel programs , 1989, Proceedings of the 1989 ACM/IEEE Conference on Supercomputing (Supercomputing '89).

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

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

[24]  Zhiqiang Ma,et al.  A theory of data race detection , 2006, PADTAD '06.

[25]  Charles E. McDowell,et al.  Determining Possible Event Orders by Analyzing Sequential Traces , 1993, IEEE Trans. Parallel Distributed Syst..

[26]  Friedemann Mattern,et al.  Virtual Time and Global States of Distributed Systems , 2002 .

[27]  Stephen N. Freund,et al.  Atomizer: A dynamic atomicity checker for multithreaded programs , 2008, Sci. Comput. Program..

[28]  David A. Padua,et al.  Automatic detection of nondeterminacy in parallel programs , 1988, PADD '88.

[29]  Frank Tip,et al.  Associating synchronization constraints with data in an object-oriented language , 2006, POPL '06.

[30]  Eitan Farchi,et al.  Concurrent bug patterns and how to test them , 2003, Proceedings International Parallel and Distributed Processing Symposium.

[31]  Antoni W. Mazurkiewicz,et al.  Trace Theory , 1986, Advances in Petri Nets.

[32]  Vijay K. Garg,et al.  Detecting Temporal Logic Predicates in Distributed Programs Using Computation Slicing , 2003, OPODIS.

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