Abstract
A common workflow for developing parallel software is as follows: 1) start with a sequential program, 2) identify subcomputations that should be converted to parallel tasks, 3) insert synchronization to achieve the same semantics as the sequential program, and repeat steps 2) and 3) as needed to improve performance. Though this is not the only approach to developing parallel software, it is sufficiently common to warrant special attention as parallel programming becomes ubiquitous. This paper focuses on automating step 3), which is usually the hardest step for developers who lack expertise in parallel programming.
Past solutions to the problem of repairing parallel programs have used static-only or dynamic-only approaches, both of which incur significant limitations in practice. Static approaches can guarantee soundness in many cases but are limited in precision when analyzing medium or large-scale software with accesses to pointer-based data structures in multiple procedures. Dynamic approaches are more precise, but their proposed repairs are limited to a single input and are not reflected back in the original source program. In this paper, we introduce a hybrid static+dynamic test-driven approach to repairing data races in structured parallel programs. Our approach includes a novel coupling between static and dynamic analyses. First, we execute the program on a concrete test input and determine the set of data races for this input dynamically. Next, we compute a set of "finish" placements that prevent these races and also respects the static scoping rules of the program while maximizing parallelism. Empirical results on standard benchmarks and student homework submissions from a parallel computing course establish the effectiveness of our approach with respect to compile-time overhead, precision, and performance of the repaired code.
Supplemental Material
Available for Download
This package contains an artifact to the paper "Test-Driven Repair of Data Races in Structured Parallel Programs". The artifact includes our tool to automatically fix data races in Habanero Java (HJ) programs written using async and finish constructs.
- U. Banerjee, B. Bliss, Z. Ma, and P. Petersen. A theory of data race detection. In PADTAD '06, pages 69--78, New York, NY, USA, 2006. ACM. Google Scholar
Digital Library
- R. D. Blumofe, C. F. Joerg, B. C. Kuszmaul, C. E. Leiserson, K. H. Randall, and Y. Zhou. Cilk: An efficient multithreaded runtime system. In PPoPP '95, pages 207--216, New York, NY, USA, 1995. ACM. Google Scholar
Digital Library
- V. Cavé, J. Zhao, J. Shirako, and V. Sarkar. Habanero-java: the new adventures of old x10. In PPPJ '11, pages 51--61, New York, NY, USA, 2011. ACM. Google Scholar
Digital Library
- B. Chamberlain, D. Callahan, and H. Zima. Parallel programmability and the Chapel language. Int. J. High Perform. Comput. Appl., 21(3): 291--312, Aug. 2007. Google Scholar
Digital Library
- S. Chatterjee, S. Tasirlar, Z. Budimlic, V. Cavé, M. Chabbi, M. Grossman, V. Sarkar, and Y. Yan. Integrating asynchronous task parallelism with MPI. In IPDPS, pages 712--725, 2013. Google Scholar
Digital Library
- K. Ebcioğlu, V. Saraswat, and V. Sarkar. X10: an experimental language for high productivity programming of scalable systems (extended abstract). In Workshop on Productivity and Performance in High-End Computing (P-PHEC), February 2005.Google Scholar
- M. Feng and C. E. Leiserson. Efficient detection of determinacy races in Cilk programs. In SPAA '97, pages 1--11, New York, NY, USA, 1997. ACM. Google Scholar
Digital Library
- C. Flanagan and S. N. Freund. FastTrack: efficient and precise dynamic race detection. In PLDI '09, pages 121--133, New York, NY, USA, 2009. ACM. Google Scholar
Digital Library
- C. L. Goues, T. Nguyen, S. Forrest, and W. Weimer. GenProg: A generic method for automatic software repair. IEEE Trans. Software Eng., 38(1):54--72, 2012. Google Scholar
Digital Library
- A. Griesmayer, R. Bloem, and B. Cook. Repair of Boolean programs with an application to C. In CAV, pages 358--371. Springer, 2006. Google Scholar
Digital Library
- Y. Guo, R. Barik, R. Raman, and V. Sarkar. Work-first and help-first scheduling policies for async-finish task parallelism. In IPDPS, pages 1--12, 2009. Google Scholar
Digital Library
- G. Jin, L. Song, W. Zhang, S. Lu, and B. Liblit. Automated atomicity-violation fixing. In PLDI '11, pages 389--400, New York, NY, USA, 2011. ACM. Google Scholar
Digital Library
- G. Jin, W. Zhang, D. Deng, B. Liblit, and S. Lu. Automated concurrency-bug fixing. In OSDI'12, pages 221--236, Berkeley, CA, USA, 2012. USENIX Association. Google Scholar
Digital Library
- D. Kelk, K. Jalbert, and J. S. Bradbury. Automatically repairing concurrency bugs with ARC. In Multicore Software Engineering, Performance, and Tools, pages 73--84. Springer, 2013.Google Scholar
- F. Logozzo and T. Ball. Modular and verified automatic program repair. In OOPSLA '12, pages 133--146, New York, NY, USA, 2012. ACM. Google Scholar
Digital Library
- J. Mellor-Crummey. On-the-fly detection of data races for programs with nested fork-join parallelism. In Supercomputing '91, pages 24--33, New York, NY, USA, 1991. ACM. Google Scholar
Digital Library
- M. Naik, A. Aiken, and J. Whaley. Effective static race detection for Java. In PLDI, pages 308--319, 2006. Google Scholar
Digital Library
- V. K. Nandivada, J. Shirako, J. Zhao, and V. Sarkar. A transformation framework for optimizing task-parallel programs. ACM Trans. Program. Lang. Syst., 35(1), Apr. 2013. Google Scholar
Digital Library
- OpenMP. OpenMP specifications. http://www.openmp.org/specs.Google Scholar
- R. Raman, J. Zhao, V. Sarkar, M. Vechev, and E. Yahav. Efficient data race detection for async-finish parallelism. Formal Methods in System Design, 41(3):321--347, Dec. 2012. Google Scholar
Digital Library
- R. Raman, J. Zhao, V. Sarkar, M. Vechev, and E. Yahav. Scalable and precise dynamic datarace detection for structured parallelism. In PLDI '12, pages 531--542, New York, NY, USA, 2012. ACM. Google Scholar
Digital Library
- V. Raychev, M. T. Vechev, and E. Yahav. Automatic synthesis of deterministic concurrency. In SAS, pages 283--303, 2013.Google Scholar
Cross Ref
- A. Solar-Lezama, C. G. Jones, and R. Bodik. Sketching concurrent data structures. In PLDI, pages 136--148, 2008. Google Scholar
Digital Library
- P. Černý, K. Chatterjee, T. A. Henzinger, A. Radhakrishna, and R. Singh. Quantitative synthesis for concurrent programs. In CAV'11, pages 243--259, Berlin, Heidelberg, 2011. Springer-Verlag. Google Scholar
Digital Library
- M. Vechev, E. Yahav, and G. Yorsh. Abstraction-guided synthesis of synchronization. In POPL '10, pages 327--338, New York, NY, USA, 2010. ACM. Google Scholar
Digital Library
- J. W. Voung, R. Jhala, and S. Lerner. Relay: static race detection on millions of lines of code. In ESEC/FSE, pages 205--214. ACM, 2007. Google Scholar
Digital Library
Index Terms
Test-driven repair of data races in structured parallel programs
Recommendations
Test-driven repair of data races in structured parallel programs
PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and ImplementationA common workflow for developing parallel software is as follows: 1) start with a sequential program, 2) identify subcomputations that should be converted to parallel tasks, 3) insert synchronization to achieve the same semantics as the sequential ...
Brief Announcement: Dynamic Determinacy Race Detection for Task Parallelism with Futures
SPAA '16: Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and ArchitecturesExisting dynamic determinacy race detectors for task-parallel programs are limited to programs with strict computation graphs, where a task can only wait for its descendant tasks to complete. In this paper, we present the first known determinacy race ...
Automatic repair for multi-threaded programs with Deadlock/Livelock using maximum satisfiability
ISSTA 2014: Proceedings of the 2014 International Symposium on Software Testing and AnalysisDeadlock-freedom is a major challenge in developing multi-threaded programs, as a deadlock cannot be resolved until one restarts the program (mostly by using manual intervention). To avoid the risk of blocking, a program may use the trylock operations ...







Comments