skip to main content
10.1145/2384616.2384650acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

IFRit: interference-free regions for dynamic data-race detection

Published:19 October 2012Publication History

ABSTRACT

We propose a new algorithm for dynamic data-race detection. Our algorithm reports no false positives and runs on arbitrary C and C++ code. Unlike previous algorithms, we do not have to instrument every memory access or track a full happens-before relation. Our data-race detector, which we call IFRit, is based on a run-time abstraction called an interference-free region (IFR). An IFR is an interval of one thread's execution during which any write to a specific variable by a different thread is a data race. We insert instrumentation at compile time to monitor active IFRs at run-time. If the runtime observes overlapping IFRs for conflicting accesses to the same variable in two different threads, it reports a race. The static analysis aggregates information for multiple accesses to the same variable, avoiding the expense of having to instrument every memory access in the program.

We directly compare IFRit to FastTrack and ThreadSanitizer, two state-of-the-art fully-precise data-race detectors. We show that IFRit imposes a fraction of the overhead of these detectors. We show that for the PARSEC benchmarks, and several real-world applications, IFRit finds many of the races detected by a fully-precise detector. We also demonstrate that sampling can further reduce IFRit's performance overhead without completely forfeiting precision.

References

  1. M. Abadi, C. Flanagan, and S. N. Freund. Types for safe locking: Static race detection for Java. ACM Transactions on Programming Languages and Systems (TOPLAS), 28(2):207--255, March 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. V. Adve and H.-J. Boehm. Memory models: A case for rethinking parallel languages and hardware. Communications of the ACM (CACM), 53(8):90--101, August 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. Bienia. Benchmarking Modern Multiprocessors. PhD thesis, Princeton University, January 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. H.-J. Boehm. How to miscompile programs with "benign" data races. In USENIX Workshop on Hot Topics in Parallelism (HotPar), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. H.-J. Boehm and S. Adve. Foundations of the C++ con-currency memory model. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. D. Bond, K. E. Coons, and K. S. McKinley. Pacer: proportional detection of data races. In ACM SIGPLAN Confer-ence on Programming Language Design and Implementation (PLDI), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. L. Effinger-Dean, H.-J. Boehm, P. Joisha, and D. Chakrabarti. Extended sequential reasoning for data-race-free programs. In ACM SIGPLAN Workshop on Memory Systems Performance and Correctness (MSPC), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. Engler and K. Ashcroft. RacerX: effective, static detection of race conditions and deadlocks. In ACM Symposium on Operating Systems Principles (SOSP), 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. Erickson, M. Musuvathi, S. Burckhardt, and K. Olynyk. Effective data-race detection for the kernel. In USENIX Symposium on Operating Systems Design and Implementation (OSDI), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. Flanagan and S. N. Freund. FastTrack: efficient and precise dynamic race detection. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. ISO JTC1/SC22/WG14. ISO/IEC 9899:2011, Information technology "Programming languages" C. http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=57853. Draft available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf.Google ScholarGoogle Scholar
  12. ISO JTC1/SC22/WG21. ISO/IEC 14882:2011, Information technology -- Programming languages -- C++. http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372. Draft available at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf.Google ScholarGoogle Scholar
  13. L. Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM (CACM), 21 (7):558--565, July 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In International Symposium on Code Generation and Optimization (CGO), 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. In International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. B. Lucia, L. Ceze, K. Strauss, S. Qadeer, and H.-J. Boehm. Conflict exceptions: Simplifying concurrent language semantics with precise hardware exceptions for data-races. In ACM IEEE International Symposium on Computer Architecture (ISCA), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. B. Lucia, B. P. Wood, and L. Ceze. Isolating and understand-ing concurrency errors using reconstructed execution fragments. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. D. Marino, M. Musuvathi, and S. Narayanasamy. LiteRace: effective sampling for lightweight data-race detection. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. F. Mattern. Virtual time and global states of distributed systems. In International Workshop on Parallel and Distributed Algorithms and Applications (PDAA), 1988.Google ScholarGoogle Scholar
  20. M. Naik, A. Aiken, and J. Whaley. Effective static race detection for Java. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Olszewski, Q. Zhao, D. Koh, J. Ansel, and S. Ama-rasinghe. Aikido: accelerating shared data dynamic analyses. In International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. E. Pozniansky and A. Schuster. MultiRace: Efficient on-the-fly data race detection in multithreaded C++ programs. Concurrency and Computation: Practice and Experience, 19 (3):327--340, March 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. D. Saff and M. D. Ernst. Reducing wasted development time via continuous testing. In IEEE International Symposium on Software Reliability Engineering (ISSRE), 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. An-derson. Eraser: a dynamic data race detector for multithreaded programs. ACM Transactions on Computer Systems (TOCS), 15(4):391--411, November 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. K. Serebryany and T. Iskhodzhanov. ThreadSanitizer--data race detection in practice. In Workshop on Binary Instrumentation and Applications, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. J. Sevc1k and D. Aspinall. On validity of program transforma-tions in the Java memory model. In European Conference on Object-Oriented Programming (ECOOP), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Yu and S. Narayanasamy. A case for an interleaving con-strained shared-memory multiprocessor. In ACM IEEE International Symposium on Computer Architecture (ISCA), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Y. Yu, T. Rodeheffer, and W. Chen. RaceTrack: efficient detection of data race conditions via adaptive tracking. In ACM Symposium on Operating Systems Principles (SOSP), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. IFRit: interference-free regions for dynamic data-race detection

          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
            OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applications
            October 2012
            1052 pages
            ISBN:9781450315616
            DOI:10.1145/2384616
            • cover image ACM SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 47, Issue 10
              OOPSLA '12
              October 2012
              1011 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/2398857
              Issue’s Table of Contents

            Copyright © 2012 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: 19 October 2012

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate268of1,244submissions,22%

            Upcoming Conference

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader