skip to main content
10.1145/1390841.1390847acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article

On-the-fly race detection in multi-threaded programs

Published:20 July 2008Publication History

ABSTRACT

Multi-core chips enable parallel processing for general purpose applications. Unfortunately, parallel programs may contain synchronization defects. Such defects are difficult to detect due to nondeterministic interleavings of parallel threads. Current tools for detecting these defects produce numerous false alarms, thereby concealing the true defects. This paper describes an extended race detection technique based on a combination of lockset analysis and the happens-before relation. The approach provides more accurate warnings and significantly reduces the number of false positives, while limiting the number of false negatives. The technique is implemented in Helgrind+, an extension of the open source dynamic race detector Helgrind. Experimental results with several applications and benchmarks demonstrate a significant reduction in false alarms at a moderate runtime increase.

References

  1. The SPLASH-2 Programs: Characterization and Methodological Considerations, Santa Margherita Ligure, Italy, 1995.Google ScholarGoogle Scholar
  2. C. Bienia, S. Kumar, J. P. Singh, and K. Li. The PARSEC benchmark suite: Characterization and architectural implications. Technical report, January 2008.Google ScholarGoogle Scholar
  3. 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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J.-D. Choi and S. L. Min. Race frontier: reproducing data races in parallel-program debugging. SIGPLAN Not., 26(7):145--154, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Christiaens and K. D. Bosschere. Trade, a topological approach to on-the-fly race detection in java programs. In JVM'01: Proceedings of the JavaTM Virtual Machine Research and Technology Symposium on JavaTM Virtual Machine Research and Technology Symposium, pages 15--15, Berkeley, CA, USA, 2001. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. E. M. Clarke, O. Grumberg, S. Jha, Y. Lu, and H. Veith. Counterexample-guided abstraction refinement. In Computer Aided Verification, pages 154--169, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. Dinning and E. Schonberg. Detecting access anomalies in programs with critical sections. SIGPLAN Not., 26(12):85--96, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. O. Edelstein, E. Farchi, Y. Nir, G. Ratsaby, and S. Ur. Multithreaded java program test generation. In JGI '01: Proceedings of the 2001 joint ACM-ISCOPE conference on Java Grande, page 181, New York, NY, USA, 2001. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. D. Engler and K. Ashcraft. Racerx: effective, static detection of race conditions and deadlocks. SIGOPS Oper. Syst. Rev., 37(5):237--252, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Gilchrist. Parallel bzip2 (pbzip2):data compression software, 2007.Google ScholarGoogle Scholar
  11. J. J. Harrow. Runtime checking of multithreaded applications with visual threads. In Proceedings of the 7th International SPIN Workshop on SPIN Model Checking and Software Verification, pages 331--342, London, UK, 2000. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. L. Lamport. Time, clocks, and the ordering of events in a distributed system. Commun. ACM, 21(7):558--565, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. Lu, J. Tucek, F. Qin, and Y. Zhou. Avio: Detecting atomicity violations via access-interleaving invariants. IEEE Micro, 27(1):26--35, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. F. Mattern. Virtual time and global states of distributed systems. In Parallel and Distributed Algorithms: proceedings of the International Workshop on Parallel and Distributed Algorithms.Google ScholarGoogle Scholar
  15. N. Nethercote. Dynamic Binary Analysis and Instrumentation. PhD thesis, University of Cambridge, UK, 2004.Google ScholarGoogle Scholar
  16. N. Nethercote and J. Seward. Valgrind: A program supervision framework. 2003.Google ScholarGoogle Scholar
  17. N. Nethercote and J. Seward. Valgrind: a framework for heavyweight dynamic binary instrumentation. SIGPLAN Not., 42(6):89--100, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. R. H. B. Netzer and B. P. Miller. What are race conditions?: Some issues and formalizations. ACM Lett. Program. Lang. Syst., 1(1):74--88, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. H. Nishiyama. Detecting data races using dynamic escape analysis based on read barrier. In VM'04: Proceedings of the 3rd conference on Virtual Machine Research And Technology Symposium, pages 10--10, Berkeley, CA, USA, 2004. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. O'Callahan and J.-D. Choi. Hybrid dynamic data race detection. SIGPLAN Not., 38(10):167--178, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. V. Pankratius, C. Schaefer, A. Jannesari, and W. F. Tichy. Software engineering for multicore systems: an experience report. In IWMSE '08: Proceedings of the 1st international workshop on Multicore software engineering, pages 53--60, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. E. Pozniansky and A. Schuster. Multirace: efficient on-the-fly data race detection in multithreaded c++ programs: Research articles. Concurr. Comput.: Pract. Exper., 19(3):327--340, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. B. Richards and J. R. Larus. Protocol-based data-race detection. In SPDT '98: Proceedings of the SIGMETRICS symposium on Parallel and distributed tools, pages 40--47, New York, NY, USA, 1998. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Ronsse and K. D. Bosschere. Recplay: a fully integrated practical record/replay system. ACM Trans. Comput. Syst., 17(2):133--152, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. P. Sack, B. E. Bliss, Z. Ma, P. Petersen, and J. Torrellas. Accurate and efficient filtering for the intel thread checker race detector. In ASID '06: Proceedings of the 1st workshop on Architectural and system support for improving software dependability, pages 34--41, New York, NY, USA, 2006. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Seward. bzip2: A free data compressor, 2007.Google ScholarGoogle Scholar
  28. Valgrind-project. Helgrind: a data-race detector, 2007.Google ScholarGoogle Scholar
  29. C. von Praun and T. R. Gross. Object race detection. SIGPLAN Not., 36(11):70--82, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Y. Yu, T. Rodeheffer, and W. Chen. Racetrack: efficient detection of data race conditions via adaptive tracking. SIGOPS Oper. Syst. Rev., 39(5):221--234, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. On-the-fly race detection in multi-threaded 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
        • Published in

          cover image ACM Conferences
          PADTAD '08: Proceedings of the 6th workshop on Parallel and distributed systems: testing, analysis, and debugging
          July 2008
          78 pages
          ISBN:9781605580524
          DOI:10.1145/1390841
          • General Chair:
          • Shmuel Ur

          Copyright © 2008 ACM

          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]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 20 July 2008

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Upcoming Conference

          ISSTA '24

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader