skip to main content
10.1145/2063384.2063452acmconferencesArticle/Chapter ViewAbstractPublication PagesscConference Proceedingsconference-collections
research-article

Efficient data race detection for distributed memory parallel programs

Published: 12 November 2011 Publication History

Abstract

In this paper we present a precise data race detection technique for distributed memory parallel programs. Our technique, which we call Active Testing, builds on our previous work on race detection for shared memory Java and C programs and it handles programs written using shared memory approaches as well as bulk communication. Active testing works in two phases: in the first phase, it performs an imprecise dynamic analysis of an execution of the program and finds potential data races that could happen if the program is executed with a different thread schedule. In the second phase, active testing re-executes the program by actively controlling the thread schedule so that the data races reported in the first phase can be confirmed. A key highlight of our technique is that it can scalably handle distributed programs with bulk communication and single- and splitphase barriers. Another key feature of our technique is that it is precise---a data race confirmed by active testing is an actual data race present in the program; however, being a testing approach, our technique can miss actual data races. We implement the framework for the UPC programming language and demonstrate scalability up to a thousand cores for programs with both fine-grained and bulk (MPI style) communication. The tool confirms previously known bugs and uncovers several unknown ones. Our extensions capture constructs proposed in several modern programming languages for High Performance Computing, most notably non-blocking barriers and collectives.

References

