skip to main content
research-article

Test-driven repair of data races in structured parallel programs

Published:09 June 2014Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle Scholar
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Griesmayer, R. Bloem, and B. Cook. Repair of Boolean programs with an application to C. In CAV, pages 358--371. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle Scholar
  15. F. Logozzo and T. Ball. Modular and verified automatic program repair. In OOPSLA '12, pages 133--146, New York, NY, USA, 2012. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Naik, A. Aiken, and J. Whaley. Effective static race detection for Java. In PLDI, pages 308--319, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. OpenMP. OpenMP specifications. http://www.openmp.org/specs.Google ScholarGoogle Scholar
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. V. Raychev, M. T. Vechev, and E. Yahav. Automatic synthesis of deterministic concurrency. In SAS, pages 283--303, 2013.Google ScholarGoogle ScholarCross RefCross Ref
  23. A. Solar-Lezama, C. G. Jones, and R. Bodik. Sketching concurrent data structures. In PLDI, pages 136--148, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Test-driven repair of data races in structured parallel programs

                  Recommendations

                  Comments

                  Login options

                  Check if you have access through your login credentials or your institution to get full access on this article.

                  Sign in

                  Full Access

                  • Published in

                    cover image ACM SIGPLAN Notices
                    ACM SIGPLAN Notices  Volume 49, Issue 6
                    PLDI '14
                    June 2014
                    598 pages
                    ISSN:0362-1340
                    EISSN:1558-1160
                    DOI:10.1145/2666356
                    • Editor:
                    • Andy Gill
                    Issue’s Table of Contents
                    • cover image ACM Conferences
                      PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation
                      June 2014
                      619 pages
                      ISBN:9781450327848
                      DOI:10.1145/2594291

                    Copyright © 2014 ACM

                    Publisher

                    Association for Computing Machinery

                    New York, NY, United States

                    Publication History

                    • Published: 9 June 2014

                    Check for updates

                    Qualifiers

                    • research-article

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader
                  About Cookies On This Site

                  We use cookies to ensure that we give you the best experience on our website.

                  Learn more

                  Got it!