Lightweight fault detection in parallelized programs

A popular approach for producing parallel software is to develop a sequential version of an application and then incrementally introduce parallel constructs to parallelize different parts of the application. During the parallelization process, programming errors may be introduced, causing concurrency bugs. In this paper we develop a technique for runtime detection of data dependence faults (i.e., data races and atomicity violations) introduced during parallelization. By leveraging the availability of two versions of the program, the sequential one and the parallelized one, we comparison check dynamic data dependences exercised during executions of the two versions to identify faults. To reduce the cost of comparison checking we develop three optimizations. The first optimization causes only a subset of dynamically exercised data dependences to be comparison checked. The second optimization shows that not all instances of a dynamically exercised data dependence need to be comparison checked. The third optimization shows that static analysis of parallelizing constructs can be exploited to eliminate the need for executing the parallelized version altogether. In addition, our solution is applicable when different program executions on the same input may follow different execution paths, it is effective in situations where the fault introduced manifests itself rarely during execution, and it is also effective in pinpointing the location of the fault in the program. We implemented and evaluated our approach using ten benchmarks. The experimental results indicate an average slowdown of 3× to perform fault detection.

[1]  M.L. Soffa,et al.  Capturing the effects of code improving transformations , 1998, Proceedings. 1998 International Conference on Parallel Architectures and Compilation Techniques (Cat. No.98EX192).

[2]  Rajiv Gupta,et al.  Enhanced speculative parallelization via incremental recovery , 2011, PPoPP '11.

[3]  Feng Qin,et al.  SyncChecker: Detecting Synchronization Errors between MPI Applications and Libraries , 2012, 2012 IEEE 26th International Parallel and Distributed Processing Symposium.

[4]  Satish Narayanasamy,et al.  DRFX: a simple and efficient memory model for concurrent programming languages , 2010, PLDI '10.

[5]  Easwaran Raman,et al.  Speculative Decoupled Software Pipelining , 2007, 16th International Conference on Parallel Architecture and Compilation Techniques (PACT 2007).

[6]  Mark Harman,et al.  A theoretical & empirical analysis of evolutionary testing and hill climbing for structural test data generation , 2007, ISSTA '07.

[7]  Rajiv Gupta,et al.  Architectural support for shadow memory in multiprocessors , 2009, VEE '09.

[8]  Zijiang Yang,et al.  HAVE: Detecting Atomicity Violations via Integrated Dynamic and Static Analysis , 2009, FASE.

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

[10]  Claudia Fohry,et al.  Common Mistakes in OpenMP and How to Avoid Them - A Collection of Best Practices , 2005, IWOMP.

[11]  Harish Patil,et al.  Pin: building customized program analysis tools with dynamic instrumentation , 2005, PLDI '05.

[12]  Chen Ding,et al.  Software behavior oriented parallelization , 2007, PLDI '07.

[13]  Rajiv Gupta,et al.  Comparison checking: an approach to avoid debugging of optimized code , 1999, ESEC/FSE-7.

[14]  Rajiv Gupta,et al.  SpiceC: scalable parallelism via implicit copying and explicit commit , 2011, PPoPP '11.

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

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

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

[18]  L. Dagum,et al.  OpenMP: an industry standard API for shared-memory programming , 1998 .

[19]  James Reinders,et al.  Intel threading building blocks - outfitting C++ for multi-core processor parallelism , 2007 .

[20]  Yuanyuan Zhou,et al.  CTrigger: exposing atomicity violation bugs from their hiding places , 2009, ASPLOS.

[21]  Madan Musuvathi,et al.  Iterative context bounding for systematic testing of multithreaded programs , 2007, PLDI '07.

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

[23]  Jingling Xue,et al.  Acculock: Accurate and efficient detection of data races , 2011, International Symposium on Code Generation and Optimization (CGO 2011).

[24]  Patrice Quinton,et al.  ompVerify: Polyhedral Analysis for the OpenMP Programmer , 2011, IWOMP.

[25]  Qi Gao,et al.  FlowChecker: Detecting Bugs in MPI Libraries via Message Flow Checking , 2010, 2010 ACM/IEEE International Conference for High Performance Computing, Networking, Storage and Analysis.

[26]  Shan Lu,et al.  Automated atomicity-violation fixing , 2011, PLDI '11.

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

[28]  Keshav Pingali,et al.  Optimistic parallelism requires abstractions , 2009, CACM.