[1]
S. V. Adve, M. D. Hill, B. P. Miller, and R. H. B. Netzer. Detecting data races on weak memory systems. In 18th International Symposium on Computer architecture (ISCA), pages 234--243. ACM, 1991.
[2]
R. Agarwal, A. Sasturkar, L. Wang, and S. D. Stoller. Optimized run-time race detection and atomicity checking using partial discovered types. In 20th International Conference on Automated software engineering (ASE), pages 233--242. ACM, 2005.
[3]
A. Aiken and D. Gay. Barrier inference. In Principles of programming languages (POPL), pages 342--354, New York, NY, USA, 1998. ACM.
[4]
S. Bensalem, J.-C. Fernandez, K. Havelund, and L. Mounier. Confirmation of deadlock potentials detected by runtime analysis. In PADTAD'06, pages 41--50, 2006.
[5]
S. Bensalem and K. Havelund. Scalable dynamic deadlock analysis of multi-threaded programs. In Parallel and Distributed Systems: Testing and Debugging 2005 (PADTAD'05), 2005.
[6]
Berkeley UPC. Available at http://upc.lbl.gov/.
[7]
S. Burckhardt, R. Alur, and M. M. K. Martin. CheckFence: checking consistency of concurrent data types on relaxed memory models. In Programming Language Design and Implementation (PLDI), pages 12--21, 2007.
[8]
J. Burnim, C. Stergiou, and K. Sen. Testing concurrent programs on relaxed memory models. In International Symposium on Software Testing and Analysis, 2011.
[9]
W. W. Carlson, J. M. Draper, D. E. Culler, K. Yelick, and K. W. E. Brooks. Introduction to UPC and language specification, 1999.
[10]
J.-D. Choi, K. Lee, A. Loginov, R. O'Callahan, V. Sarkar, and M. Sridharan. Efficient and precise datarace detection for multithreaded object-oriented programs. In Programming language design and implementation (PLDI), pages 258--269, New York, NY, USA, 2002. ACM.
[11]
J.-D. Choi, B. P. Miller, and R. H. B. Netzer. Techniques for debugging parallel programs with flowback analysis. ACM Trans. Program. Lang. Syst., 13(4):491--530, 1991.
[12]
M. Christiaens and K. D. Bosschere. TRaDe, a topological approach to on-the-fly race detection in java programs. In JavaTM Virtual Machine Research and Technology Symposium, pages 15--15. USENIX, 2001.
[13]
T. Cormen, C. Leiserson, and R. Rivset. Introduction to Algorithms. The MIT Press, 1994.
[14]
J. DeSouza, B. Kuhn, B. R. de Supinski, V. Samofalov, S. Zheltov, and S. Bratanov. Automated, scalable debugging of MPI programs with Intel Message Checker. In Software engineering for high performance computing system applications, SE-HPCS '05, pages 78--82, New York, NY, USA, 2005. ACM.
[15]
J. Dinan, P. Balaji, E. Lusk, P. Sadayappan, and R. Thakur. Hybrid parallel programming with MPI and Unified Parallel C. In Computing frontiers (CF), CF '10, 2010.
[16]
A. Dinning and E. Schonberg. Detecting access anomalies in programs with critical sections. In Workshop on Parallel and Distributed Debugging, 1991.
[17]
M. B. Dwyer, J. Hatcliff, Robby, and V. P. Ranganath. Exploiting object escape and locking information in partial-order reductions for concurrent object-oriented programs. Form. Methods Syst. Des., 25(2--3):199--240, 2004.
[18]
J. E. M. Clarke, O. Grumberg, and D. A. Peled. Model checking. MIT Press, 1999.
[19]
A. Farzan and P. Madhusudan. Monitoring atomicity in concurrent programs. In Computer Aided Verification (CAV), pages 52--65. Springer, 2008.
[20]
A. Farzan and P. Madhusudan. The complexity of predicting atomicity violations. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2009.
[21]
A. Farzan, P. Madhusudan, and F. Sorrentino. Meta-analysis for atomicity violations under nested locking. In Computer Aided Verification (CAV), pages 248--262. Springer-Verlag, 2009.
[22]
C. Flanagan and S. N. Freund. Atomizer: a dynamic atomicity checker for multithreaded programs. In 31st Symposium on Principles of Programming Languages (POPL), pages 256--267, 2004.
[23]
C. Flanagan and S. N. Freund. FastTrack: efficient and precise dynamic race detection. In Programming language design and implementation (PLDI). ACM, 2009.
[24]
C. Flanagan, S. N. Freund, and J. Yi. Velodrome: a sound and complete dynamic atomicity checker for multithreaded programs. In Programming language design and implementation (PLDI), pages 293--303. ACM, 2008.
[25]
Franklin: Cray XT4. At http://www.nersc.gov/users/computational-systems/franklin/.
[26]
E. N. Hanson and T. Johnson. The interval skip list: A data structure for finding all intervals that overlap a point. In Workshop on Algorithms and Data Structures, pages 153--164. Springer, 1992.
[27]
K. Havelund. Using runtime analysis to guide model checking of Java programs. In 7th International SPIN Workshop on Model Checking and Software Verification, pages 245--264, 2000.
[28]
K. Havelund and T. Pressburger. Model Checking Java Programs using Java PathFinder. Int. Journal on Software Tools for Technology Transfer, 2(4):366--381, 2000.
[29]
T. A. Henzinger, R. Jhala, and R. Majumdar. Race checking by context inference. SIGPLAN Not., 39(6):1--13, 2004.
[30]
P. N. Hilfinger, D. Bonachea, D. Gay, S. Graham, B. Liblit, G. Pike, and K. Yelick. Titanium language reference manual. Technical report, Berkeley, CA, USA, 2001.
[31]
G. Holzmann. The Spin model checker. IEEE Transactions on Software Engineering, 23(5):279--295, 1997.
[32]
N. Jalbert and K. Sen. A trace simplification technique for effective debugging of concurrent programs. In Foundations of Software Engineering (FSE). ACM, 2010.
[33]
P. Joshi, M. Naik, C.-S. Park, and K. Sen. An extensible active testing framework for concurrent programs. In Computer Aided Verification (CAV), Lecture Notes in Computer Science. Springer, 2009.
[34]
P. Joshi, C.-S. Park, K. Sen, and M. Naik. A randomized dynamic program analysis technique for detecting real deadlocks. In Programming Language Design and Implementation (PLDI), 2009.
[35]
B. Krammer, M. Müller, and M. Resch. Runtime checking of MPI applications with MARMOT. In Mini-Symposium Tools Support for Parallel Programming, ParCo 2005, Malaga, Spain, September 12 - 16, 2005., 2005.
[36]
L. Lamport. Time, clocks, and the ordering of events in a distributed system. Commun. ACM, 21(7):558--565, 1978.
[37]
S. Lu, J. Tucek, F. Qin, and Y. Zhou. AVIO: detecting atomicity violations via access interleaving invariants. SIGARCH Comput. Archit. News, 34(5):37--48, 2006.
[38]
J. Mellor-Crummey. On-the-fly detection of data races for programs with nested fork-join parallelism. In Supercomputing, pages 24--33. ACM, 1991.
[39]
M. Musuvathi and S. Qadeer. Iterative context bounding for systematic testing of multithreaded programs. In Programming Language Design and Implementation (PLDI), 2007.
[40]
M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. A. Nainar, and I. Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In Operating Systems Design and Implementation (OSDI), pages 267--280, 2008.
[41]
M. Naik, A. Aiken, and J. Whaley. Effective static race detection for Java. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 308--319, 2006.
[42]
S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, and B. Calder. Automatically classifying benign and harmful data races using replay analysis. In Programming Language Design and Implementation (PLDI), pages 22--31, 2007.
[43]
The NAS Parallel Benchmarks. Available at http://www.nas.nasa.gov/Software/NPB.
[44]
The UPC NAS Parallel Benchmarks. Available at http://upc.gwu.edu/download.html.
[45]
Y. Nir-Buchbinder, R. Tzoref, and S. Ur. Deadlocks: From exhibiting to healing. In 8th Workshop on Runtime Verification, 2008.
[46]
H. Nishiyama. Detecting data races using dynamic escape analysis based on read barrier. In Virtual Machine Research and Technology Symposium, pages 127--138, 2004.
[47]
R. O'Callahan and J.-D. Choi. Hybrid dynamic data race detection. In Principles and practice of parallel programming (PPoPP), pages 167--178. ACM, 2003.
[48]
S. Olivier and J. Prins. Scalable dynamic load balancing using UPC. In International Conference on Parallel Processing (ICPP), ICPP '08, 2008.
[49]
C.-S. Park and K. Sen. Randomized active atomicity violation detection in concurrent programs. In Foundations of Software Engineering (FSE). ACM, 2008.
[50]
S. Park, S. Lu, and Y. Zhou. Ctrigger: exposing atomicity violation bugs from their hiding places. In Architectural support for programming languages and operating systems (ASPLOS), pages 25--36. ACM, 2009.
[51]
W. Pugh. Skip lists: a probabilistic alternative to balanced trees. Commun. ACM, 33(6):668--676, 1990.
[52]
S. Qadeer and D. Wu. KISS: keep it simple and sequential. In Programming language design and implementation (PLDI), pages 14--24. ACM, 2004.
[53]
M. Ronsse and K. D. Bosschere. Recplay: a fully integrated practical record/replay system. ACM Trans. Comput. Syst., 17(2):133--152, 1999.
[54]
S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: a dynamic data race detector for multithreaded programs. ACM Trans. Comput. Syst., 15(4):391--411, 1997.
[55]
E. Schonberg. On-the-fly detection of access anomalies. In Programming Language Design and Implementation (PLDI), volume 24, pages 285--297, 1989.
[56]
K. Sen. Race directed random testing of concurrent programs. In Programming Language Design and Implementation (PLDI), 2008.
[57]
O. Shacham, M. Sagiv, and A. Schuster. Scaling model checking of dataraces using dynamic information. J. Parallel Distrib. Comput., 67(5):536--550, 2007.
[58]
S. F. Siegel and T. K. Zirkel. Automatic formal verification of MPI-based parallel programs. In Principles and practice of parallel programming, PPoPP '11, pages 309--310, New York, NY, USA, 2011. ACM.
[59]
S. S. Vakkalanka, S. Sharma, G. Gopalakrishnan, and R. M. Kirby. ISP: a tool for model checking MPI programs. In Principles and practice of parallel programming, PPoPP '08, pages 285--286, New York, NY, USA, 2008. ACM.
[60]
J. S. Vetter and B. R. de Supinski. Dynamic software testing of MPI applications with Umpire. In Supercomputing, SC '00, Washington, DC, USA, 2000. IEEE Computer Society.
[61]
W. Visser, K. Havelund, G. Brat, and S. Park. Model checking programs. In Automated Software Engineering (ASE). IEEE, 2000.
[62]
A. Vo, S. Aananthakrishnan, G. Gopalakrishnan, B. R. d. Supinski, M. Schulz, and G. Bronevetsky. A scalable and distributed dynamic formal verifier for MPI programs. In Supercomputing, SC '10, pages 1--10, Washington, DC, USA, 2010. IEEE Computer Society.
[63]
C. von Praun and T. R. Gross. Object race detection. In Object oriented programming, systems, languages, and applications (OOPSLA), pages 70--82. ACM, 2001.
[64]
L. Wang and S. D. Stoller. Run-time analysis for atomicity. In 3rd Workshop on Run-time Verification, volume 89 of ENTCS, 2003.
[65]
L. Wang and S. D. Stoller. Accurate and efficient runtime detection of atomicity errors in concurrent programs. In Principles and Practice of Parallel Programming (PPoPP), pages 137--146. ACM Press, Mar. 2006.
[66]
A. Williams, W. Thies, and M. Ernst. Static deadlock detection for Java libraries. In European Conference on Object-Oriented Programming (ECOOP), pages 602--629, 2005.
[67]
M. Xu, R. Bodík, and M. D. Hill. A serializability violation detector for shared-memory server programs. SIGPLAN Not., 40(6):1--14, 2005.
[68]
Y. Yang, X. Chen, G. Gopalakrishnan, and R. M. Kirby. Efficient stateful dynamic partial order reduction. In SPIN, Lecture Notes in Computer Science, pages 288--305. Springer, 2008.
[69]
J. Yi, C. Sadowski, and C. Flanagan. SideTrack: generalizing dynamic atomicity analysis. In 7th Workshop on Parallel and Distributed Systems, pages 1--10. ACM, 2009.
[70]
Y. Zhang and E. Duesterwald. Barrier matching for programs with textually unaligned barriers. In Principles and practice of parallel programming, PPoPP '07, 2007.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SC '11: Proceedings of 2011 International Conference for High Performance Computing, Networking, Storage and Analysis
November 2011
866 pages
ISBN:9781450307710
DOI:10.1145/2063384
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 November 2011

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article

Funding Sources

Conference

SC '11
Sponsor:

Acceptance Rates

SC '11 Paper Acceptance Rate 74 of 352 submissions, 21%;
Overall Acceptance Rate 1,516 of 6,373 submissions, 24%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)6
  • Downloads (Last 6 weeks)1
Reflects downloads up to 01 Feb 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media